Re: Code Review Request JDK-8129988 JSSE should create a single instance of the cacerts KeyStore

2017-01-05 Thread Sean Mullan
265 if (descriptor.equals(temporaryDesc) && (ks != null)) { Not sure if JVM will optimize this, but probably better to check if ks != null first, and avoid calling equals unless necessary: 265 if (ks != null && descriptor.equals(temporaryDesc)) { Also, similar comment

Re: Code Review Request JDK-8129988 JSSE should create a single instance of the cacerts KeyStore

2017-01-05 Thread Xuelei Fan
Thanks for the comments. http://cr.openjdk.java.net/~xuelei/8129988/webrev.05/ I re-write the getTrustedCerts() implementation. It looks more compact now. Thanks, Xuelei On 1/5/2017 8:13 AM, Sean Mullan wrote: 265 if (descriptor.equals(temporaryDesc) && (ks != null)) { Not s

Re: Code Review Request JDK-8129988 JSSE should create a single instance of the cacerts KeyStore

2017-01-05 Thread Sean Mullan
if ((certs != null) && descriptor.equals(temporaryDesc)) { return certs; } else if (certs != null) { // use new descriptor This would be more readable as: if (certs != null) { if (descriptor.equals(temporaryDesc)) {

Code Review Request JDK-8172273, SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException

2017-01-05 Thread Xuelei Fan
Hi, Please review an implementation mistakes while converting SSLv2Hello message to SSL/TLS ClientHello message. http://cr.openjdk.java.net/~xuelei/8172273/webrev.00/ Thanks, Xuelei

Re: Code Review Request JDK-8172273, SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException

2017-01-05 Thread Bradford Wetmore
Looks good. Thanks, Brad On 1/5/2017 3:10 PM, Xuelei Fan wrote: Hi, Please review an implementation mistakes while converting SSLv2Hello message to SSL/TLS ClientHello message. http://cr.openjdk.java.net/~xuelei/8172273/webrev.00/ Thanks, Xuelei