-
Bug
-
Resolution: Done
-
Critical
-
None
We just need to detect the null class loader and return null.
This was originally discovered in a call stack like: -
Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) at org.wildfly.security.auth.server.SecurityDomain.getCurrent(SecurityDomain.java:171) at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74) at org.jboss.weld.tests.event.async.context.security.Printer$$$view2.print(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
So in general calls where the context class loader is not set are at risk of this NPE, the fix is to simply check for null.
Also ElytronXmlParser assumes it is always available.
- clones
-
ELY-1362 NullPointerException if Thread.getContextClassLoader() returns null
- Resolved
- is incorporated by
-
JBEAP-12930 Upgrade WildFly Elytron to 1.1.2.Final
- Closed