diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-12 23:25:43 -0600 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-18 12:56:06 -0600 |
commit | 84e512223229b2d54e1a04b7899f888732c8fdba (patch) | |
tree | 33c022adbd60ce1103d0f0c97fcfc1e229a86643 /pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java | |
parent | 2a535f04f7b7bf670b19b95801e25178af5c91f9 (diff) | |
download | pki-84e512223229b2d54e1a04b7899f888732c8fdba.tar.gz pki-84e512223229b2d54e1a04b7899f888732c8fdba.tar.xz pki-84e512223229b2d54e1a04b7899f888732c8fdba.zip |
Added generics (part 2).
This patch brings down the warnings from 4648 to 3992.
Ticket #2
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java index 14cd9ece4..9bb806eba 100644 --- a/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java +++ b/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java @@ -52,7 +52,7 @@ import com.netscape.cms.policy.APolicyRule; */ public class KeyAlgorithmConstraints extends APolicyRule implements IEnrollmentPolicy, IExtendedPluginInfo { - private Vector mAlgorithms; + private Vector<String> mAlgorithms; private final static String DEF_KEY_ALGORITHM = "RSA,DSA"; private final static String PROP_ALGORITHMS = "algorithms"; private final static String[] supportedAlgorithms = @@ -96,7 +96,7 @@ public class KeyAlgorithmConstraints extends APolicyRule public void init(ISubsystem owner, IConfigStore config) throws EPolicyException { - mAlgorithms = new Vector(); + mAlgorithms = new Vector<String>(); if (config == null || config.size() == 0) { mAlgorithms.addElement(DEF_KEY_ALGORITHM); @@ -130,9 +130,9 @@ public class KeyAlgorithmConstraints extends APolicyRule } // Check if configured algorithms are supported. - for (Enumeration e = mAlgorithms.elements(); e.hasMoreElements();) { + for (Enumeration<String> e = mAlgorithms.elements(); e.hasMoreElements();) { int i; - String configuredAlg = (String) e.nextElement(); + String configuredAlg = e.nextElement(); // See if it is a supported algorithm. for (i = 0; i < supportedAlgorithms.length; i++) { @@ -200,12 +200,12 @@ public class KeyAlgorithmConstraints extends APolicyRule * * @return nvPairs A Vector of name/value pairs. */ - public Vector getInstanceParams() { - Vector v = new Vector(); + public Vector<String> getInstanceParams() { + Vector<String> v = new Vector<String>(); StringBuffer sb = new StringBuffer(); - for (Enumeration e = mAlgorithms.elements(); e.hasMoreElements();) { - sb.append((String) e.nextElement()); + for (Enumeration<String> e = mAlgorithms.elements(); e.hasMoreElements();) { + sb.append(e.nextElement()); sb.append(","); } if (sb.length() > 0) |