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

Illegal Reflective Access Warning #85

Open
thewalrusisben opened this issue Jan 9, 2020 · 0 comments
Open

Illegal Reflective Access Warning #85

thewalrusisben opened this issue Jan 9, 2020 · 0 comments

Comments

@thewalrusisben
Copy link
Contributor

When attempting to make a PATCH request (sendPayload method call), the following warning message is output:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.messagebird.MessageBirdServiceImpl (file:/Users/bensweeney23/dev/java-rest-api/examples/target/examples-3.0.6-jar-with-dependencies.jar) to field java.net.HttpURLConnection.methods
WARNING: Please consider reporting this to the maintainers of com.messagebird.MessageBirdServiceImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

The issue appears to originate from inside of the allowPatchRequestsIfNeeded method, which does the following:

Field methodsField = HttpURLConnection.class.getDeclaredField("methods");
methodsField.setAccessible(true);

This didn't cause issues for me using the SDK, but it could for future users!

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

No branches or pull requests

1 participant