A fix for IDEA-283250: CommandLineWrapper does not defer to the system ClassLoader #2880
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some time ago I submitted a bug report that was initially attributed to GWT but is actually more fundamental than that. My report appears to have been ignored after a couple of initial back-and-forth messages.
In order to continue to debug our application using IntelliJ, I have been manually patching the java-runtime library (idea_rt.jar) in my own installs after each upgrade. I would like to include this change in the baseline so that it continues to work out of the box.
At issue is the fact that the GWT plugin uses
CommandLineWrapper
from the java-runtime module to get around an issue with a long classpath.CommandLineWrapper
creates a new instance ofURLClassLoader
and passes in an array of URLs but does not link it to the system ClassLoader.This was previously not an issue, however an update to the default behavior of the JVM starting with JDK 8u171 caused unexpected and breaking behavior in our application. We use a serialized JCEKS keystore in our application and deserializing said keystore fails when debugging our application using IntelliJ. See https://stackoverflow.com/a/52593341 for more details about the core issue.
This fix simply joins the URLClassLoader created within
CommandLineWrapper.java
toClassLoader.getSystemClassLoader()
.