Skip to content

Remove usage of setAccessible #1449

Open
@scottgerring

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:3Neutral - not a core feature or affects less than 40% of usersv2Version 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions