Reusing code between resources
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- java
- 领域
- build-system, tooling
调研方向
从 Translator.java 和 HandlerUtils.java 中链接的 AWS IoT 示例开始,重点关注资源 Maven 项目之间重复的异常转换和 listTags 方法。然后检查此 Java 插件如何生成独立项目,并确定是否可以支持共享代码。完成标准是记录或实现一种具体的方式来复用这些处理程序。
由索引模型根据 Issue 内容生成。
描述
Hi, I'm from AWS IoT, we have a question/feature request.
Our handlers across different resources use the same code for exception translations and listing resource tags. These resources reside in the same GitHub repository, yet, since each resource has its own Maven project, we're unable to reuse that common code and haven't seen solutions in other repositories.
Specific examples from our AWS IoT repo (code is still in PRs):
- Exception translation code - link. We have this method in the Translator class for each resource.
listTagsmethod (calls IoT::ListTagsForResource) - link.
For both of these, we're able to reuse the code between handlers for the same resource, but we had to copy paste this piece of code for each resource.
Is there a solution available for our use case?
- 主要语言
- Java
- 星标
- 30
- 派生
- 48
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws-cloudformation/cloudformation-cli-java-plugin 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. 未关闭
难度 5/5 一周以上 新手友好度 25/100
查看 aws-cloudformation/cloudformation-cli-java-plugin 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
难度 1/5 1 小时以内 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
FasterXML/jackson-databind#6229 ·