I will make it package protected, thanks for your contribution.

Colm.


On Tue, Aug 13, 2013 at 9:18 AM, Xuelei Fan <[email protected]> wrote:

> Hi,
>
> In package org.apache.xml.security.keys.**content, field
> DEREncodedKeyValue.**supportedKeyTypes is declared as public:
>
>     public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
>
> However, the field is never used in other classes.  It's better to declare
> it as private to minimize the scope of this variable. Otherwise, FindBugs
> would complain that "Field should be package protected".
>
> Here is the simple patch:
>
> $ svn  diff DEREncodedKeyValue.java
> Index: DEREncodedKeyValue.java
> ==============================**==============================**=======
> --- DEREncodedKeyValue.java     (revision 1513379)
> +++ DEREncodedKeyValue.java     (working copy)
> @@ -38,7 +38,7 @@
> public class DEREncodedKeyValue extends Signature11ElementProxy implements
> KeyInfoContent {
>
>      /** JCA algorithm key types supported by this implementation. */
> -    public static final String supportedKeyTypes[] = { "RSA", "DSA",
> "EC"};
> +    private static final String supportedKeyTypes[] = { "RSA", "DSA",
> "EC"};
>
>      /**
>       * Constructor DEREncodedKeyValue
>
>
> Regards,
> Xuelei Fan
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to