Code review request, 8022487 DEREncodedKeyValue.supportedKeyTypes should be private

Xuelei Fan xuelei.fan at oracle.com
Thu Aug 8 21:38:55 PDT 2013


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