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 URLStreamHandlerRuntime #471

Merged
merged 1 commit into from Jun 17, 2020
Merged

Remove URLStreamHandlerRuntime #471

merged 1 commit into from Jun 17, 2020

Conversation

Godin
Copy link
Member

@Godin Godin commented Dec 14, 2016

I propose to remove org.jacoco.core.runtime.URLStreamHandlerRuntime for the following reasons:

  • won't work in JDK 9 and actually already doesn't work with EA b148 due to use of setAccessible for private field java.net.URL#handlers
  • has lower performance than org.jacoco.core.runtime.ModifiedSystemClassRuntime that is used by default and than org.jacoco.core.runtime.SystemPropertiesRuntime
  • not used by default

@marchof
Copy link
Member

marchof commented Dec 10, 2016

@Godin Ok for me!

@Godin Godin self-assigned this Dec 10, 2016
@Godin Godin added this to the 0.7.9 milestone Dec 10, 2016
@Godin
Copy link
Member Author

Godin commented Dec 11, 2016

As a note: seems that setAccessible can be used by agents in JDK 9 - see #ReflectiveAccessByInstrumentationAgents ( Instrumentation.redefineModule )

@Godin Godin force-pushed the issue-471 branch 2 times, most recently from cf60ebd to 7bd5474 Compare December 14, 2016 02:00
@Godin Godin removed this from the 0.7.9 milestone Jan 27, 2017
Copy link
Member

@marchof marchof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Godin Good for me to merge this if this is still required,

needs to access internal members of the <code>java.net.URL</code> class.</li>
needs to access internal members of the <code>java.net.URL</code> class
and thus will require additional modifications to work with JDK 9
(at least was required for EA b148), so has been removed in 0.7.9.</li>
Copy link
Member

@marchof marchof Jul 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next JaCoCo release is 0.8.0

@Godin Godin added this to IN PROGRESS in Current work items Oct 19, 2017
@Godin Godin removed this from IN PROGRESS in Current work items Dec 21, 2017
@marchof
Copy link
Member

marchof commented May 5, 2020

@Godin What about merging this old PR? In the meantime we get this build warning for >= Java 9:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jacoco.core.runtime.URLStreamHandlerRuntime (file:/workspace/org.jacoco.core/target/org.jacoco.core-0.8.6-SNAPSHOT.jar) to field java.net.URL.handlers
WARNING: Please consider reporting this to the maintainers of org.jacoco.core.runtime.URLStreamHandlerRuntime
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

@marchof
Copy link
Member

marchof commented May 19, 2020

@Godin I rebased this old PR on master. Can you please review?

@marchof marchof added this to Implementation in Current work items via automation May 20, 2020
@marchof marchof moved this from Implementation to Review in Current work items May 20, 2020
* uses reflection to access internal members of the java.net.URL class
* not used by default
* has lower performance than ModifiedSystemClassRuntime that is used by
  default and than SystemPropertiesRuntime
@marchof marchof merged commit 2a75e0d into master Jun 17, 2020
Current work items automation moved this from Review to Done Jun 17, 2020
@marchof marchof deleted the issue-471 branch June 17, 2020 20:45
@Godin
Copy link
Member Author

Godin commented Jun 18, 2020

@marchof thanks for rebasing and merging this! 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants