Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-02-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, > On 01/02/2012 11:50, Ivan wrote: >> 2012/2/1 Christopher Schultz >> >> Of course, you still need to check for null after the loop, so >> it's not like the change really affects anything other than minor >> readability. > > No sure whether I

Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-02-01 Thread Pid
On 01/02/2012 11:50, Ivan wrote: Here's what the reply should have looked like, without the top-posting. > 2012/2/1 Christopher Schultz > > Ivan, > > On 1/27/12 11:40 PM, Ivan wrote: if (result != null) return result; // Checking thread biding result = threadBindings.get(cu

Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-02-01 Thread Ivan
No sure whether I understood you clearly, if a context is binding on the current thread, and current context classloader has parent classloader, current get method will throw an IllegalStateException. So my question is that, in this scenario, should the context binded on the thread be ignored ? I

Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-01-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan, On 1/27/12 11:40 PM, Ivan wrote: > if (result != null) return result; > > // Checking thread biding result = > threadBindings.get(currentThread); <-- Here, the value > from threadBindings is always ignored ? is there something like

Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-01-28 Thread Ivan
So is the current behavior by design, or it is a defect ? 2012/1/28 Ivan > 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. > > 2

Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-01-27 Thread Ivan
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 > > From: Ivan [mailto:xhh...@gmail.com] > > Subject:

RE: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?

2012-01-27 Thread Caldarale, Charles R
> 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