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

A fix for IDEA-283250: CommandLineWrapper does not defer to the system ClassLoader #2880

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mirrana
Copy link

@mirrana mirrana commented Nov 14, 2024

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 of URLClassLoader 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 to ClassLoader.getSystemClassLoader().

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