Code Review for 6998860

Mandy Chung mandy.chung at oracle.com
Wed Dec 8 01:20:35 UTC 2010


  Hi Sean,

On 12/7/10 12:47 PM, Sean Mullan wrote:
> Hi Mandy,
>
> Could I get a code review for 6998860:
>
> http://cr.openjdk.java.net/~mullan/6998860/webrev.00/
>
Is Providers.getSunProvider() specified to create a new instance of the 
provider every time it's called?   I would assume that the runtime 
should create only one single instance of the Sun provider.

In the comment of the sun.security.jca.Providers.getSunProvider() 
method, this method is called in two places.

     // Return to Sun provider or its backup.
     // This method should only be called by
     // sun.security.util.ManifestEntryVerifier and java.security.SecureRandom.
     public static Provider getSunProvider() {

Is it correct to change this method to cache and return a singleton object?

Mandy



More information about the security-dev mailing list