Illegal Reflective Access Operation to field java.net.HttpURLConnection.method
See original GitHub issueDescribe the bug I attempt to archive a repository using the following code:
GHRepository repo = this.org.getRepository("repo-name-here");
repo.archive();
When checking GitHub itself, the repository is in fact archived, however I receive a warning in the stderr stream consisting of the following:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.kohsuke.github.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo (file:/C:/Users/andrew/.m2/repository/org/kohsuke/github-api/1.108/github-api-1.108.jar) to field java.net.HttpURLConnection.method
WARNING: Please consider reporting this to the maintainers of org.kohsuke.github.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo
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
To Reproduce Steps to reproduce the behavior:
- Fetch a
GHRepository
that is not yet archived. - Call
archive()
on that repository.
Expected behavior I expect that there should not be any illegal reflective access exceptions.
Desktop (please complete the following information):
- OS: Windows 10
- Browser Firefox
- Version 74
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Illegal reflective access operation warning occurs when using ...
Hi! My script creates a simple GET request: #!/usr/bin/env clj (import java.net.URL) (let [connection (.
Read more >Java 9 Illegal Reflective Access Warning - Baeldung
The accessibility of modules is a finer concept and cares if one class can access another class's field or method.
Read more >Developers - Illegal Reflective Access Operation to field java.net ...
Illegal Reflective Access Operation to field java.net.HttpURLConnection.method · Describe the bug. I attempt to archive a repository using the following code:
Read more >An illegal reflective access operation has occurred when ...
You will see An illegal reflective access operation has occurred warning when installing and using AM (including Amster and ssoadm tools), Java ......
Read more >Java 1.9 Reflection and Package Access Changes - Evil Tester
Since I new that the requests field on the URLConnection had the information that I needed, I simply used reflection to go and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @bitwiseman 😄 ! I’ll give it a try tomorrow, it’s close to midnight where I am right now. Will report back as soon as I have something conclusive.
Thanks @bitwiseman! These are the relevant kotlin changes I was able to do based on your input:
additional dependency using kotlin dsl (build.gradle.kts)
some kt file