Thread.getContextClassLoader () == null?

Maybe Thread.getContextClassLoader()zero? Javadok is not very clear.
Should the library take this case into account?

Update: the reason I asked is that it beansbinding.dev.java.netdoesn't work in this case (and my code doessetContextClassLoader(null)

+5
source share
2 answers

Java threads created from JNI code in a thread other than java have an empty ContextClassloader unless the creator explicitly sets it.

Also in this context, Thread.currentThread () returns null.

+9
source

, , - Thread.setContextClassLoader(null), IMO .

+4

All Articles