googleapis / googleapis/google-cloud-java
[google-auth-library-java] evaluate refactor builder patterns so that setters do not need to be override in child classes.
- 主要语言
- Java
- 星标
- 2.1k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 157
描述
see this comment for context: https://github.com/googleapis/google-auth-library-java/pull/1528#discussion_r1801591146
builders are not created with generic types across this repo e.g. https://github.com/googleapis/google-auth-library-java/blob/f154edb3d8503d29f0020b6904dfa40e034ded93/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java#L486
This means to allow customer code to use a fluent builder API without casting, setters in parent classes need to be overriden in child classes, even without adding specific logics.
Note that adding generics to existing classes may also produce warning regarding raw use of generic types.
贡献指南
调研方向
从链接的 pull request 讨论以及 oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java 中引用的 builder 声明开始。盘点整个仓库中现有的 builder 模式,然后确定通用 parent 方案是否能够移除子类中的 setter 覆盖,同时不引入 raw type 警告;当所有受影响类的范围和最终模式确定后,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend-api-design
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100