Note that I removed VMObjectInputStream.currentClassLoader() and added
VMStackWalker.firstNonNullClassLoader(). They are not identical, because
VMObjectInputStream.currentClassLoader() used to return the thread
context class loader if it couldn't find any non-null class loader on
the stack, but firstNonNullClassLoader() doesn't do this. I could think
of no good reason for the old behavior, so I removed it.


In the case when the thread is created and started inside the bootstrap classes, it may be no any user class on the stack. Without using thread context class loader, it may not be possible to locate any class of the user application that is currently running (the class name is frequently specified via system properties). The CORBA implementation can instantiate the user - defined interceptor, helper and holder classes only with the help of the thread context class loader, as it is doing instantiation from the threads running with no user classes on the stack.

If you want to remove the context class loader somewhere, please be sure what the similar situation will never be the case.

Audrius.


Reply via email to