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

Wrap calls to setAccessible in try-catch #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicky9door
Copy link
Contributor

@nicky9door nicky9door commented Jan 21, 2022

This is an alternative fix for #173 where the call to setAccessible is wrapped in a try-catch. I am catching Exception instead of InaccessibleObjectException since the latter is only available since Java 9. This way, the code remains backwards compatible with Java 8

Feel free to choose between this PR or #177

@EugenCepoi
Copy link
Contributor

I have a strong preference for the other way of doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants