Code review request, 8022487 DEREncodedKeyValue.supportedKeyTypes should be private

Sean Mullan sean.mullan at oracle.com
Fri Aug 9 14:52:30 UTC 2013


Looks fine to me.

--Sean

On 08/08/2013 09:38 PM, Xuelei Fan wrote:
> Hi,
>
> Please review this simple fix in xml security implementation.
>
> webrev: http://cr.openjdk.java.net/~xuelei/8022487/webrev.00/
>
> In
> com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java,
> the attribute is declared as public:
>
> public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
>
> But it is never used in other places.  It's better to declare it as
> private to minimize the scope of this variable.
>
> The fix is pretty simple:
>
> -    public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
> +    private static final String supportedKeyTypes[] = { "RSA", "DSA",
> "EC"};
>
> Thanks,
> Xuelei
>




More information about the security-dev mailing list