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

Xuelei Fan xuelei.fan at oracle.com
Thu Jan 5 17:32:08 UTC 2017


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 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.
>
> --Sean
>
> On 1/4/2017 8:17 PM, Xuelei Fan wrote:
>> New webrev:
>>
>> http://cr.openjdk.java.net/~xuelei/8129988/webrev.04/
>



More information about the security-dev mailing list