Skip to content

Remove usage of setAccessible #1449

Description

@scottgerring

We use java.lang.reflect.AcessibleObject#setAccessible to reflectively access fields in both the matrics and SQS utilities. We should try and remove this, if we can.

What were you trying to accomplish?

Expected Behavior

No need to reflectively access private object information in the libraries themselves. In tests this is fine.

Current Behavior

Examples:

Possible Solution

We can either 1/ find a way to avoid the need or 2/ say "this is too hard, we will remove it in V2 by changing the interface". However we should be confident that there is no way forward with the existing interface.

Steps to Reproduce (for bugs)

Environment

  • Powertools for AWS Lambda (Java) version used: 1.17.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions