Shanliang,
Let's say the delgationSubject is null and there is previous connection
cached (nullSubjectConn != null && nullSubjectConn.get() != null) so
you hit:
2016: conn = nullSubjectConn.get();
but before you get the object a GC occurs and clears reference, then
getConnectionWithSubject would return null.
Shouldn't you assign to nullSubjectConn.get() to variable so the
reference is kept alive? Or it OK to return null?
Also, is the
2020: if (wr != null) {
necessary?
Thanks
Erik
nullSibwhen you hit the second if-statement
happens
shanliang skrev 2013-08-20 17:35:
webrev: http://cr.openjdk.java.net/~sjiang/JDK-6566891/00/
shanliang wrote:
Hi,
Please review:
webrev:
http://amos.fr.oracle.com/jmgt/user/sjiang/webrevs/jdk8-6566891/00/
bug: https://jbs.oracle.com/bugs/browse/JDK-6566891
I have passed JCK tests and unit tests.
Thanks,
Shanliang