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
PlatformDependent#getClassLoader fails in restrictive classloader env… #6251
Conversation
@jesperpedersen - please verify this fix. Also I'm not sure why you get |
} catch (ClassNotFoundException e) { | ||
// This should not happen just ignore | ||
} catch (Throwable cause) { | ||
logger.debug("Unexpected exception", cause); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Scottmitch can you use some better logging message ?
Maybe something like Unexpected exception while loading class {}
, class, cause)`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@Scottmitch one nit... |
This works, with the following log message:
|
@jesperpedersen - Thanks for verifying. That warning makes sense ... as I said I'm still not sure why the class loading would fail in your environment. |
…ironment Motivation: netty#6042 only addressed PlatformDependent#getSystemClassLoader but getClassLoader is also called in an optional manner in some common code paths but fails to catch a general enough exception to continue working. Modifications: - Calls to getClassLoader which can continue if results fail should catch Throwable Result: More resilient code in the presense of restrictive class loaders. Fixes netty#6246.
bd99019
to
61da6df
Compare
…ironment
Motivation:
#6042 only addressed PlatformDependent#getSystemClassLoader but getClassLoader is also called in an optional manner in some common code paths but fails to catch a general enough exception to continue working.
Modifications:
Result:
More resilient code in the presense of restrictive class loaders.
Fixes #6246.