Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Reusing code between resources

Open
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

Research direction

Start with the linked AWS IoT examples in Translator.java and HandlerUtils.java, focusing on the exception translation and listTags methods that are duplicated across resource Maven projects. Then inspect how this Java plugin generates separate projects and determine whether shared code can be supported. Done means documenting or implementing a concrete reuse approach for these handlers.

Written by the indexing model from the issue text.

Description

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):

  1. Exception translation code - link. We have this method in the Translator class for each resource.
  2. listTags method (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?

Dominant language
Java
Stars
30
Forks
48
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-cloudformation/cloudformation-cli-java-plugin

All issues in aws-cloudformation/cloudformation-cli-java-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.