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

Sean Mullan sean.mullan at
Thu Jan 5 16:13:48 UTC 2017

  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 for getTrustedCerts -- you should first check if csRef.get() is null.
If it is null, then you don't have to check the TrustStoreDescriptor, you can go straight to
reloading the keystore and getting the certs.

No other comments.


On 1/4/2017 8:17 PM, Xuelei Fan wrote:
> New webrev:

More information about the security-dev mailing list