Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of setAccessible #1449

Open
scottgerring opened this issue Sep 28, 2023 · 2 comments
Open

Remove usage of setAccessible #1449

scottgerring opened this issue Sep 28, 2023 · 2 comments
Labels
bug Something isn't working priority:3 Neutral - not a core feature or affects less than 40% of users v2 Version 2
Milestone

Comments

@scottgerring
Copy link
Contributor

scottgerring commented Sep 28, 2023

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
@scottgerring scottgerring added bug Something isn't working priority:3 Neutral - not a core feature or affects less than 40% of users labels Sep 28, 2023
@scottgerring
Copy link
Contributor Author

For the metrics one, what are we doing in the v2 rewrite #1405 ? We certainly shouldn't introduce this again.

@scottgerring
Copy link
Contributor Author

For the SQS one, we might be able to ignore it; we have deprecated it and introduced the new SQS libraries #1317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:3 Neutral - not a core feature or affects less than 40% of users v2 Version 2
Projects
None yet
Development

No branches or pull requests

1 participant