Skip to content

Reusing code between resources #335

Description

@anton-aws

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions