Yes, but guess that getParent() will not be null in most scenarios :-) And if the thread binding value is expected to be returned while no classloader binding, think the codes should be in the end of the method.
2012/1/28 Caldarale, Charles R <chuck.caldar...@unisys.com> > > From: Ivan [mailto:xhh...@gmail.com] > > Subject: Correct behavior while checking the thread binding in > DirContextURLStreamHandler ? > > > result = threadBindings.get(currentThread); > > <-------------- Here, the value from threadBindings is always ignored ? > > No, it's not always ignored. If > currentThread.getContextClassLoader().getParent() is null, the value from > ghreadBindings.get() will be returned. Of course, I don't know if the > getParent() call can ever return null; that might well depend on actions > taken inside the webapp application code. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail and > its attachments from all computers. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Ivan