-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
StackOverflowError when using URLStreamHandlerFactory in WebAppClassloader #1448
Comments
Been able to reproduce in a simple testcase. |
There is still a StackOverflowError present, this time from the following code path ...
|
…om() + Replaced with URI TypeUtil.getLocationOfClass(Class clazz) + and File TypeUtil.getLocationOfClassAsFile(Class clazz) + This is done to eliminate extraneous "new URL" and "URI.toURL" calls that can trigger URL Stream Handler creation and initialization which is the cause of the StackOverflowError
@joakime great that this seems to work, however can you explain how it is working, when I still see references to URL in the new TypeUtil.getLocationOfClass method? |
…om() + Replaced with URI TypeUtil.getLocationOfClass(Class clazz) + and File TypeUtil.getLocationOfClassAsFile(Class clazz) + This is done to eliminate extraneous "new URL" and "URI.toURL" calls that can trigger URL Stream Handler creation and initialization which is the cause of the StackOverflowError
@janbartel The key is The lookup for Internally in the JVM has a static / singleton cache of The working theory that produced that commit is .. if by the time you call |
@gregw tested the new |
If an environment has a URLStreamHandler installed, its possible for a StackOverflowError to occur when in the WebAppClassloader ...
The text was updated successfully, but these errors were encountered: