From 67e0e65fdd9e83f79cd4469d67b3da88337ab714 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Thu, 12 Jan 2012 23:25:43 -0600
Subject: [PATCH] Added generics (part 2).

This patch brings down the warnings from 4648 to 3992.

Ticket #2
---
 .../certsrv/dbs/certdb/ICertRecordList.java        |    2 +-
 .../certsrv/dbs/certdb/ICertificateRepository.java |   14 ++--
 .../netscape/certsrv/request/AgentApprovals.java   |   10 +-
 .../src/com/netscape/certsrv/util/StatsEvent.java  |   18 ++--
 .../com/netscape/cms/authentication/CMCAuth.java   |    4 +-
 .../netscape/cms/authentication/FlatFileAuth.java  |   38 ++++----
 .../netscape/cms/authentication/HashAuthData.java  |   26 +++---
 .../cms/authentication/HashAuthentication.java     |    4 +-
 .../netscape/cms/authentication/PortalEnroll.java  |   12 +-
 .../src/com/netscape/cms/jobs/PublishCertsJob.java |    2 +-
 .../netscape/cms/jobs/RenewalNotificationJob.java  |    4 +-
 .../com/netscape/cms/jobs/UnpublishExpiredJob.java |    2 +-
 .../src/com/netscape/cms/ocsp/LDAPStore.java       |   18 ++--
 .../constraints/KeyAlgorithmConstraints.java       |   16 ++--
 .../cms/profile/common/CAEnrollProfile.java        |    4 +-
 .../constraint/ExtendedKeyUsageExtConstraint.java  |    6 +-
 .../cms/profile/constraint/NoConstraint.java       |    4 +-
 .../profile/constraint/UniqueKeyConstraint.java    |    4 +-
 .../cms/profile/def/AuthInfoAccessExtDefault.java  |    6 +-
 .../profile/def/ExtendedKeyUsageExtDefault.java    |    5 +-
 .../com/netscape/cms/profile/def/NoDefault.java    |    4 +-
 .../netscape/cms/profile/input/EnrollInput.java    |    8 +-
 .../netscape/cms/profile/input/GenericInput.java   |    4 +-
 .../publish/publishers/LdapCertSubjPublisher.java  |    5 +-
 .../publish/publishers/LdapUserCertPublisher.java  |   10 +-
 .../netscape/cms/servlet/admin/AdminServlet.java   |   32 ++++---
 .../cms/servlet/admin/AuthCredentials.java         |   10 +-
 .../netscape/cms/servlet/admin/CAAdminServlet.java |   97 +++++++++++---------
 .../cms/servlet/admin/JobsAdminServlet.java        |   22 ++---
 .../cms/servlet/admin/KRAAdminServlet.java         |    5 +-
 .../cms/servlet/admin/OCSPAdminServlet.java        |   12 ++-
 .../cms/servlet/admin/PolicyAdminServlet.java      |   44 +++++-----
 .../cms/servlet/base/DynamicVariablesServlet.java  |   14 ++--
 .../com/netscape/cms/servlet/base/GetStats.java    |    4 +-
 .../cms/servlet/cert/CMCRevReqServlet.java         |    2 +-
 .../servlet/cert/ChallengeRevocationServlet1.java  |    2 +-
 .../com/netscape/cms/servlet/cert/DisplayCRL.java  |    4 +-
 .../com/netscape/cms/servlet/cert/DoUnrevoke.java  |    5 +-
 .../netscape/cms/servlet/cert/DoUnrevokeTPS.java   |    5 +-
 .../netscape/cms/servlet/cert/EnrollServlet.java   |    2 +-
 .../netscape/cms/servlet/cert/GetEnableStatus.java |    4 +-
 .../src/com/netscape/cms/servlet/cert/GetInfo.java |    4 +-
 .../cms/servlet/cert/HashEnrollServlet.java        |    2 +-
 .../com/netscape/cms/servlet/cert/ListCerts.java   |    2 +-
 .../src/com/netscape/cms/servlet/cert/Monitor.java |    2 +-
 .../com/netscape/cms/servlet/cert/UpdateDir.java   |   14 +--
 .../cms/servlet/common/AuthCredentials.java        |   10 +-
 .../netscape/cms/servlet/common/CMSFileLoader.java |    6 +-
 .../netscape/cms/servlet/common/CMSGateway.java    |    4 +-
 .../netscape/cms/servlet/common/CMSRequest.java    |    6 +-
 .../cms/servlet/common/GenErrorTemplateFiller.java |    6 +-
 .../servlet/common/GenRejectedTemplateFiller.java  |    6 +-
 .../netscape/cms/servlet/csadmin/BaseServlet.java  |    4 +-
 .../cms/servlet/csadmin/CertRequestPanel.java      |    6 +-
 .../cms/servlet/csadmin/ConfigBaseServlet.java     |    5 +-
 .../cms/servlet/csadmin/ConfigHSMServlet.java      |   28 +++---
 .../cms/servlet/csadmin/DatabasePanel.java         |   15 ++-
 .../cms/servlet/csadmin/GetConfigEntries.java      |    2 +-
 .../netscape/cms/servlet/csadmin/GetDomainXML.java |    5 +-
 .../netscape/cms/servlet/csadmin/ModulePanel.java  |   34 ++++---
 .../netscape/cms/servlet/csadmin/NamePanel.java    |   20 ++--
 .../cms/servlet/csadmin/WizardPanelBase.java       |   12 +-
 .../cms/servlet/key/GetApprovalStatus.java         |    8 +-
 .../cms/servlet/profile/ProfileApproveServlet.java |   15 ++--
 .../cms/servlet/profile/ProfileListServlet.java    |    2 +-
 .../cms/servlet/profile/ProfileProcessServlet.java |   15 ++--
 .../cms/servlet/profile/ProfileReviewServlet.java  |   26 +++---
 .../cms/servlet/profile/ProfileSelectServlet.java  |   28 +++---
 .../cms/servlet/profile/ProfileServlet.java        |   12 +-
 .../servlet/profile/ProfileSubmitCMCServlet.java   |   37 ++++----
 .../com/netscape/cmscore/apps/CommandQueue.java    |    3 +-
 .../com/netscape/cmscore/base/FileConfigStore.java |    6 +-
 .../com/netscape/cmscore/base/PropConfigStore.java |   51 +++++-----
 .../cmscore/cert/CrossCertPairSubsystem.java       |   15 ++-
 .../netscape/cmscore/connector/HttpPKIMessage.java |    9 +-
 .../com/netscape/cmscore/dbs/ByteArrayMapper.java  |    4 +-
 .../cmscore/dbs/CRLIssuingPointRecord.java         |    6 +-
 .../com/netscape/cmscore/dbs/CertRecordMapper.java |    4 +-
 .../cmscore/dbs/CertificateRepository.java         |   86 +++++++++---------
 .../com/netscape/cmscore/dbs/DateArrayMapper.java  |   12 +-
 .../src/com/netscape/cmscore/dbs/DateMapper.java   |    4 +-
 .../com/netscape/cmscore/dbs/IntegerMapper.java    |    4 +-
 .../src/com/netscape/cmscore/dbs/KeyRecord.java    |    6 +-
 .../com/netscape/cmscore/dbs/KeyRecordList.java    |   12 +-
 .../com/netscape/cmscore/dbs/KeyRecordMapper.java  |    4 +-
 .../com/netscape/cmscore/dbs/KeyStateMapper.java   |    4 +-
 .../src/com/netscape/cmscore/dbs/LongMapper.java   |    4 +-
 .../com/netscape/cmscore/dbs/MetaInfoMapper.java   |   13 ++-
 .../netscape/cmscore/ldap/LdapPredicateParser.java |    4 +-
 .../netscape/cmscore/ldap/LdapPublishModule.java   |    4 +-
 .../cmscore/notification/EmailResolverKeys.java    |   10 +-
 .../cmscore/policy/PolicyPredicateParser.java      |    4 +-
 .../netscape/cmscore/request/RequestRecord.java    |    2 +-
 .../com/netscape/cmscore/security/PWsdrCache.java  |   24 +++---
 .../certsrv/request/AgentApprovalsTest.java        |    2 +-
 .../com/netscape/cmscore/dbs/DBRegistryTest.java   |    2 +-
 .../request/DBDynAttrMapperDefaultStub.java        |    2 +-
 .../src/com/netscape/cmstools/PasswordCache.java   |   30 +++---
 .../ocsp/src/com/netscape/ocsp/OCSPAuthority.java  |    2 +-
 .../src/com/netscape/cmsutil/http/HttpMessage.java |   16 ++--
 .../com/netscape/cmsutil/radius/AttributeSet.java  |    6 +-
 .../src/com/netscape/cmsutil/xml/XMLObject.java    |    4 +-
 .../util/src/netscape/security/acl/GroupImpl.java  |   12 +-
 .../netscape/security/pkcs/PKCS10Attributes.java   |   32 +++---
 .../util/src/netscape/security/x509/Attribute.java |   34 +++----
 105 files changed, 647 insertions(+), 620 deletions(-)

diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
index 5db7e473e32ce1fd39e8228c4f0aa6e541961ac9..59a826ee225f29701361280e2e74a6a67f081ebc 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
@@ -78,7 +78,7 @@ public interface ICertRecordList {
      * @param endidx ending index
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getCertRecords(int startidx, int endidx)
+    public Enumeration<ICertRecord> getCertRecords(int startidx, int endidx)
             throws EBaseException;
 
     /**
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
index e354970b0a6a8d8d96db180d3908d7fab02d7add..60f8673682d800e4808790e3c7130d1fa7fabf7b 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
@@ -404,7 +404,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificate records
      * @exception EBaseException failed to retrieve cert records
      */
-    public Enumeration findCertRecs(String filter)
+    public Enumeration<Object> findCertRecs(String filter)
             throws EBaseException;
 
     /**
@@ -438,7 +438,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getValidNotPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getValidNotPublishedCertificates(String from, String to)
             throws EBaseException;
 
     /**
@@ -449,7 +449,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getExpiredPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getExpiredPublishedCertificates(String from, String to)
             throws EBaseException;
 
     /**
@@ -460,7 +460,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getRevokedPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getRevokedPublishedCertificates(String from, String to)
             throws EBaseException;
 
     /**
@@ -471,7 +471,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getValidCertificates(String from, String to)
+    public Enumeration<ICertRecord> getValidCertificates(String from, String to)
             throws EBaseException;
 
     /**
@@ -482,7 +482,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getExpiredCertificates(String from, String to)
+    public Enumeration<ICertRecord> getExpiredCertificates(String from, String to)
             throws EBaseException;
 
     /**
@@ -493,7 +493,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getRevokedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getRevokedCertificates(String from, String to)
             throws EBaseException;
 
     /**
diff --git a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
index 48738d810628badf0af7640c322e3edb605fda98..54277b611d09a319801e7d6db5d3007e77a6578d 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
@@ -82,7 +82,7 @@ public class AgentApprovals
 
         // search
         for (int i = 0; i < mVector.size(); i++) {
-            a = (AgentApproval) mVector.elementAt(i);
+            a = mVector.elementAt(i);
 
             if (a.mUserName.equals(userName))
                 break;
@@ -96,7 +96,7 @@ public class AgentApprovals
      * 
      * @return an enumeration of the agent approvals
      */
-    public Enumeration elements() {
+    public Enumeration<AgentApproval> elements() {
         return mVector.elements();
     }
 
@@ -110,8 +110,8 @@ public class AgentApprovals
      * 
      * @return The string vector.
      */
-    public Vector toStringVector() {
-        Vector retval = new Vector(mVector.size());
+    public Vector<String> toStringVector() {
+        Vector<String> retval = new Vector<String>(mVector.size());
         for (int i = 0; i < mVector.size(); i++) {
             AgentApproval a = (AgentApproval) mVector.elementAt(i);
             retval.add(a.getDate().getTime() + ";" + a.getUserName());
@@ -155,5 +155,5 @@ public class AgentApprovals
         return approvals;
     }
 
-    protected Vector mVector = new Vector();
+    protected Vector<AgentApproval> mVector = new Vector<AgentApproval>();
 }
diff --git a/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java b/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
index 9e004b62980bdb7ee61ee026b67de4c561d73e69..eafd90d059f3126d3bf0a86321c36e1dd33aebb9 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
@@ -34,7 +34,7 @@ public class StatsEvent {
     private long mTimeTaken = 0;
     private long mTimeTakenSqSum = 0;
     private long mNoOfOperations = 0;
-    private Vector mSubEvents = new Vector();
+    private Vector<StatsEvent> mSubEvents = new Vector<StatsEvent>();
     private StatsEvent mParent = null;
 
     public StatsEvent(StatsEvent parent) {
@@ -59,11 +59,11 @@ public class StatsEvent {
     /**
      * Retrieves a list of sub transaction names.
      */
-    public Enumeration getSubEventNames() {
-        Vector names = new Vector();
-        Enumeration e = mSubEvents.elements();
+    public Enumeration<String> getSubEventNames() {
+        Vector<String> names = new Vector<String>();
+        Enumeration<StatsEvent> e = mSubEvents.elements();
         while (e.hasMoreElements()) {
-            StatsEvent st = (StatsEvent) e.nextElement();
+            StatsEvent st = e.nextElement();
             names.addElement(st.getName());
         }
         return names.elements();
@@ -73,9 +73,9 @@ public class StatsEvent {
      * Retrieves a sub transaction.
      */
     public StatsEvent getSubEvent(String name) {
-        Enumeration e = mSubEvents.elements();
+        Enumeration<StatsEvent> e = mSubEvents.elements();
         while (e.hasMoreElements()) {
-            StatsEvent st = (StatsEvent) e.nextElement();
+            StatsEvent st = e.nextElement();
             if (st.getName().equals(name)) {
                 return st;
             }
@@ -89,9 +89,9 @@ public class StatsEvent {
         mNoOfOperations = 0;
         mTimeTaken = 0;
         mTimeTakenSqSum = 0;
-        Enumeration e = getSubEventNames();
+        Enumeration<String> e = getSubEventNames();
         while (e.hasMoreElements()) {
-            String n = (String) e.nextElement();
+            String n = e.nextElement();
             StatsEvent c = getSubEvent(n);
             c.resetCounters();
         }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
index 3098e00160a0a7f9e82d85f48d4bcb888176c6a8..cf57098b651f8964e1ae9dd00bec682b1e23cf41 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
@@ -946,8 +946,8 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
     /**
      * Retrieves a list of names of the value parameter.
      */
-    public Enumeration getValueNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getValueNames() {
+        Vector<String> v = new Vector<String>();
         v.addElement("cert_request");
         return v.elements();
     }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
index 37e076d4a904d5c3fd2c61996f5179ed046a8d86..f60110b0ba993de7d08d259f3ee5236b2cb67c6b 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
@@ -121,7 +121,7 @@ public class FlatFileAuth
      * Hashtable of entries from Auth File. Hash index is the
      * concatenation of the attributes from matchAttributes property
      */
-    protected Hashtable entries = null;
+    protected Hashtable<String, Hashtable<String, String>> entries = null;
 
     /**
      * Get the named property
@@ -241,7 +241,7 @@ public class FlatFileAuth
      */
 
     public String[] unionOfStrings(String[][] stringArrays) {
-        Hashtable ht = new Hashtable();
+        Hashtable<String, String> ht = new Hashtable<String, String>();
 
         for (int i = 0; i < stringArrays.length; i++) {
             String[] sa = stringArrays[i];
@@ -253,10 +253,10 @@ public class FlatFileAuth
         }
 
         String[] s = new String[ht.size()];
-        Enumeration e = ht.keys();
+        Enumeration<String> e = ht.keys();
 
         for (int i = 0; e.hasMoreElements(); i++) {
-            s[i] = (String) e.nextElement();
+            s[i] = e.nextElement();
         }
         return s;
 
@@ -412,7 +412,7 @@ public class FlatFileAuth
      *            key
      * @return a hashtable of hashtables.
      */
-    protected Hashtable readFile(File f, String[] keys)
+    protected Hashtable<String, Hashtable<String, String>> readFile(File f, String[] keys)
             throws IOException {
         log(ILogger.LL_INFO, "Reading file: " + f.getName());
         BufferedReader file = new BufferedReader(
@@ -420,8 +420,8 @@ public class FlatFileAuth
                 );
 
         String line;
-        Hashtable allusers = new Hashtable();
-        Hashtable entry = null;
+        Hashtable<String, Hashtable<String, String>> allusers = new Hashtable<String, Hashtable<String, String>>();
+        Hashtable<String, String> entry = null;
         int linenum = 0;
 
         while ((line = file.readLine()) != null) {
@@ -433,7 +433,7 @@ public class FlatFileAuth
             int colon = line.indexOf(':');
 
             if (entry == null) {
-                entry = new Hashtable();
+                entry = new Hashtable<String, String>();
             }
 
             if (colon == -1) { // no colon -> empty line signifies end of record
@@ -464,8 +464,8 @@ public class FlatFileAuth
         return allusers;
     }
 
-    private void putEntry(Hashtable allUsers,
-            Hashtable entry,
+    private void putEntry(Hashtable<String, Hashtable<String, String>> allUsers,
+            Hashtable<String, String> entry,
             String[] keys) {
         if (entry == null) {
             return;
@@ -474,7 +474,7 @@ public class FlatFileAuth
 
         print("keys.length = " + keys.length);
         for (int i = 0; i < keys.length; i++) {
-            String s = (String) entry.get(keys[i]);
+            String s = entry.get(keys[i]);
 
             print(" concatenating: " + s);
             if (s != null) {
@@ -486,17 +486,17 @@ public class FlatFileAuth
     }
 
     void printAllEntries() {
-        Enumeration e = entries.keys();
+        Enumeration<String> e = entries.keys();
 
         while (e.hasMoreElements()) {
-            String key = (String) e.nextElement();
+            String key = e.nextElement();
 
             print("* " + key + " *");
-            Hashtable ht = (Hashtable) entries.get(key);
-            Enumeration f = ht.keys();
+            Hashtable<String, String> ht = entries.get(key);
+            Enumeration<String> f = ht.keys();
 
             while (f.hasMoreElements()) {
-                String fkey = (String) f.nextElement();
+                String fkey = f.nextElement();
 
                 print("   " + fkey + " -> " + ht.get(fkey));
             }
@@ -509,7 +509,7 @@ public class FlatFileAuth
      * 
      */
 
-    private IAuthToken doAuthentication(Hashtable user, IAuthCredentials authCred)
+    private IAuthToken doAuthentication(Hashtable<String, String> user, IAuthCredentials authCred)
             throws EMissingCredential, EInvalidCredentials, EBaseException {
         AuthToken authToken = new AuthToken(this);
 
@@ -567,7 +567,7 @@ public class FlatFileAuth
         }
         print("authenticating user: finding user from key: " + keyForUser);
 
-        Hashtable user = (Hashtable) entries.get(keyForUser);
+        Hashtable<String, String> user = entries.get(keyForUser);
 
         try {
             if (user != null) {
@@ -660,7 +660,7 @@ public class FlatFileAuth
     /**
      * Retrieves a list of names of the value parameter.
      */
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return null;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/authentication/HashAuthData.java b/pki/base/common/src/com/netscape/cms/authentication/HashAuthData.java
index a2d3bc728329023114e8178dcdcf62850646bddd..3a447d28243808a191e2bfa2e257643cbfda5730 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/HashAuthData.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/HashAuthData.java
@@ -29,7 +29,7 @@ import java.util.Vector;
  * 
  * @version $Revision$, $Date$
  */
-public class HashAuthData extends Hashtable {
+public class HashAuthData extends Hashtable<String, Vector<Object>> {
 
     /**
      *
@@ -42,7 +42,7 @@ public class HashAuthData extends Hashtable {
     }
 
     public String getAgentName(String hostname) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val != null)
             return (String) val.elementAt(0);
@@ -50,17 +50,17 @@ public class HashAuthData extends Hashtable {
     }
 
     public void setAgentName(String hostname, String agentName) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val == null) {
-            val = new Vector();
+            val = new Vector<Object>();
             put(hostname, val);
         }
         val.setElementAt(agentName, 0);
     }
 
     public long getTimeout(String hostname) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val != null) {
             return ((Long) val.elementAt(1)).longValue();
@@ -69,17 +69,17 @@ public class HashAuthData extends Hashtable {
     }
 
     public void setTimeout(String hostname, long timeout) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val == null) {
-            val = new Vector();
+            val = new Vector<Object>();
             put(hostname, val);
         }
         val.setElementAt(Long.valueOf(timeout), 1);
     }
 
     public String getSecret(String hostname) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val != null) {
             return (String) val.elementAt(2);
@@ -88,17 +88,17 @@ public class HashAuthData extends Hashtable {
     }
 
     public void setSecret(String hostname, String secret) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val == null) {
-            val = new Vector();
+            val = new Vector<Object>();
             put(hostname, val);
         }
         val.setElementAt(secret, 2);
     }
 
     public long getLastLogin(String hostname) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val != null) {
             return ((Long) val.elementAt(3)).longValue();
@@ -107,10 +107,10 @@ public class HashAuthData extends Hashtable {
     }
 
     public void setLastLogin(String hostname, long lastLogin) {
-        Vector val = (Vector) get(hostname);
+        Vector<Object> val = get(hostname);
 
         if (val == null) {
-            val = new Vector();
+            val = new Vector<Object>();
             put(hostname, val);
         }
         val.setElementAt(Long.valueOf(lastLogin), 3);
diff --git a/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
index a0199a9be2059e9b1a220cdf874aab50a1db693b..4aae1f15954f31f7759a36e2b9734d872e7c5fe8 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
@@ -123,7 +123,7 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
 
     public void createEntry(String host, String dn, long timeout,
             String secret, long lastLogin) {
-        Vector v = new Vector();
+        Vector<Object> v = new Vector<Object>();
 
         v.addElement(dn);
         v.addElement(Long.valueOf(timeout));
@@ -193,7 +193,7 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
         return false;
     }
 
-    public Enumeration getHosts() {
+    public Enumeration<String> getHosts() {
         return mHosts.keys();
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
index e2c3ec8717adb85449518941b7d883fb80d75315..8049ffb11891c7103deef11edfeca46f81e44cd1 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
@@ -355,14 +355,14 @@ public class PortalEnroll extends DirBasedAuthentication {
             attr.addValue((String) objectclass_values.elementAt(i));
         attrs.add(attr);
 
-        Enumeration objClasses = mRequiredAttrs.elements();
-        Enumeration attrnames = null;
+        Enumeration<Enumeration<String>> objClasses = mRequiredAttrs.elements();
+        Enumeration<String> attrnames = null;
 
         while (objClasses.hasMoreElements()) {
-            attrnames = (Enumeration) objClasses.nextElement();
+            attrnames = objClasses.nextElement();
             CMS.debug("PortalEnroll: Required attrs:");
             while (attrnames.hasMoreElements()) {
-                String attrname = (String) attrnames.nextElement();
+                String attrname = attrnames.nextElement();
                 String attrval = null;
 
                 CMS.debug("PortalEnroll: attrname is: " + attrname);
@@ -385,10 +385,10 @@ public class PortalEnroll extends DirBasedAuthentication {
         attrnames = null;
 
         while (objClasses.hasMoreElements()) {
-            attrnames = (Enumeration) objClasses.nextElement();
+            attrnames = objClasses.nextElement();
             CMS.debug("PortalEnroll: Optional attrs:");
             while (attrnames.hasMoreElements()) {
-                String attrname = (String) attrnames.nextElement();
+                String attrname = attrnames.nextElement();
                 String attrval = null;
 
                 CMS.debug("PortalEnroll: attrname is: " + attrname);
diff --git a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
index 29c5f21a5abf2b6e5ade39653d6769d892062b07..efca7416847617b56f3a0727e39f7c1b9d608c6b 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
@@ -185,7 +185,7 @@ public class PublishCertsJob extends AJobBase
                 "(!(certMetainfo=" + ICertRecord.META_LDAPPUBLISH +
                         ":true))";
 
-        Enumeration unpublishedCerts = null;
+        Enumeration<Object> unpublishedCerts = null;
 
         try {
             unpublishedCerts = mRepository.findCertRecs(filter);
diff --git a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
index 2a3fffed31d21b5cbab7be4f264b694dc8764ef1..0c6178e99afa22390efd465bb17973c09c7e8afc 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
@@ -423,10 +423,10 @@ public class RenewalNotificationJob
                 //CertRecordList list = mCertDB.findCertRecordsInList(filter, null, "serialno", 5);
                 //list.processCertRecords(0, list.getSize() - 1, cp);
 
-                Enumeration en = mCertDB.findCertRecs(filter);
+                Enumeration<Object> en = mCertDB.findCertRecs(filter);
 
                 while (en.hasMoreElements()) {
-                    Object element = (Object) en.nextElement();
+                    Object element = en.nextElement();
 
                     try {
                         cp.process(element);
diff --git a/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java b/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
index 6aea0c514e7c6ba7432924dbd48a0b498e08b3ac..c61d953ebab380263a19c43b87e950ef5fd74524 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
@@ -189,7 +189,7 @@ public class UnpublishExpiredJob extends AJobBase
         // a test for without CertRecord.META_LDAPPUBLISH
         //String filter = "(x509Cert.notAfter<="+ now +")";
 
-        Enumeration expired = null;
+        Enumeration<Object> expired = null;
 
         try {
             expired = mRepository.findCertRecs(filter);
diff --git a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
index 4a0225a40464a801c672116a939065571bbf58bd..bdfbc9ca2f1253e492ec2b49dba224174df10250 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
@@ -156,12 +156,13 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
             }
             LDAPEntry entry = results.next();
             LDAPAttribute crls = entry.getAttribute(mCACertAttr);
-            Enumeration vals = crls.getByteValues();
+            @SuppressWarnings("unchecked")
+            Enumeration<byte[]> vals = crls.getByteValues();
 
             if (!vals.hasMoreElements()) {
                 throw new EBaseException("error - no values");
             }
-            byte caCertData[] = (byte[]) vals.nextElement();
+            byte caCertData[] = vals.nextElement();
             X509CertImpl caCert = new X509CertImpl(caCertData);
 
             return caCert;
@@ -188,12 +189,13 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
             }
             LDAPEntry entry = results.next();
             LDAPAttribute crls = entry.getAttribute(mCRLAttr);
-            Enumeration vals = crls.getByteValues();
+            @SuppressWarnings("unchecked")
+            Enumeration<byte[]> vals = crls.getByteValues();
 
             if (!vals.hasMoreElements()) {
                 throw new EBaseException("error - no values");
             }
-            byte crlData[] = (byte[]) vals.nextElement();
+            byte crlData[] = vals.nextElement();
             X509CRLImpl crl = new X509CRLImpl(crlData);
 
             return crl;
@@ -457,10 +459,10 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
         X509CertImpl theCert = null;
         X509CRLImpl theCRL = null;
 
-        Enumeration caCerts = mCRLs.keys();
+        Enumeration<X509CertImpl> caCerts = mCRLs.keys();
 
         while (caCerts.hasMoreElements()) {
-            X509CertImpl caCert = (X509CertImpl) caCerts.nextElement();
+            X509CertImpl caCert = caCerts.nextElement();
             MessageDigest md = null;
 
             try {
@@ -565,10 +567,10 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
 
     public void setConfigParameters(NameValuePairs pairs)
             throws EBaseException {
-        Enumeration k = pairs.getNames();
+        Enumeration<String> k = pairs.getNames();
 
         while (k.hasMoreElements()) {
-            String key = (String) k.nextElement();
+            String key = k.nextElement();
 
             mConfig.put(key, pairs.getValue(key));
         }
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 14cd9ece458450ff6f9cfa0998e588f91685e7d0..9bb806ebaa8f0f0e8737f9c9c13a20c24886770c 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)
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/CAEnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/CAEnrollProfile.java
index aa18acd3b2273eac4c52e9a221a941af4176bbac..c03f90a4b2ad71eefbdce4f0c0fa20eee066be3d 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/CAEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/CAEnrollProfile.java
@@ -226,9 +226,9 @@ public class CAEnrollProfile extends EnrollProfile {
         request.setRequestStatus(RequestStatus.COMPLETE);
 
         // notifies updater plugins
-        Enumeration updaterIds = getProfileUpdaterIds();
+        Enumeration<String> updaterIds = getProfileUpdaterIds();
         while (updaterIds.hasMoreElements()) {
-            String updaterId = (String) updaterIds.nextElement();
+            String updaterId = updaterIds.nextElement();
             IProfileUpdater updater = getProfileUpdater(updaterId);
             updater.update(request, RequestStatus.COMPLETE);
         }
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/ExtendedKeyUsageExtConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/ExtendedKeyUsageExtConstraint.java
index 9c8e047844efd8f9eed3b75b9179b26964f127e9..3c737e8a5b16d3dc88ce2e921c647e6b7782e165 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/ExtendedKeyUsageExtConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/ExtendedKeyUsageExtConstraint.java
@@ -108,7 +108,7 @@ public class ExtendedKeyUsageExtConstraint extends EnrollConstraint {
         }
 
         // Build local cache of configured OIDs
-        Vector mCache = new Vector();
+        Vector<String> mCache = new Vector<String>();
         StringTokenizer st = new StringTokenizer(getConfig(CONFIG_OIDS), ",");
 
         while (st.hasMoreTokens()) {
@@ -118,10 +118,10 @@ public class ExtendedKeyUsageExtConstraint extends EnrollConstraint {
         }
 
         // check OIDs
-        Enumeration e = ext.getOIDs();
+        Enumeration<ObjectIdentifier> e = ext.getOIDs();
 
         while (e.hasMoreElements()) {
-            ObjectIdentifier oid = (ObjectIdentifier) e.nextElement();
+            ObjectIdentifier oid = e.nextElement();
 
             if (!mCache.contains(oid.toString())) {
                 throw new ERejectException(
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/NoConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/NoConstraint.java
index 0d81c583f763c5adb571f156010d4dbeca59cb97..459e9f219e12e0a88c8f8d84ccf00c91694befa3 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/NoConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/NoConstraint.java
@@ -43,9 +43,9 @@ public class NoConstraint implements IPolicyConstraint {
     public static final String CONFIG_NAME = "name";
 
     private IConfigStore mConfig = null;
-    private Vector mNames = new Vector();
+    private Vector<String> mNames = new Vector<String>();
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mNames.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueKeyConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueKeyConstraint.java
index 1526686e984acafa9f1945a4b186d8d6706fa8ac..f10130aa658a78441a7b5ffee052d30a20b62e2d 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueKeyConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueKeyConstraint.java
@@ -191,9 +191,9 @@ public class UniqueKeyConstraint extends EnrollConstraint {
                         sjname_in_req =
                                 (X500Name) subName.get(CertificateSubjectName.DN_NAME);
                         CMS.debug("UniqueKeyConstraint: cert request subject DN =" + sjname_in_req.toString());
-                        Enumeration e = list.getCertRecords(0, size - 1);
+                        Enumeration<ICertRecord> e = list.getCertRecords(0, size - 1);
                         while (e != null && e.hasMoreElements()) {
-                            ICertRecord rec = (ICertRecord) e.nextElement();
+                            ICertRecord rec = e.nextElement();
                             X509CertImpl cert = rec.getCertificate();
                             String certDN =
                                     cert.getSubjectDN().toString();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
index c9ea70624eb64d619711e1971f5c778b1fd1e8e4..f23b7e24cada5aefacdb75e0ea4297d4172ddeca 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
@@ -114,7 +114,7 @@ public class AuthInfoAccessExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -236,10 +236,10 @@ public class AuthInfoAccessExtDefault extends EnrollExtDefault {
 
                 for (int i = 0; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
 
                     while (names.hasMoreElements()) {
-                        String name1 = (String) names.nextElement();
+                        String name1 = names.nextElement();
 
                         if (name1.equals(AD_METHOD)) {
                             method = nvps.getValue(name1);
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/ExtendedKeyUsageExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/ExtendedKeyUsageExtDefault.java
index 15dec54124360fdf666b101523e09a4ff40265b6..f1d63a348a2880fc9e1fcf3d61d36a985c078070 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/ExtendedKeyUsageExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/ExtendedKeyUsageExtDefault.java
@@ -187,11 +187,10 @@ public class ExtendedKeyUsageExtDefault extends EnrollExtDefault {
             if (ext == null) {
                 return "";
             }
-            Enumeration e = ext.getOIDs();
+            Enumeration<ObjectIdentifier> e = ext.getOIDs();
 
             while (e.hasMoreElements()) {
-                ObjectIdentifier oid = (ObjectIdentifier)
-                        e.nextElement();
+                ObjectIdentifier oid = e.nextElement();
 
                 if (!sb.toString().equals("")) {
                     sb.append(",");
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/NoDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/NoDefault.java
index 8197d3de4b68670913b80dd5bf9bc2b16bddd03b..a58b1800819aba06bf12009d13d6198651a7d361 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/NoDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/NoDefault.java
@@ -41,10 +41,10 @@ public class NoDefault implements IPolicyDefault {
     public static final String PROP_NAME = "name";
 
     protected Vector mValues = new Vector();
-    protected Vector mNames = new Vector();
+    protected Vector<String> mNames = new Vector<String>();
     protected IConfigStore mConfig = null;
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mNames.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/input/EnrollInput.java b/pki/base/common/src/com/netscape/cms/profile/input/EnrollInput.java
index db3945785dae0f53a15a12d2dc24961ac81aaf66..c4269ba7d136766f9fb80ed457a635e8d86383ca 100644
--- a/pki/base/common/src/com/netscape/cms/profile/input/EnrollInput.java
+++ b/pki/base/common/src/com/netscape/cms/profile/input/EnrollInput.java
@@ -51,8 +51,8 @@ public abstract class EnrollInput implements IProfileInput {
             "LOGGING_SIGNED_AUDIT_PROOF_OF_POSSESSION_2";
 
     protected IConfigStore mConfig = null;
-    protected Vector mValueNames = new Vector();
-    protected Vector mConfigNames = new Vector();
+    protected Vector<String> mValueNames = new Vector<String>();
+    protected Vector<String> mConfigNames = new Vector<String>();
     protected IProfile mProfile = null;
 
     protected ILogger mSignedAuditLogger = CMS.getSignedAuditLogger();
@@ -113,7 +113,7 @@ public abstract class EnrollInput implements IProfileInput {
     /**
      * Retrieves a list of names of the value parameter.
      */
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return mValueNames.elements();
     }
 
@@ -121,7 +121,7 @@ public abstract class EnrollInput implements IProfileInput {
         mConfigNames.addElement(name);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mConfigNames.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/input/GenericInput.java b/pki/base/common/src/com/netscape/cms/profile/input/GenericInput.java
index 029e497f48f2d7ec397b9181b276ece717d05eed..e8edfaa6dece2ec0c4bd911b0442311f5470c6c9 100644
--- a/pki/base/common/src/com/netscape/cms/profile/input/GenericInput.java
+++ b/pki/base/common/src/com/netscape/cms/profile/input/GenericInput.java
@@ -94,8 +94,8 @@ public class GenericInput extends EnrollInput implements IProfileInput {
     /**
      * Returns selected value names based on the configuration.
      */
-    public Enumeration getValueNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getValueNames() {
+        Vector<String> v = new Vector<String>();
         int num = getNum();
         for (int i = 0; i < num; i++) {
             String enable = getConfig(CONFIG_ENABLE + i);
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
index e2c41a5917984590123c6a28f47f630a4081bff6..fed86512231b3bd64dbbeeab9deaeb529cd5e225 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
@@ -254,11 +254,12 @@ public class LdapCertSubjPublisher implements ILdapPublisher {
             if (certs != null) {
                 hasCert = LdapUserCertPublisher.ByteValueExists(certs, certEnc);
                 // check for other certs with the same subject name
-                Enumeration vals = certs.getByteValues();
+                @SuppressWarnings("unchecked")
+                Enumeration<byte[]> vals = certs.getByteValues();
                 byte[] val = null;
 
                 while (vals.hasMoreElements()) {
-                    val = (byte[]) vals.nextElement();
+                    val = vals.nextElement();
                     if (Utils.byteArraysAreEqual(certEnc, val)) {
                         hasCert = true;
                         continue;
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
index 8c74382a7b1b0e569b9d73b8fd5f11f0e4e8d250..afa0601dc7af11eca33b53e15fb2de66cc83aa9c 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
@@ -295,11 +295,12 @@ public class LdapUserCertPublisher implements ILdapPublisher, IExtendedPluginInf
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
-            val = (byte[]) vals.nextElement();
+            val = vals.nextElement();
             if (val.length == 0)
                 continue;
             if (Utils.byteArraysAreEqual(val, bval)) {
@@ -316,11 +317,12 @@ public class LdapUserCertPublisher implements ILdapPublisher, IExtendedPluginInf
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getStringValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> vals = attr.getStringValues();
         String val = null;
 
         while (vals.hasMoreElements()) {
-            val = (String) vals.nextElement();
+            val = vals.nextElement();
             if (val.equalsIgnoreCase(sval)) {
                 return true;
             }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
index 72838eb5522e2900b5f8a14ac7945edcf6217eeb..fe176b641836caa0ca53a330ec945e93cf09b0f4 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
@@ -206,9 +206,10 @@ public class AdminServlet extends HttpServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("AdminServlet:service() uri = " + httpReq.getRequestURI());
-        Enumeration paramNames = httpReq.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> paramNames = httpReq.getParameterNames();
         while (paramNames.hasMoreElements()) {
-            String pn = (String) paramNames.nextElement();
+            String pn = paramNames.nextElement();
             // added this facility so that password can be hidden,
             // all sensitive parameters should be prefixed with 
             // __ (double underscores); however, in the event that
@@ -793,11 +794,11 @@ public class AdminServlet extends HttpServlet {
         StringBuffer buf = new StringBuffer();
 
         if (params != null) {
-            Enumeration e = params.getNames();
+            Enumeration<String> e = params.getNames();
 
             if (e.hasMoreElements()) {
                 while (e.hasMoreElements()) {
-                    String name = (String) e.nextElement();
+                    String name = e.nextElement();
                     String value = java.net.URLEncoder.encode((String)
                             params.getValue(name));
 
@@ -857,10 +858,11 @@ public class AdminServlet extends HttpServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             //if (name.equals(Constants.PT_OP))
             //	continue;
@@ -888,10 +890,11 @@ public class AdminServlet extends HttpServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             //if (name.equals(Constants.PT_OP))
             //	continue;
@@ -916,11 +919,11 @@ public class AdminServlet extends HttpServlet {
             IConfigStore config, HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration e = config.getPropertyNames();
+        Enumeration<String> e = config.getPropertyNames();
         NameValuePairs params = new NameValuePairs();
 
         while (e.hasMoreElements()) {
-            String s = (String) e.nextElement();
+            String s = e.nextElement();
 
             params.add(s, config.getString(s));
         }
@@ -1132,10 +1135,11 @@ public class AdminServlet extends HttpServlet {
         }
 
         // identify any remaining request parameters
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             // skip previously extracted parameters
             if (name.equals(Constants.OP_SCOPE)) {
@@ -1231,7 +1235,7 @@ public class AdminServlet extends HttpServlet {
             return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
         }
 
-        Enumeration groups = null;
+        Enumeration<IGroup> groups = null;
 
         try {
             groups = mUG.findGroups("*");
@@ -1242,7 +1246,7 @@ public class AdminServlet extends HttpServlet {
         StringBuffer membersString = new StringBuffer();
 
         while (groups.hasMoreElements()) {
-            IGroup group = (IGroup) groups.nextElement();
+            IGroup group = groups.nextElement();
 
             if (group.isMember(SubjectID) == true) {
                 if (membersString.length() != 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/AuthCredentials.java b/pki/base/common/src/com/netscape/cms/servlet/admin/AuthCredentials.java
index d0bbfa824175f75a75ad4ac1022e2a3fe933b48e..9d4c4f00ee5233760be0b51c819ffdb11f2aa268 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/AuthCredentials.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/AuthCredentials.java
@@ -35,14 +35,14 @@ public class AuthCredentials implements IAuthCredentials {
      *
      */
     private static final long serialVersionUID = -6938644716486895814L;
-    private Hashtable authCreds = null;
+    private Hashtable<String, Object> authCreds = null;
     // Inserted by bskim 
     private IArgBlock argblk = null;
 
     // Insert end
 
     public AuthCredentials() {
-        authCreds = new Hashtable();
+        authCreds = new Hashtable<String, Object>();
     }
 
     /**
@@ -68,7 +68,7 @@ public class AuthCredentials implements IAuthCredentials {
      * @return the named authentication credential
      */
     public Object get(String name) {
-        return ((Object) authCreds.get(name));
+        return authCreds.get(name);
     }
 
     /**
@@ -90,8 +90,8 @@ public class AuthCredentials implements IAuthCredentials {
      * @return an enumeration of the values in this credential set
      * @see java.util.Enumeration
      */
-    public Enumeration getElements() {
-        return (authCreds.elements());
+    public Enumeration<Object> getElements() {
+        return authCreds.elements();
     }
 
     // Inserted by bskim
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
index fa3933ed6105b0c4368a7c3dfe2b620210cd0d91..2c6ba3dbcdb6b2081e3561eeacd7dfdd5df7a081 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
@@ -230,10 +230,11 @@ public class CAAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -290,10 +291,11 @@ public class CAAdminServlet extends AdminServlet {
 
         IConfigStore riq = nc.getSubStore(ICertificateAuthority.PROP_REQ_IN_Q_SUBSTORE);
 
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -324,10 +326,11 @@ public class CAAdminServlet extends AdminServlet {
         IConfigStore riq = nc.getSubStore(ICertificateAuthority.PROP_REQ_IN_Q_SUBSTORE);
 
         //set rest of the parameters
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -379,10 +382,11 @@ public class CAAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         //set rest of the parameters
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -456,10 +460,10 @@ public class CAAdminServlet extends AdminServlet {
             throws ServletException, IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
 
-        Enumeration ips = mCA.getCRLIssuingPoints();
+        Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
 
         while (ips.hasMoreElements()) {
-            ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+            ICRLIssuingPoint ip = ips.nextElement();
 
             if (ip != null) {
                 String ipId = ip.getId();
@@ -486,11 +490,12 @@ public class CAAdminServlet extends AdminServlet {
 
             if (ip != null) {
 
-                Enumeration e = req.getParameterNames();
+                @SuppressWarnings("unchecked")
+                Enumeration<String> e = req.getParameterNames();
                 String value = "";
 
                 while (e.hasMoreElements()) {
-                    String name = (String) e.nextElement();
+                    String name = e.nextElement();
 
                     if (name.equals(Constants.PR_ENABLED)) {
                         if (ip.isCRLIssuingPointEnabled()) {
@@ -586,10 +591,10 @@ public class CAAdminServlet extends AdminServlet {
 
             IConfigStore crlSubStore =
                     mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
-            Enumeration crlNames = crlSubStore.getSubStoreNames();
+            Enumeration<String> crlNames = crlSubStore.getSubStoreNames();
 
             while (crlNames.hasMoreElements()) {
-                String name = (String) crlNames.nextElement();
+                String name = crlNames.nextElement();
 
                 if (ipId.equals(name)) {
                     // store a message in the signed audit log file
@@ -743,10 +748,10 @@ public class CAAdminServlet extends AdminServlet {
             IConfigStore crlSubStore =
                     mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
             boolean done = false;
-            Enumeration crlNames = crlSubStore.getSubStoreNames();
+            Enumeration<String> crlNames = crlSubStore.getSubStoreNames();
 
             while (crlNames.hasMoreElements()) {
-                String name = (String) crlNames.nextElement();
+                String name = crlNames.nextElement();
 
                 if (ipId.equals(name)) {
                     ICRLIssuingPoint ip = mCA.getCRLIssuingPoint(ipId);
@@ -862,10 +867,10 @@ public class CAAdminServlet extends AdminServlet {
                 IConfigStore crlSubStore =
                         mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
                 boolean done = false;
-                Enumeration crlNames = crlSubStore.getSubStoreNames();
+                Enumeration<String> crlNames = crlSubStore.getSubStoreNames();
 
                 while (crlNames.hasMoreElements()) {
-                    String name = (String) crlNames.nextElement();
+                    String name = crlNames.nextElement();
 
                     if (id.equals(name)) {
                         mCA.deleteCRLIssuingPoint(crlSubStore, id);
@@ -944,10 +949,11 @@ public class CAAdminServlet extends AdminServlet {
         NameValuePairs params = new NameValuePairs();
 
         String ipId = null;
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -1019,10 +1025,11 @@ public class CAAdminServlet extends AdminServlet {
             if (id != null) {
                 IConfigStore crlExtSubStore = crlExtsSubStore.getSubStore(id);
 
-                Enumeration e = req.getParameterNames();
+                @SuppressWarnings("unchecked")
+                Enumeration<String> e = req.getParameterNames();
 
                 while (e.hasMoreElements()) {
-                    String name = (String) e.nextElement();
+                    String name = e.nextElement();
 
                     if (name.equals(Constants.OP_TYPE))
                         continue;
@@ -1110,16 +1117,16 @@ public class CAAdminServlet extends AdminServlet {
         IConfigStore crlExtsSubStore = crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
 
         if (crlExtsSubStore != null) {
-            Enumeration enumExts = crlExtsSubStore.getSubStoreNames();
+            Enumeration<String> enumExts = crlExtsSubStore.getSubStoreNames();
 
             while (enumExts.hasMoreElements()) {
-                String extName = (String) enumExts.nextElement();
+                String extName = enumExts.nextElement();
                 boolean crlExtEnabled = false;
                 IConfigStore crlExtSubStore = crlExtsSubStore.getSubStore(extName);
-                Enumeration properties = crlExtSubStore.getPropertyNames();
+                Enumeration<String> properties = crlExtSubStore.getPropertyNames();
 
                 while (properties.hasMoreElements()) {
-                    String name = (String) properties.nextElement();
+                    String name = properties.nextElement();
 
                     if (name.equals(Constants.PR_ENABLE)) {
                         crlExtEnabled = crlExtSubStore.getBoolean(name, false);
@@ -1158,9 +1165,9 @@ public class CAAdminServlet extends AdminServlet {
         String ipId = null;
         String name = null;
 
-        Enumeration ips = mCA.getCRLIssuingPoints();
+        Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
         if (ips.hasMoreElements()) {
-            ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+            ICRLIssuingPoint ip = ips.nextElement();
             if (ip != null) {
                 ipId = ip.getId();
             }
@@ -1229,10 +1236,11 @@ public class CAAdminServlet extends AdminServlet {
             IConfigStore crlSubStore = crlsSubStore.getSubStore(id);
 
             //set reset of the parameters
-            Enumeration e = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> e = req.getParameterNames();
 
             while (e.hasMoreElements()) {
-                String name = (String) e.nextElement();
+                String name = e.nextElement();
 
                 if (name.equals(Constants.OP_TYPE))
                     continue;
@@ -1319,10 +1327,11 @@ public class CAAdminServlet extends AdminServlet {
                 mCA.getConfigStore().getSubStore(ICertificateAuthority.PROP_CRL_SUBSTORE);
         IConfigStore crlSubStore = crlsSubStore.getSubStore(id);
 
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -1352,12 +1361,13 @@ public class CAAdminServlet extends AdminServlet {
             caConnectorConfig = connectorConfig.getSubStore("CLA");
         }
 
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         NameValuePairs params = new NameValuePairs();
 
         if (caConnectorConfig != null) {
             while (enum1.hasMoreElements()) {
-                String name = (String) enum1.nextElement();
+                String name = enum1.nextElement();
 
                 if (name.equals(Constants.RS_ID))
                     continue;
@@ -1388,11 +1398,12 @@ public class CAAdminServlet extends AdminServlet {
             caConnectorConfig = connectorConfig.getSubStore("CLA");
         }
 
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         if (caConnectorConfig != null) {
             while (enum1.hasMoreElements()) {
-                String name = (String) enum1.nextElement();
+                String name = enum1.nextElement();
 
                 if (name.equals(Constants.OP_TYPE))
                     continue;
@@ -1423,10 +1434,11 @@ public class CAAdminServlet extends AdminServlet {
     }
 
     private boolean isKRAConnector(HttpServletRequest req) {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
-            String key = (String) enum1.nextElement();
+            String key = enum1.nextElement();
 
             if (key.equals("RS_ID")) {
                 String val = req.getParameter(key);
@@ -1441,10 +1453,11 @@ public class CAAdminServlet extends AdminServlet {
     }
 
     private boolean isCLAConnector(HttpServletRequest req) {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
-            String key = (String) enum1.nextElement();
+            String key = enum1.nextElement();
 
             if (key.equals("RS_ID")) {
                 String val = req.getParameter(key);
@@ -1532,12 +1545,12 @@ public class CAAdminServlet extends AdminServlet {
 
         IConfigStore caConfig = mCA.getConfigStore();
 
-        Enumeration enum1 = req.getParameterNames();
+        Enumeration<String> enum1 = req.getParameterNames();
         boolean restart = false;
 
         //mCA.setMaxSerial("");
         while (enum1.hasMoreElements()) {
-            String key = (String) enum1.nextElement();
+            String key = enum1.nextElement();
             String value = req.getParameter(key);
 
             if (key.equals(Constants.PR_EE_ENABLED)) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
index 7ebb64af1c17acaa5ca1a379112c03ce0513d323..b93e6eb0b6e5786fe638728534cf1103ca562562 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
@@ -520,12 +520,11 @@ public class JobsAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = mJobsSched.getPlugins().keys();
+        Enumeration<String> e = mJobsSched.getPlugins().keys();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
-            JobPlugin value = (JobPlugin)
-                    mJobsSched.getPlugins().get(name);
+            String name = e.nextElement();
+            JobPlugin value = mJobsSched.getPlugins().get(name);
 
             params.add(name, value.getClassPath());
             //				params.add(name, value.getClassPath()+EDIT);
@@ -540,10 +539,9 @@ public class JobsAdminServlet extends AdminServlet {
 
         NameValuePairs params = new NameValuePairs();
 
-        for (Enumeration e = mJobsSched.getInstances().keys(); e.hasMoreElements();) {
-            String name = (String) e.nextElement();
-            IJob value = (IJob)
-                    mJobsSched.getInstances().get((Object) name);
+        for (Enumeration<String> e = mJobsSched.getInstances().keys(); e.hasMoreElements();) {
+            String name = e.nextElement();
+            IJob value = mJobsSched.getInstances().get((Object) name);
 
             //				params.add(name, value.getImplName());
             params.add(name, value.getImplName() + VISIBLE +
@@ -581,8 +579,8 @@ public class JobsAdminServlet extends AdminServlet {
 
         // first check if any instances from this job plugin
         // DON'T remove job plugin if any instance
-        for (Enumeration e = mJobsSched.getInstances().elements(); e.hasMoreElements();) {
-            IJob jobs = (IJob) e.nextElement();
+        for (Enumeration<IJob> e = mJobsSched.getInstances().elements(); e.hasMoreElements();) {
+            IJob jobs = e.nextElement();
 
             if ((jobs.getImplName()).equals(id)) {
                 sendResponse(ERROR,
@@ -1001,10 +999,10 @@ public class JobsAdminServlet extends AdminServlet {
         store.removeSubStore(id);
         IConfigStore rstore = store.makeSubStore(id);
 
-        Enumeration keys = saveParams.getNames();
+        Enumeration<String> keys = saveParams.getNames();
 
         while (keys.hasMoreElements()) {
-            String key = (String) keys.nextElement();
+            String key = keys.nextElement();
             String value = saveParams.getValue(key);
 
             if (!value.equals(""))
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/KRAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/KRAAdminServlet.java
index 1dd346667a58c0b57e8f99ead07830b8a454d5b9..0d3648c98103c0952085f18e4a9461e65b0cc376 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/KRAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/KRAAdminServlet.java
@@ -188,14 +188,15 @@ public class KRAAdminServlet extends AdminServlet {
     private void setGeneralConfig(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         boolean restart = false;
 
         String auditMessage = null;
         String auditSubjectID = auditSubjectID();
 
         while (enum1.hasMoreElements()) {
-            String key = (String) enum1.nextElement();
+            String key = enum1.nextElement();
             String value = req.getParameter(key);
 
             if (key.equals(Constants.PR_NO_OF_REQUIRED_RECOVERY_AGENTS)) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
index 338a5823973171b227677306212922d0def5f5a7..317a50d683099404f679aa53708fe7567f80cc9f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
@@ -344,10 +344,11 @@ public class OCSPAdminServlet extends AdminServlet {
 
             IOCSPStore store = mOCSP.getOCSPStore(id);
 
-            Enumeration e = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> e = req.getParameterNames();
 
             while (e.hasMoreElements()) {
-                String name = (String) e.nextElement();
+                String name = e.nextElement();
 
                 if (name.equals(Constants.OP_TYPE))
                     continue;
@@ -422,10 +423,10 @@ public class OCSPAdminServlet extends AdminServlet {
         IConfigStore config = mOCSP.getConfigStore();
         String defStore = config.getString(IOCSPAuthority.PROP_DEF_STORE_ID);
         IConfigStore SubStore = config.getSubStore(IOCSPAuthority.PROP_STORE);
-        Enumeration enumStores = SubStore.getSubStoreNames();
+        Enumeration<String> enumStores = SubStore.getSubStoreNames();
 
         while (enumStores.hasMoreElements()) {
-            String storeName = (String) enumStores.nextElement();
+            String storeName = enumStores.nextElement();
             boolean storeEnabled = false;
 
             if (storeName.equals(defStore)) {
@@ -488,7 +489,8 @@ public class OCSPAdminServlet extends AdminServlet {
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             boolean restart = false;
 
             while (enum1.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
index f34a827706d1aecba1c15eaaeb850ab5536efea6..4dbde7e062158037b064a8ab93f65f2b06cd44c9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
@@ -428,8 +428,8 @@ public class PolicyAdminServlet extends AdminServlet {
     public void listPolicyImpls(HttpServletRequest req,
             HttpServletResponse resp)
             throws ServletException, IOException {
-        Enumeration policyImplNames = mProcessor.getPolicyImplsInfo();
-        Enumeration policyImpls = mProcessor.getPolicyImpls();
+        Enumeration<String> policyImplNames = mProcessor.getPolicyImplsInfo();
+        Enumeration<IPolicyRule> policyImpls = mProcessor.getPolicyImpls();
 
         if (policyImplNames == null ||
                 policyImpls == null) {
@@ -442,9 +442,8 @@ public class PolicyAdminServlet extends AdminServlet {
 
         while (policyImplNames.hasMoreElements() &&
                 policyImpls.hasMoreElements()) {
-            String id = (String) policyImplNames.nextElement();
-            IPolicyRule impl = (IPolicyRule)
-                    policyImpls.nextElement();
+            String id = policyImplNames.nextElement();
+            IPolicyRule impl = policyImpls.nextElement();
             String className =
                     impl.getClass().getName();
             String desc = impl.getDescription();
@@ -457,7 +456,7 @@ public class PolicyAdminServlet extends AdminServlet {
     public void listPolicyInstances(HttpServletRequest req,
             HttpServletResponse resp)
             throws ServletException, IOException {
-        Enumeration instancesInfo = mProcessor.getPolicyInstancesInfo();
+        Enumeration<String> instancesInfo = mProcessor.getPolicyInstancesInfo();
 
         if (instancesInfo == null) {
             sendResponse(ERROR, INVALID_POLICY_INSTANCE_CONFIG, null, resp);
@@ -469,7 +468,7 @@ public class PolicyAdminServlet extends AdminServlet {
         String instName, rest;
 
         while (instancesInfo.hasMoreElements()) {
-            String info = (String) instancesInfo.nextElement();
+            String info = instancesInfo.nextElement();
             int i = info.indexOf(";");
 
             nvp.add(info.substring(0, i), info.substring(i + 1));
@@ -583,7 +582,7 @@ public class PolicyAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector v = mProcessor.getPolicyImplConfig(id);
+        Vector<String> v = mProcessor.getPolicyImplConfig(id);
 
         if (v == null) {
             sendResponse(ERROR, INVALID_POLICY_IMPL_ID, null, resp);
@@ -591,8 +590,8 @@ public class PolicyAdminServlet extends AdminServlet {
         }
         NameValuePairs nvp = new NameValuePairs();
 
-        for (Enumeration e = v.elements(); e.hasMoreElements();) {
-            String nv = (String) e.nextElement();
+        for (Enumeration<String> e = v.elements(); e.hasMoreElements();) {
+            String nv = e.nextElement();
             int index = nv.indexOf("=");
 
             nvp.add(nv.substring(0, index), nv.substring(index + 1));
@@ -812,7 +811,7 @@ public class PolicyAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector v = mProcessor.getPolicyInstanceConfig(id);
+        Vector<String> v = mProcessor.getPolicyInstanceConfig(id);
 
         if (v == null) {
             sendResponse(ERROR, INVALID_POLICY_INST_ID, null, resp);
@@ -820,8 +819,8 @@ public class PolicyAdminServlet extends AdminServlet {
         }
         NameValuePairs nvp = new NameValuePairs();
 
-        for (Enumeration e = v.elements(); e.hasMoreElements();) {
-            String nv = (String) e.nextElement();
+        for (Enumeration<String> e = v.elements(); e.hasMoreElements();) {
+            String nv = e.nextElement();
             int index = nv.indexOf("=");
             String name = nv.substring(0, index);
             String value = nv.substring(index + 1);
@@ -907,7 +906,7 @@ public class PolicyAdminServlet extends AdminServlet {
             // We need to fetch parameters: enable, predicate and implname
             // always, and any additional parameters as required by the
             // implementation.
-            Hashtable ht = new Hashtable();
+            Hashtable<String, String> ht = new Hashtable<String, String>();
             String val = req.getParameter(IPolicyRule.PROP_ENABLE).trim();
 
             if (val == null)
@@ -919,7 +918,7 @@ public class PolicyAdminServlet extends AdminServlet {
                 ht.put(IPolicyRule.PROP_PREDICATE, val);
             ht.put(IPolicyRule.PROP_IMPLNAME, implName);
 
-            Vector v = mProcessor.getPolicyImplConfig(implName);
+            Vector<String> v = mProcessor.getPolicyImplConfig(implName);
 
             if (v == null) {
                 // Invalid impl id
@@ -936,8 +935,8 @@ public class PolicyAdminServlet extends AdminServlet {
                 sendResponse(ERROR, INVALID_POLICY_IMPL_ID, null, resp);
                 return;
             }
-            for (Enumeration e = v.elements(); e.hasMoreElements();) {
-                String nv = (String) e.nextElement();
+            for (Enumeration<String> e = v.elements(); e.hasMoreElements();) {
+                String nv = e.nextElement();
                 int index = nv.indexOf("=");
                 String key = nv.substring(0, index);
 
@@ -1155,7 +1154,7 @@ public class PolicyAdminServlet extends AdminServlet {
             // We need to fetch parameters: enable, predicate and implname
             // always, and any additional parameters as required by the
             // implementation.
-            Hashtable ht = new Hashtable();
+            Hashtable<String, String> ht = new Hashtable<String, String>();
             String val = req.getParameter(IPolicyRule.PROP_ENABLE).trim();
 
             if (val == null)
@@ -1166,7 +1165,7 @@ public class PolicyAdminServlet extends AdminServlet {
             if (val != null)
                 ht.put(IPolicyRule.PROP_PREDICATE, val);
             ht.put(IPolicyRule.PROP_IMPLNAME, implName);
-            Vector v = mProcessor.getPolicyImplConfig(implName);
+            Vector<String> v = mProcessor.getPolicyImplConfig(implName);
 
             if (v == null) {
                 // Invalid impl id
@@ -1184,9 +1183,10 @@ public class PolicyAdminServlet extends AdminServlet {
                 return;
             }
             // XXX 
-            for (Enumeration n = req.getParameterNames(); n.hasMoreElements();) {
-                String p = (String) n.nextElement();
-                String l = (String) req.getParameter(p);
+            for (@SuppressWarnings("unchecked")
+            Enumeration<String> n = req.getParameterNames(); n.hasMoreElements();) {
+                String p = n.nextElement();
+                String l = req.getParameter(p);
 
                 if (l != null)
                     ht.put(p, l);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
index 2308318eea859f48c0f404c439491e128191ef66..b0a97e9b51ccd7355b1b9770231df7d9eff6ce46 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
@@ -86,7 +86,7 @@ public class DynamicVariablesServlet extends CMSServlet {
     private long mAuthMgrCacheTime = 0;
     private final int AUTHMGRCACHE = 10; //number of seconds to cache list of
     // authmanagers for
-    private Hashtable dynvars = null;
+    private Hashtable<Integer, String> dynvars = null;
     private String mGetClientCert = "false";
     private String mAuthMgr = null;
 
@@ -156,7 +156,7 @@ public class DynamicVariablesServlet extends CMSServlet {
             String dynvarconfig = sc.getInitParameter(PROP_DYNVAR);
             StringTokenizer s = new StringTokenizer(dynvarconfig, ",");
 
-            dynvars = new Hashtable();
+            dynvars = new Hashtable<Integer, String>();
 
             while (s.hasMoreTokens()) {
                 String token = s.nextToken();
@@ -181,7 +181,7 @@ public class DynamicVariablesServlet extends CMSServlet {
                     throw new ServletException("bad configuration parameter in " + PROP_DYNVAR);
                 }
                 if (varcode != null) {
-                    dynvars.put(varcode, (Object) varname);
+                    dynvars.put(varcode, varname);
                 }
             }
         } catch (Exception e) {
@@ -216,11 +216,11 @@ public class DynamicVariablesServlet extends CMSServlet {
 
             if (os != null) {
                 if (dynvars != null) {
-                    Enumeration k = dynvars.keys();
+                    Enumeration<Integer> k = dynvars.keys();
 
                     while (k.hasMoreElements()) {
                         String toBeWritten;
-                        Integer varcode = (Integer) k.nextElement();
+                        Integer varcode = k.nextElement();
 
                         if (varcode.equals(VAR_SERVERDATE)) {
                             toBeWritten = dynvars.get(varcode) +
@@ -264,7 +264,7 @@ public class DynamicVariablesServlet extends CMSServlet {
                         if (varcode.equals(VAR_AUTHMGRS)) {
                             toBeWritten = "";
                             IAuthSubsystem as = (IAuthSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_AUTH);
-                            Enumeration ame = as.getAuthManagers();
+                            Enumeration<IAuthManager> ame = as.getAuthManagers();
 
                             Date d = CMS.getCurrentDate();
                             long now = d.getTime();
@@ -274,7 +274,7 @@ public class DynamicVariablesServlet extends CMSServlet {
 
                                 StringBuffer sb = new StringBuffer();
                                 while (ame.hasMoreElements()) {
-                                    IAuthManager am = (IAuthManager) ame.nextElement();
+                                    IAuthManager am = ame.nextElement();
                                     String amName = am.getImplName();
 
                                     AuthMgrPlugin ap = as.getAuthManagerPluginImpl(amName);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java b/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
index f96cb0e1f3e792fcc8b356fc02978d76c6896b12..e145ee4db54ad7f911862ddac84bc4907b1806f6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
@@ -165,9 +165,9 @@ public class GetStats extends CMSServlet {
     }
 
     public void parse(CMSTemplateParams argSet, StatsEvent st, int level) {
-        Enumeration names = st.getSubEventNames();
+        Enumeration<String> names = st.getSubEventNames();
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement();
+            String name = names.nextElement();
             StatsEvent subSt = st.getSubEvent(name);
 
             IArgBlock rarg = CMS.createArgBlock();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
index 461fa0b945cf0a0c8124fcb4a48ff19ba495d915..5fd3cd90292435e419f7e95ac4dbf01cc45d29b1 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
@@ -410,7 +410,7 @@ public class CMCRevReqServlet extends CMSServlet {
                 Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) e.nextElement();
+                    ICertRecord rec = e.nextElement();
                     X509CertImpl cert = rec.getCertificate();
                     IArgBlock rarg = CMS.createArgBlock();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
index 8ca35484b6ae32b67b17f51f12ae7c684e1698c8..a2b501f143048a5021e177dee6ab64be261797e3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
@@ -339,7 +339,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) e.nextElement();
+                    ICertRecord rec = e.nextElement();
                     X509CertImpl cert = rec.getCertificate();
                     IArgBlock rarg = CMS.createArgBlock();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
index 3e4a064bab225948943fa41b306823978fbd0dfc..bdaa0df2942309a2a82780d08487b91b3a5875b7 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
@@ -216,10 +216,10 @@ public class DisplayCRL extends CMSServlet {
             }
         } else {
             if (crlIssuingPointId != null) {
-                Enumeration ips = mCA.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
 
                 while (ips.hasMoreElements()) {
-                    ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+                    ICRLIssuingPoint ip = ips.nextElement();
 
                     if (crlIssuingPointId.equals(ip.getId())) {
                         crlIP = ip;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
index edf04b1baccc4427fef6bb0e92217091c7407a48..c5fb568f2d58fb40d54c21db7a8fdaea0d0f2f9c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
@@ -410,12 +410,11 @@ public class DoUnrevoke extends CMSServlet {
                 }
 
                 // let known update and publish status of all crls. 
-                Enumeration otherCRLs =
+                Enumeration<ICRLIssuingPoint> otherCRLs =
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                 while (otherCRLs.hasMoreElements()) {
-                    ICRLIssuingPoint crl = (ICRLIssuingPoint)
-                            otherCRLs.nextElement();
+                    ICRLIssuingPoint crl = otherCRLs.nextElement();
                     String crlId = crl.getId();
 
                     if (crlId.equals(ICertificateAuthority.PROP_MASTER_CRL))
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
index edc40613713c938d16e37fe1f7c28c19fb04dc4c..9696198158e9bb429977172533355024a98fdb69 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
@@ -372,12 +372,11 @@ public class DoUnrevokeTPS extends CMSServlet {
                 }
 
                 // let known update and publish status of all crls. 
-                Enumeration otherCRLs =
+                Enumeration<ICRLIssuingPoint> otherCRLs =
                         ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                 while (otherCRLs.hasMoreElements()) {
-                    ICRLIssuingPoint crl = (ICRLIssuingPoint)
-                            otherCRLs.nextElement();
+                    ICRLIssuingPoint crl = otherCRLs.nextElement();
                     String crlId = crl.getId();
 
                     if (crlId.equals(ICertificateAuthority.PROP_MASTER_CRL))
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
index 7b3fb2f748d236f7fe34d3ad2a47ac12c83aa6dc..c48cd86353b94fe904920fc917ab5e2d9cff77b0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
@@ -489,7 +489,7 @@ public class EnrollServlet extends CMSServlet {
             boolean encCertFound = false;
 
             while (en.hasMoreElements()) {
-                ICertRecord record = (ICertRecord) en.nextElement();
+                ICertRecord record = en.nextElement();
                 X509CertImpl cert = record.getCertificate();
 
                 // if not encryption cert only, try next one
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
index e589cc06c387e7a591c22b10ac8e758e2172cc39..3297c585c0192609a503c29050ce13ff06f7f20d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
@@ -149,10 +149,10 @@ public class GetEnableStatus extends CMSServlet {
         header.addStringValue("timeout", "" + timeout);
         header.addStringValue("reqHost", reqHost);
 
-        for (Enumeration hosts = mgr.getHosts(); hosts.hasMoreElements();) {
+        for (Enumeration<String> hosts = mgr.getHosts(); hosts.hasMoreElements();) {
             IArgBlock rarg = CMS.createArgBlock();
 
-            rarg.addStringValue("hosts", (String) hosts.nextElement());
+            rarg.addStringValue("hosts", hosts.nextElement());
             argSet.addRepeatRecord(rarg);
         }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
index 7217435a1c24b59a52645c072322b4ef24435f91..ce3b7ee69842da4f58f3ae4d2c91f5cb0c180c04 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
@@ -265,10 +265,10 @@ public class GetInfo extends CMSServlet {
                 }
 
             } else {
-                Enumeration ips = mCA.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
 
                 while (ips.hasMoreElements()) {
-                    ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+                    ICRLIssuingPoint ip = ips.nextElement();
 
                     if (ip.isCRLIssuingPointEnabled()) {
                         if (crlIssuingPoints.length() > 0)
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
index 4d5b711c049520eed21044ecb6fb8d12fbf2e097..1ff056ab781dc692cb320131ff07b549fe8518ca 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
@@ -506,7 +506,7 @@ public class HashEnrollServlet extends CMSServlet {
                     int i = 1;
 
                     while (en.hasMoreElements()) {
-                        ICertRecord record = (ICertRecord) en.nextElement();
+                        ICertRecord record = en.nextElement();
                         X509CertImpl cert = record.getCertificate();
 
                         // if not encryption cert only, try next one
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
index 8a818f5e819c4d42f31f6867ddbba86c32916539..b93a82fb8c789c5de0f5fb36faf3f9bb110f0c75 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
@@ -412,7 +412,7 @@ public class ListCerts extends CMSServlet {
                 toCurIndex = list.getSize() - 1;
             } else {
                 toCurIndex = tolist.getCurrentIndex();
-                ICertRecord rx = (ICertRecord) en.nextElement();
+                ICertRecord rx = en.nextElement();
                 BigInteger curToSerial = rx.getSerialNumber();
 
                 if (curToSerial.compareTo(serialToVal) == -1) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/Monitor.java b/pki/base/common/src/com/netscape/cms/servlet/cert/Monitor.java
index b248d2bda4c28d80d62f5fdf51111fddf6285ca1..ac531caca5f219107222524d08fa0d68f828ea5f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/Monitor.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/Monitor.java
@@ -288,7 +288,7 @@ public class Monitor extends CMSServlet {
                 if (mCertDB != null) {
                     filter = Filter(ICertRecord.ATTR_CREATE_TIME, startTime, endTime);
 
-                    Enumeration e = mCertDB.findCertRecs(filter);
+                    Enumeration<Object> e = mCertDB.findCertRecs(filter);
 
                     int count = 0;
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
index 10330501bb042ef46869424d04baa9bc4ee24e54..dc084bd94e963029e433748b4e37465a169ad4fe 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
@@ -416,7 +416,7 @@ public class UpdateDir extends CMSServlet {
                 if (updateValue[VALID_TO].startsWith("0x")) {
                     updateValue[VALID_TO] = hexToDecimal(updateValue[VALID_TO]);
                 }
-                Enumeration validCerts = null;
+                Enumeration<ICertRecord> validCerts = null;
 
                 if (updateValue[CHECK_FLAG] != null &&
                         updateValue[CHECK_FLAG].equalsIgnoreCase("yes")) {
@@ -437,7 +437,7 @@ public class UpdateDir extends CMSServlet {
                 if (validCerts != null) {
                     while (validCerts.hasMoreElements()) {
                         ICertRecord certRecord =
-                                (ICertRecord) validCerts.nextElement();
+                                validCerts.nextElement();
                         //X509CertImpl cert = certRecord.getCertificate();
                         X509CertImpl cert = null;
                         Object o = certRecord.getCertificate();
@@ -534,7 +534,7 @@ public class UpdateDir extends CMSServlet {
                 if (updateValue[EXPIRED_TO].startsWith("0x")) {
                     updateValue[EXPIRED_TO] = hexToDecimal(updateValue[EXPIRED_TO]);
                 }
-                Enumeration expiredCerts = null;
+                Enumeration<ICertRecord> expiredCerts = null;
 
                 if (updateValue[CHECK_FLAG] != null &&
                         updateValue[CHECK_FLAG].equalsIgnoreCase("yes")) {
@@ -554,8 +554,7 @@ public class UpdateDir extends CMSServlet {
 
                 if (expiredCerts != null) {
                     while (expiredCerts.hasMoreElements()) {
-                        ICertRecord certRecord =
-                                (ICertRecord) expiredCerts.nextElement();
+                        ICertRecord certRecord = expiredCerts.nextElement();
                         //X509CertImpl cert = certRecord.getCertificate();
                         X509CertImpl cert = null;
                         Object o = certRecord.getCertificate();
@@ -643,7 +642,7 @@ public class UpdateDir extends CMSServlet {
                 if (updateValue[REVOKED_TO].startsWith("0x")) {
                     updateValue[REVOKED_TO] = hexToDecimal(updateValue[REVOKED_TO]);
                 }
-                Enumeration revokedCerts = null;
+                Enumeration<ICertRecord> revokedCerts = null;
 
                 if (updateValue[CHECK_FLAG] != null &&
                         updateValue[CHECK_FLAG].equalsIgnoreCase("yes")) {
@@ -663,8 +662,7 @@ public class UpdateDir extends CMSServlet {
 
                 if (revokedCerts != null) {
                     while (revokedCerts.hasMoreElements()) {
-                        ICertRecord certRecord =
-                                (ICertRecord) revokedCerts.nextElement();
+                        ICertRecord certRecord = revokedCerts.nextElement();
                         //X509CertImpl cert = certRecord.getCertificate();
                         X509CertImpl cert = null;
                         Object o = certRecord.getCertificate();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/AuthCredentials.java b/pki/base/common/src/com/netscape/cms/servlet/common/AuthCredentials.java
index 58c4276e3d9d250d1af83c0f51e96cc99a8c246b..a55406068c74f701dea3416f0d5c33ee03d79def 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/AuthCredentials.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/AuthCredentials.java
@@ -35,14 +35,14 @@ public class AuthCredentials implements IAuthCredentials {
      *
      */
     private static final long serialVersionUID = -5995164231849154265L;
-    private Hashtable authCreds = null;
+    private Hashtable<String, Object> authCreds = null;
     // Inserted by bskim 
     private IArgBlock argblk = null;
 
     // Insert end
 
     public AuthCredentials() {
-        authCreds = new Hashtable();
+        authCreds = new Hashtable<String, Object>();
     }
 
     /**
@@ -68,7 +68,7 @@ public class AuthCredentials implements IAuthCredentials {
      * @return the named authentication credential
      */
     public Object get(String name) {
-        return ((Object) authCreds.get(name));
+        return authCreds.get(name);
     }
 
     /**
@@ -90,8 +90,8 @@ public class AuthCredentials implements IAuthCredentials {
      * @return an enumeration of the values in this credential set
      * @see java.util.Enumeration
      */
-    public Enumeration getElements() {
-        return (authCreds.elements());
+    public Enumeration<Object> getElements() {
+        return authCreds.elements();
     }
 
     // Inserted by bskim
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSFileLoader.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSFileLoader.java
index 9a91cb7295ab6b1d3f183d1ab1bdf2ff712387e7..808bdda78b66b2356063dcb8ee03416e4039d79c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSFileLoader.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSFileLoader.java
@@ -44,7 +44,7 @@ public class CMSFileLoader {
     public final String PROP_CACHE_TEMPLATES_ONLY = "cacheTemplatesOnly";
 
     // hash of files to their content. 
-    private Hashtable mLoadedFiles = new Hashtable();
+    private Hashtable<String, CMSFile> mLoadedFiles = new Hashtable<String, CMSFile>();
 
     // max number of files 
     private int mMaxSize = MAX_SIZE;
@@ -141,14 +141,14 @@ public class CMSFileLoader {
 
         // remove the LRU files.
         // XXX could be optimized more.
-        Enumeration elements = mLoadedFiles.elements();
+        Enumeration<CMSFile> elements = mLoadedFiles.elements();
 
         for (int i = mClearSize; i > 0; i--) {
             long lru = java.lang.Long.MAX_VALUE;
             CMSFile lruFile = null;
 
             while (elements.hasMoreElements()) {
-                CMSFile cmsFile = (CMSFile) elements.nextElement();
+                CMSFile cmsFile = elements.nextElement();
 
                 if (cmsFile.getLastAccess() < lru) {
                     lruFile = cmsFile;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSGateway.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSGateway.java
index 74d46badf4b91c88b6a7a70983a028191455a185..d04e2fb22933c381c05e8ce0ca4a9e4b72429d4d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSGateway.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSGateway.java
@@ -79,10 +79,10 @@ public class CMSGateway {
 
     public static Hashtable toHashtable(HttpServletRequest req) {
         Hashtable httpReqHash = new Hashtable();
-        Enumeration names = req.getParameterNames();
+        Enumeration<String> names = req.getParameterNames();
 
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement();
+            String name = names.nextElement();
 
             httpReqHash.put(name, req.getParameter(name));
         }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
index 822d8a0d8563ceadbeae6d2a2ffb9133e840f09e..b1be4f7a57a58f4947f9020ad9d211665c5fce66 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
@@ -78,7 +78,7 @@ public class CMSRequest {
     private String mError = null;
 
     // any error description.
-    private Vector mErrorDescr = null;
+    private Vector<String> mErrorDescr = null;
 
     // any request resulting data;
     Object mResult = null;
@@ -170,7 +170,7 @@ public class CMSRequest {
 
     public void setErrorDescription(String descr) {
         if (mErrorDescr == null)
-            mErrorDescr = new Vector();
+            mErrorDescr = new Vector<String>();
         mErrorDescr.addElement(descr);
     }
 
@@ -215,7 +215,7 @@ public class CMSRequest {
         return mError;
     }
 
-    public Vector getErrorDescr() {
+    public Vector<String> getErrorDescr() {
         return mErrorDescr;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/GenErrorTemplateFiller.java b/pki/base/common/src/com/netscape/cms/servlet/common/GenErrorTemplateFiller.java
index 1c7d61c9ad15aeb9051bd980844f7356a59bec05..40edb3bda1b6f9aa930e3c0b354f7fa056dae90b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/GenErrorTemplateFiller.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/GenErrorTemplateFiller.java
@@ -77,13 +77,13 @@ public class GenErrorTemplateFiller implements ICMSTemplateFiller {
         // Change end
 
         // error description if any.
-        Vector descr = cmsReq.getErrorDescr();
+        Vector<String> descr = cmsReq.getErrorDescr();
 
         if (descr != null) {
-            Enumeration num = descr.elements();
+            Enumeration<String> num = descr.elements();
 
             while (num.hasMoreElements()) {
-                String elem = (String) num.nextElement();
+                String elem = num.nextElement();
                 //System.out.println("Setting description "+elem.toString());
                 IArgBlock argBlock = CMS.createArgBlock();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/GenRejectedTemplateFiller.java b/pki/base/common/src/com/netscape/cms/servlet/common/GenRejectedTemplateFiller.java
index 3dde11475c26dc85533906e9cceac2ad603131b6..9e75cc7996260000ee1207cdf0b4c2b251b2b18c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/GenRejectedTemplateFiller.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/GenRejectedTemplateFiller.java
@@ -67,13 +67,13 @@ public class GenRejectedTemplateFiller implements ICMSTemplateFiller {
             fixed.set(ICMSTemplateFiller.REQUEST_ID, req.getRequestId());
 
             // policy errors (rejection reasons)
-            Vector messages = req.getExtDataInStringVector(IRequest.ERRORS);
+            Vector<String> messages = req.getExtDataInStringVector(IRequest.ERRORS);
 
             if (messages != null) {
-                Enumeration msgs = messages.elements();
+                Enumeration<String> msgs = messages.elements();
 
                 while (msgs.hasMoreElements()) {
-                    String ex = (String) msgs.nextElement();
+                    String ex = msgs.nextElement();
                     IArgBlock messageArgBlock = CMS.createArgBlock();
 
                     messageArgBlock.set(POLICY_MESSAGE, ex);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
index 9bb81902f43fbd9f3222fea2c9855e741a5781a9..f619110fd93202a8dc45404b493c1722ea4865a7 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
@@ -60,10 +60,10 @@ public class BaseServlet extends VelocityServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("BaseServlet:service() uri = " + httpReq.getRequestURI());
-        Enumeration paramNames = httpReq.getParameterNames();
+        Enumeration<String> paramNames = httpReq.getParameterNames();
 
         while (paramNames.hasMoreElements()) {
-            String pn = (String) paramNames.nextElement();
+            String pn = paramNames.nextElement();
             // added this facility so that password can be hidden,
             // all sensitive parameters should be prefixed with 
             // __ (double underscores); however, in the event that
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
index c81c666e6f37c096bc1df8c072d5f575c4734a44..43c707fbea76c6407f6727d542efc519b63fe952 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
@@ -54,7 +54,7 @@ import com.netscape.cms.servlet.wizard.WizardServlet;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 
 public class CertRequestPanel extends WizardPanelBase {
-    private Vector mCerts = null;
+    private Vector<Cert> mCerts = null;
     private WizardServlet mServlet = null;
 
     public CertRequestPanel() {
@@ -386,7 +386,7 @@ public class CertRequestPanel extends WizardPanelBase {
         context.put("title", "Requests and Certificates");
 
         try {
-            mCerts = new Vector();
+            mCerts = new Vector<Cert>();
 
             IConfigStore config = CMS.getConfigStore();
 
@@ -499,7 +499,7 @@ public class CertRequestPanel extends WizardPanelBase {
         }
 
         try {
-            Enumeration c = mCerts.elements();
+            Enumeration<Cert> c = mCerts.elements();
 
             String tokenname = "";
             try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigBaseServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigBaseServlet.java
index 5ae9bada83d819f859c06ac7f09ca47467579df7..dbda788f62dc362e2e55cc78d5deae0630d18d2f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigBaseServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigBaseServlet.java
@@ -57,10 +57,11 @@ public abstract class ConfigBaseServlet extends BaseServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("ConfigBaseServlet:service() uri = " + httpReq.getRequestURI());
-        Enumeration paramNames = httpReq.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> paramNames = httpReq.getParameterNames();
 
         while (paramNames.hasMoreElements()) {
-            String pn = (String) paramNames.nextElement();
+            String pn = paramNames.nextElement();
             // added this facility so that password can be hidden,
             // all sensitive parameters should be prefixed with 
             // __ (double underscores); however, in the event that
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
index 9428ecce0467f61eee864707d2d50fda961df693..ba56505427bd5b931596e908b0aa6b90c2335a6a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
@@ -44,10 +44,10 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
      */
     private static final long serialVersionUID = -330521231753992202L;
     private CryptoManager mCryptoManager = null;
-    private Vector mSupportedModules = null;
+    private Vector<Module> mSupportedModules = null;
     private Vector mOtherModules = null;
     private String mDefaultTok = null;
-    private Hashtable mCurrModTable = new Hashtable();
+    private Hashtable<String, PK11Module> mCurrModTable = new Hashtable<String, PK11Module>();
 
     public void init(ServletConfig config) throws ServletException {
         super.init(config);
@@ -57,10 +57,11 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
         try {
             // getting existing modules
             mCryptoManager = CryptoManager.getInstance();
-            Enumeration modules = mCryptoManager.getModules();
+            @SuppressWarnings("unchecked")
+            Enumeration<PK11Module> modules = mCryptoManager.getModules();
 
             while (modules.hasMoreElements()) {
-                PK11Module mod = (PK11Module) modules.nextElement();
+                PK11Module mod = modules.nextElement();
 
                 CMS.debug("ConfigHSMServlet: got module " + mod.getName());
                 mCurrModTable.put(mod.getName(), mod);
@@ -77,16 +78,16 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
      * Modules not listed as supported modules
      */
     public void loadOtherModules() {
-        Enumeration m = mCurrModTable.elements();
+        Enumeration<PK11Module> m = mCurrModTable.elements();
 
         mOtherModules = new Vector();
         while (m.hasMoreElements()) {
-            PK11Module mod = (PK11Module) m.nextElement();
-            Enumeration s = mSupportedModules.elements();
+            PK11Module mod = m.nextElement();
+            Enumeration<Module> s = mSupportedModules.elements();
             boolean found = false;
 
             while (s.hasMoreElements()) {
-                Module sm = (Module) s.nextElement();
+                Module sm = s.nextElement();
 
                 if (mod.getName().equals(sm.getCommonName())) {
                     found = true;
@@ -111,11 +112,12 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
      * find all tokens belonging to a module and load the Module
      */
     public void loadModTokens(Module module, PK11Module mod) {
-        Enumeration tokens = mod.getTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> tokens = mod.getTokens();
 
         while (tokens.hasMoreElements()) {
             try {
-                CryptoToken token = (CryptoToken) tokens.nextElement();
+                CryptoToken token = tokens.nextElement();
 
                 CMS.debug("ConfigHSMServlet: token nick name=" + token.getName());
                 CMS.debug(
@@ -145,7 +147,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
 
         // getting supported security modules
         // a Vectgor of Modules
-        mSupportedModules = new Vector();
+        mSupportedModules = new Vector<Module>();
         // read from conf store all supported modules
         try {
             int count = CMS.getConfigStore().getInteger(
@@ -172,7 +174,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
                     CMS.debug("ConfigHSMServlet: module found: " + cn);
                     module.setFound(true);
                     // add token info to module vector
-                    PK11Module m = (PK11Module) mCurrModTable.get(cn);
+                    PK11Module m = mCurrModTable.get(cn);
 
                     loadModTokens(module, m);
                 }
@@ -180,7 +182,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
                 CMS.debug("ConfigHSMServlet: adding module " + cn);
                 // add module to set
                 if (!mSupportedModules.contains(module)) {
-                    mSupportedModules.addElement((Object) module);
+                    mSupportedModules.addElement(module);
                 }
             }// for
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index 02a99283273462e2bea248d23e97e4526f82f5db..6cafe973691cbdf4fb08f507706f66b9168e3394 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -1467,9 +1467,10 @@ public class DatabasePanel extends WizardPanelBase {
             LDAPEntry entry = results.next();
             LDAPAttribute attr = entry.getAttribute("nsds5replicalastinitstatus");
             if (attr != null) {
-                Enumeration valsInAttr = attr.getStringValues();
+                @SuppressWarnings("unchecked")
+                Enumeration<String> valsInAttr = attr.getStringValues();
                 if (valsInAttr.hasMoreElements()) {
-                    return (String) valsInAttr.nextElement();
+                    return valsInAttr.nextElement();
                 } else {
                     throw new IOException("No value returned for nsds5replicalastinitstatus");
                 }
@@ -1496,14 +1497,16 @@ public class DatabasePanel extends WizardPanelBase {
                 String dn = entry.getDN();
                 CMS.debug("DatabasePanel getInstanceDir: DN for storing nsslapd-directory: " + dn);
                 LDAPAttributeSet entryAttrs = entry.getAttributeSet();
-                Enumeration attrsInSet = entryAttrs.getAttributes();
+                @SuppressWarnings("unchecked")
+                Enumeration<LDAPAttribute> attrsInSet = entryAttrs.getAttributes();
                 while (attrsInSet.hasMoreElements()) {
-                    LDAPAttribute nextAttr = (LDAPAttribute) attrsInSet.nextElement();
+                    LDAPAttribute nextAttr = attrsInSet.nextElement();
                     String attrName = nextAttr.getName();
                     CMS.debug("DatabasePanel getInstanceDir: attribute name: " + attrName);
-                    Enumeration valsInAttr = nextAttr.getStringValues();
+                    @SuppressWarnings("unchecked")
+                    Enumeration<String> valsInAttr = nextAttr.getStringValues();
                     while (valsInAttr.hasMoreElements()) {
-                        String nextValue = (String) valsInAttr.nextElement();
+                        String nextValue = valsInAttr.nextElement();
                         if (attrName.equalsIgnoreCase("nsslapd-directory")) {
                             CMS.debug("DatabasePanel getInstanceDir: instanceDir=" + nextValue);
                             return nextValue.substring(0, nextValue.lastIndexOf("/db"));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
index 1ff06416e183f1d5ff060eee00bcc80588ab0796..c9a900a0bedb0099c4715b19713b4e6f2acd0fec 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
@@ -141,7 +141,7 @@ public class GetConfigEntries extends CMSServlet {
             while (t.hasMoreTokens()) {
                 String name1 = t.nextToken();
                 IConfigStore cs = config.getSubStore(name1);
-                Enumeration enum1 = cs.getPropertyNames();
+                Enumeration<String> enum1 = cs.getPropertyNames();
 
                 while (enum1.hasMoreElements()) {
                     String name = name1 + "." + enum1.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
index 04d88dba747b315f1de0efa98e6ed4c4ca2b3723..45c5192aa5571626b8653b9d720d35174151e7b1 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
@@ -144,9 +144,10 @@ public class GetDomainXML extends CMSServlet {
                             Node node = xmlObj.createContainer(listNode, subType);
                             LDAPEntry entry = res2.next();
                             LDAPAttributeSet entryAttrs = entry.getAttributeSet();
-                            Enumeration attrsInSet = entryAttrs.getAttributes();
+                            @SuppressWarnings("unchecked")
+                            Enumeration<LDAPAttribute> attrsInSet = entryAttrs.getAttributes();
                             while (attrsInSet.hasMoreElements()) {
-                                LDAPAttribute nextAttr = (LDAPAttribute) attrsInSet.nextElement();
+                                LDAPAttribute nextAttr = attrsInSet.nextElement();
                                 String attrName = nextAttr.getName();
                                 if ((!attrName.equals("cn")) && (!attrName.equals("objectClass"))) {
                                     String attrValue = (String) nextAttr.getStringValues().nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ModulePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ModulePanel.java
index f33b10230494401774f7cafa6eb9ed8f28554a33..00474615f4106ec21d262fe4a709086c5448a11e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ModulePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ModulePanel.java
@@ -45,9 +45,9 @@ import com.netscape.cmsutil.crypto.Module;
 
 public class ModulePanel extends WizardPanelBase {
     private CryptoManager mCryptoManager = null;
-    private Vector mSupportedModules = null;
-    private Vector mOtherModules = null;
-    private Hashtable mCurrModTable = new Hashtable();
+    private Vector<Module> mSupportedModules = null;
+    private Vector<Module> mOtherModules = null;
+    private Hashtable<String, PK11Module> mCurrModTable = new Hashtable<String, PK11Module>();
     private WizardServlet mServlet = null;
 
     public ModulePanel() {
@@ -79,10 +79,11 @@ public class ModulePanel extends WizardPanelBase {
         try {
             // getting existing modules
             mCryptoManager = CryptoManager.getInstance();
-            Enumeration modules = mCryptoManager.getModules();
+            @SuppressWarnings("unchecked")
+            Enumeration<PK11Module> modules = mCryptoManager.getModules();
 
             while (modules.hasMoreElements()) {
-                PK11Module mod = (PK11Module) modules.nextElement();
+                PK11Module mod = modules.nextElement();
 
                 CMS.debug("ModulePanel: got module " + mod.getName());
                 mCurrModTable.put(mod.getName(), mod);
@@ -99,16 +100,16 @@ public class ModulePanel extends WizardPanelBase {
      * Modules not listed as supported modules
      */
     public void loadOtherModules() {
-        Enumeration m = mCurrModTable.elements();
+        Enumeration<PK11Module> m = mCurrModTable.elements();
 
-        mOtherModules = new Vector();
+        mOtherModules = new Vector<Module>();
         while (m.hasMoreElements()) {
-            PK11Module mod = (PK11Module) m.nextElement();
-            Enumeration s = mSupportedModules.elements();
+            PK11Module mod = m.nextElement();
+            Enumeration<Module> s = mSupportedModules.elements();
             boolean found = false;
 
             while (s.hasMoreElements()) {
-                Module sm = (Module) s.nextElement();
+                Module sm = s.nextElement();
 
                 if (mod.getName().equals(sm.getCommonName())) {
                     found = true;
@@ -123,7 +124,7 @@ public class ModulePanel extends WizardPanelBase {
 
                 loadModTokens(module, mod);
                 module.setFound(true);
-                mOtherModules.addElement((Object) module);
+                mOtherModules.addElement(module);
                 break;
             }
         }// while
@@ -133,11 +134,12 @@ public class ModulePanel extends WizardPanelBase {
      * find all tokens belonging to a module and load the Module
      */
     public void loadModTokens(Module module, PK11Module mod) {
-        Enumeration tokens = mod.getTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> tokens = mod.getTokens();
 
         while (tokens.hasMoreElements()) {
             try {
-                CryptoToken token = (CryptoToken) tokens.nextElement();
+                CryptoToken token = tokens.nextElement();
 
                 CMS.debug("ModulePanel: token nick name=" + token.getName());
                 CMS.debug("ModulePanel: token logged in?" + token.isLoggedIn());
@@ -164,7 +166,7 @@ public class ModulePanel extends WizardPanelBase {
 
         // getting supported security modules
         // a Vectgor of Modules
-        mSupportedModules = new Vector();
+        mSupportedModules = new Vector<Module>();
         // read from conf store all supported modules
         try {
             int count = CMS.getConfigStore().getInteger(
@@ -191,7 +193,7 @@ public class ModulePanel extends WizardPanelBase {
                     CMS.debug("ModulePanel: module found: " + cn);
                     module.setFound(true);
                     // add token info to module vector
-                    PK11Module m = (PK11Module) mCurrModTable.get(cn);
+                    PK11Module m = mCurrModTable.get(cn);
 
                     loadModTokens(module, m);
                 }
@@ -199,7 +201,7 @@ public class ModulePanel extends WizardPanelBase {
                 CMS.debug("ModulePanel: adding module " + cn);
                 // add module to set
                 if (!mSupportedModules.contains(module)) {
-                    mSupportedModules.addElement((Object) module);
+                    mSupportedModules.addElement(module);
                 }
             }// for
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
index 9e0ca6f381d47efa33d72a066d60f490707964d4..da721b29cc944a753146989104be49696c6b3a64 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
@@ -50,7 +50,7 @@ import com.netscape.cms.servlet.wizard.WizardServlet;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 
 public class NamePanel extends WizardPanelBase {
-    private Vector mCerts = null;
+    private Vector<Cert> mCerts = null;
     private WizardServlet mServlet = null;
 
     public NamePanel() {
@@ -172,7 +172,7 @@ public class NamePanel extends WizardPanelBase {
             CMS.setConfigSDSessionId(session_id);
         }
 
-        mCerts = new Vector();
+        mCerts = new Vector<Cert>();
 
         String domainname = "";
         IConfigStore config = CMS.getConfigStore();
@@ -320,10 +320,10 @@ public class NamePanel extends WizardPanelBase {
     public void validate(HttpServletRequest request,
             HttpServletResponse response,
             Context context) throws IOException {
-        Enumeration c = mCerts.elements();
+        Enumeration<Cert> c = mCerts.elements();
 
         while (c.hasMoreElements()) {
-            Cert cert = (Cert) c.nextElement();
+            Cert cert = c.nextElement();
             // get the dn's and put in config
             if (cert.isEnable()) {
                 String dn = HttpInput.getDN(request, cert.getCertTag());
@@ -632,11 +632,11 @@ public class NamePanel extends WizardPanelBase {
             HttpServletResponse response,
             Context context, String tag) throws IOException {
         CMS.debug("NamePanel: configCertWithTag start");
-        Enumeration c = mCerts.elements();
+        Enumeration<Cert> c = mCerts.elements();
         IConfigStore config = CMS.getConfigStore();
 
         while (c.hasMoreElements()) {
-            Cert cert = (Cert) c.nextElement();
+            Cert cert = c.nextElement();
             String ct = cert.getCertTag();
             CMS.debug("NamePanel: configCertWithTag ct=" + ct +
                         " tag=" + tag);
@@ -673,10 +673,10 @@ public class NamePanel extends WizardPanelBase {
 
         boolean hasChanged = false;
         try {
-            Enumeration c = mCerts.elements();
+            Enumeration<Cert> c = mCerts.elements();
 
             while (c.hasMoreElements()) {
-                Cert cert = (Cert) c.nextElement();
+                Cert cert = c.nextElement();
                 String ct = cert.getCertTag();
                 boolean enable = config.getBoolean(PCERT_PREFIX + ct + ".enable", true);
                 if (!enable)
@@ -828,10 +828,10 @@ public class NamePanel extends WizardPanelBase {
 
         try {
 
-            Enumeration c = mCerts.elements();
+            Enumeration<Cert> c = mCerts.elements();
 
             while (c.hasMoreElements()) {
-                Cert cert = (Cert) c.nextElement();
+                Cert cert = c.nextElement();
                 String ct = cert.getCertTag();
                 String tokenname = cert.getTokenname();
                 boolean enable = config.getBoolean(PCERT_PREFIX + ct + ".enable", true);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
index 93893bff115f177344d01b40d9e732625fae9110..a56230c2ff0c254dda9e8823edafa826da011b69 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
@@ -1077,10 +1077,10 @@ public class WizardPanelBase implements IWizardPanel {
         return v;
     }
 
-    public Vector getUrlListFromSecurityDomain(IConfigStore config,
+    public Vector<String> getUrlListFromSecurityDomain(IConfigStore config,
                                                 String type,
                                                 String portType) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         try {
             String hostname = config.getString("securitydomain.host");
@@ -1124,13 +1124,13 @@ public class WizardPanelBase implements IWizardPanel {
 
             CMS.debug("Len " + len);
             for (int i = 0; i < len; i++) {
-                Vector v_name = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_name = parser.getValuesFromContainer(nodeList.item(i),
                         "SubsystemName");
-                Vector v_host = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_host = parser.getValuesFromContainer(nodeList.item(i),
                         "Host");
-                Vector v_port = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_port = parser.getValuesFromContainer(nodeList.item(i),
                         portType);
-                Vector v_admin_port = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_admin_port = parser.getValuesFromContainer(nodeList.item(i),
                         "SecureAdminPort");
 
                 if (v_host.elementAt(0).equals(hostname)
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java b/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
index 79bb937eddc47c2927d0c207904fbf10767b8845..0019c95084ec421dc27e79f22339f52b971a09bc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
@@ -142,7 +142,7 @@ public class GetApprovalStatus extends CMSServlet {
 
             header.addStringValue("recoveryID", recoveryID);
 
-            Hashtable params = mService.getRecoveryParams(recoveryID);
+            Hashtable<String, Object> params = mService.getRecoveryParams(recoveryID);
 
             if (params == null) {
                 log(ILogger.LL_FAILURE,
@@ -157,13 +157,13 @@ public class GetApprovalStatus extends CMSServlet {
 
             header.addIntegerValue("noOfRequiredAgents", requiredNumber);
 
-            Vector dc = ((IKeyRecoveryAuthority) mService).getAppAgents(recoveryID);
-            Enumeration agents = dc.elements();
+            Vector<Credential> dc = ((IKeyRecoveryAuthority) mService).getAppAgents(recoveryID);
+            Enumeration<Credential> agents = dc.elements();
 
             while (agents.hasMoreElements()) {
                 IArgBlock rarg = CMS.createArgBlock();
 
-                rarg.addStringValue("agentName", ((Credential) agents.nextElement()).getIdentifier());
+                rarg.addStringValue("agentName", agents.nextElement().getIdentifier());
                 argSet.addRepeatRecord(rarg);
             }
             if (dc.size() >= requiredNumber) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileApproveServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileApproveServlet.java
index ebd0b6c0c62f8c7220a75cb5c49c02f6aa18c27a..48848695f4b89cb7e94b3b446b98b6cb2f473603 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileApproveServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileApproveServlet.java
@@ -371,20 +371,19 @@ public class ProfileApproveServlet extends ProfileServlet {
             return;
         }
 
-        Enumeration policySetIds = profile.getProfilePolicySetIds();
+        Enumeration<String> policySetIds = profile.getProfilePolicySetIds();
 
         ArgList setlist = new ArgList();
 
         while (policySetIds.hasMoreElements()) {
-            String setId = (String) policySetIds.nextElement();
+            String setId = policySetIds.nextElement();
 
-            Enumeration policyIds = profile.getProfilePolicyIds(setId);
+            Enumeration<String> policyIds = profile.getProfilePolicyIds(setId);
             ArgList list = new ArgList();
 
             while (policyIds.hasMoreElements()) {
-                String id = (String) policyIds.nextElement();
-                IProfilePolicy policy = (IProfilePolicy)
-                        profile.getProfilePolicy(setId, id);
+                String id = policyIds.nextElement();
+                IProfilePolicy policy = profile.getProfilePolicy(setId, id);
 
                 // (3) query all the profile policies
                 // (4) default plugins convert request parameters
@@ -424,12 +423,12 @@ public class ProfileApproveServlet extends ProfileServlet {
         set.set(ARG_DEF_DESC, dDesc);
 
         ArgList deflist = new ArgList();
-        Enumeration defNames = def.getValueNames();
+        Enumeration<String> defNames = def.getValueNames();
 
         if (defNames != null) {
             while (defNames.hasMoreElements()) {
                 ArgSet defset = new ArgSet();
-                String defName = (String) defNames.nextElement();
+                String defName = defNames.nextElement();
                 IDescriptor defDesc = def.getValueDescriptor(locale, defName);
                 if (defDesc == null) {
                     CMS.debug("defName=" + defName);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileListServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileListServlet.java
index 8581b3caa957dc407530b5ec4177195c0a5f37d4..2ca5f0a5cc3d90c577cbfd9174249cd6ccb7a79c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileListServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileListServlet.java
@@ -126,7 +126,7 @@ public class ProfileListServlet extends ProfileServlet {
         }
 
         ArgList list = new ArgList();
-        Enumeration e = ps.getProfileIds();
+        Enumeration<String> e = ps.getProfileIds();
 
         if (e != null) {
             while (e.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
index 8a8d65d90ac72c95746c5173766a26c67de91afd..3c75be021637b66a589bd582ed5b06f1d5859ca8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileProcessServlet.java
@@ -60,6 +60,7 @@ import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.certsrv.template.ArgList;
 import com.netscape.certsrv.template.ArgSet;
 import com.netscape.certsrv.util.IStatsSubsystem;
+import com.netscape.cms.profile.common.ProfilePolicy;
 import com.netscape.cms.servlet.common.CMSRequest;
 
 /**
@@ -691,11 +692,11 @@ public class ProfileProcessServlet extends ProfileServlet {
             req.setRequestStatus(RequestStatus.COMPLETE);
 
             ArgList outputlist = new ArgList();
-            Enumeration outputIds = profile.getProfileOutputIds();
+            Enumeration<String> outputIds = profile.getProfileOutputIds();
 
             if (outputIds != null) {
                 while (outputIds.hasMoreElements()) {
-                    String outputId = (String) outputIds.nextElement();
+                    String outputId = outputIds.nextElement();
                     IProfileOutput profileOutput = profile.getProfileOutput(
                             outputId);
 
@@ -779,11 +780,11 @@ public class ProfileProcessServlet extends ProfileServlet {
             throws ERejectException, EDeferException, EPropertyException {
         String profileSetId = req.getExtDataInString("profileSetId");
 
-        Enumeration policies = profile.getProfilePolicies(profileSetId);
+        Enumeration<ProfilePolicy> policies = profile.getProfilePolicies(profileSetId);
         int count = 0;
 
         while (policies.hasMoreElements()) {
-            IProfilePolicy policy = (IProfilePolicy) policies.nextElement();
+            ProfilePolicy policy = policies.nextElement();
 
             setValue(locale, count, policy, req, request);
             count++;
@@ -792,7 +793,7 @@ public class ProfileProcessServlet extends ProfileServlet {
         policies = profile.getProfilePolicies(profileSetId);
         count = 0;
         while (policies.hasMoreElements()) {
-            IProfilePolicy policy = (IProfilePolicy) policies.nextElement();
+            ProfilePolicy policy = policies.nextElement();
 
             validate(locale, count, policy, req, request);
             count++;
@@ -821,10 +822,10 @@ public class ProfileProcessServlet extends ProfileServlet {
             throws EPropertyException {
         // handle default policy
         IPolicyDefault def = policy.getDefault();
-        Enumeration defNames = def.getValueNames();
+        Enumeration<String> defNames = def.getValueNames();
 
         while (defNames.hasMoreElements()) {
-            String defName = (String) defNames.nextElement();
+            String defName = defNames.nextElement();
             String defValue = request.getParameter(defName);
 
             def.setValue(defName, locale, req, defValue);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
index 11aaa74997489b3a0af8a8fa33ac0e0de25cca67..6c273311571907df795416f7a6bf266431204fdc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
@@ -234,15 +234,15 @@ public class ProfileReviewServlet extends ProfileServlet {
         String profileSetId = req.getExtDataInString("profileSetId");
 
         CMS.debug("ProfileReviewServlet: profileSetId=" + profileSetId);
-        Enumeration policyIds = (profileSetId != null && profileSetId.length() > 0) ?
+        Enumeration<String> policyIds = (profileSetId != null && profileSetId.length() > 0) ?
                                  profile.getProfilePolicyIds(profileSetId) : null;
         int count = 0;
         ArgList list = new ArgList();
 
         if (policyIds != null) {
             while (policyIds.hasMoreElements()) {
-                String id = (String) policyIds.nextElement();
-                IProfilePolicy policy = (IProfilePolicy)
+                String id = policyIds.nextElement();
+                IProfilePolicy policy =
                         profile.getProfilePolicy(req.getExtDataInString("profileSetId"),
                                 id);
 
@@ -306,19 +306,19 @@ public class ProfileReviewServlet extends ProfileServlet {
         // populate authentication parameters
 
         // populate input parameters
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
-                String inputId = (String) inputIds.nextElement();
+                String inputId = inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
 
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 if (inputNames != null) {
                     while (inputNames.hasMoreElements()) {
                         ArgSet inputset = new ArgSet();
-                        String inputName = (String) inputNames.nextElement();
+                        String inputName = inputNames.nextElement();
 
                         IDescriptor inputDesc = profileInput.getValueDescriptor(locale, inputName);
 
@@ -350,20 +350,20 @@ public class ProfileReviewServlet extends ProfileServlet {
         // if request in complete state
 
         ArgList outputlist = new ArgList();
-        Enumeration outputIds = profile.getProfileOutputIds();
+        Enumeration<String> outputIds = profile.getProfileOutputIds();
 
         if (outputIds != null) {
             while (outputIds.hasMoreElements()) {
-                String outputId = (String) outputIds.nextElement();
+                String outputId = outputIds.nextElement();
                 IProfileOutput profileOutput = profile.getProfileOutput(outputId
                         );
 
-                Enumeration outputNames = profileOutput.getValueNames();
+                Enumeration<String> outputNames = profileOutput.getValueNames();
 
                 if (outputNames != null) {
                     while (outputNames.hasMoreElements()) {
                         ArgSet outputset = new ArgSet();
-                        String outputName = (String) outputNames.nextElement
+                        String outputName = outputNames.nextElement
                                 ();
                         IDescriptor outputDesc =
                                 profileOutput.getValueDescriptor(locale, outputName);
@@ -412,12 +412,12 @@ public class ProfileReviewServlet extends ProfileServlet {
 
         set.set(ARG_DEF_DESC, dDesc);
         ArgList deflist = new ArgList();
-        Enumeration defNames = def.getValueNames();
+        Enumeration<String> defNames = def.getValueNames();
 
         if (defNames != null) {
             while (defNames.hasMoreElements()) {
                 ArgSet defset = new ArgSet();
-                String defName = (String) defNames.nextElement();
+                String defName = defNames.nextElement();
                 IDescriptor defDesc = def.getValueDescriptor(locale, defName);
 
                 if (defDesc == null)
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSelectServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSelectServlet.java
index 462c628b2fa2c0e146fdf79d38229fb9b018d859..5b07951f8f176f8fc5552cda90044943eb022cd3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSelectServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSelectServlet.java
@@ -189,18 +189,18 @@ public class ProfileSelectServlet extends ProfileServlet {
         }
 
         ArgList setlist = new ArgList();
-        Enumeration policySetIds = profile.getProfilePolicySetIds();
+        Enumeration<String> policySetIds = profile.getProfilePolicySetIds();
 
         if (policySetIds != null) {
             while (policySetIds.hasMoreElements()) {
-                String setId = (String) policySetIds.nextElement();
+                String setId = policySetIds.nextElement();
 
                 ArgList list = new ArgList();
-                Enumeration policyIds = profile.getProfilePolicyIds(setId);
+                Enumeration<String> policyIds = profile.getProfilePolicyIds(setId);
 
                 if (policyIds != null) {
                     while (policyIds.hasMoreElements()) {
-                        String id = (String) policyIds.nextElement();
+                        String id = policyIds.nextElement();
                         IProfilePolicy policy = (IProfilePolicy)
                                 profile.getProfilePolicy(setId, id);
 
@@ -264,12 +264,12 @@ public class ProfileSelectServlet extends ProfileServlet {
         }
 
         if (authenticator != null) {
-            Enumeration authNames = authenticator.getValueNames();
+            Enumeration<String> authNames = authenticator.getValueNames();
 
             if (authNames != null) {
                 while (authNames.hasMoreElements()) {
                     ArgSet authset = new ArgSet();
-                    String authName = (String) authNames.nextElement();
+                    String authName = authNames.nextElement();
                     IDescriptor authDesc =
                             authenticator.getValueDescriptor(locale, authName);
 
@@ -296,11 +296,11 @@ public class ProfileSelectServlet extends ProfileServlet {
         // build input list
         ArgList inputlist = new ArgList();
         ArgList inputPluginlist = new ArgList();
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
-                String inputId = (String) inputIds.nextElement();
+                String inputId = inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
 
                 if (profileInput != null) {
@@ -313,12 +313,12 @@ public class ProfileSelectServlet extends ProfileServlet {
                             profileInput.getText(locale));
                     inputPluginlist.add(inputpluginset);
 
-                    Enumeration inputNames = profileInput.getValueNames();
+                    Enumeration<String> inputNames = profileInput.getValueNames();
 
                     if (inputNames != null) {
                         while (inputNames.hasMoreElements()) {
                             ArgSet inputset = new ArgSet();
-                            String inputName = (String) inputNames.nextElement();
+                            String inputName = inputNames.nextElement();
                             IDescriptor inputDesc = profileInput.getValueDescriptor(
                                     locale, inputName);
 
@@ -362,12 +362,12 @@ public class ProfileSelectServlet extends ProfileServlet {
 
         set.set(ARG_DEF_DESC, dDesc);
         ArgList deflist = new ArgList();
-        Enumeration defNames = def.getValueNames();
+        Enumeration<String> defNames = def.getValueNames();
 
         if (defNames != null) {
             while (defNames.hasMoreElements()) {
                 ArgSet defset = new ArgSet();
-                String defName = (String) defNames.nextElement();
+                String defName = defNames.nextElement();
                 IDescriptor defDesc = def.getValueDescriptor(locale, defName);
 
                 if (defDesc == null)
@@ -393,11 +393,11 @@ public class ProfileSelectServlet extends ProfileServlet {
 
         set.set(ARG_CON_DESC, conDesc);
         ArgList conlist = new ArgList();
-        Enumeration conNames = con.getConfigNames();
+        Enumeration<String> conNames = con.getConfigNames();
         if (conNames != null) {
             while (conNames.hasMoreElements()) {
                 ArgSet conset = new ArgSet();
-                String conName = (String) conNames.nextElement();
+                String conName = conNames.nextElement();
                 conset.set(ARG_CON_NAME, conName);
                 conset.set(ARG_CON_VALUE, con.getConfig(conName));
                 conlist.add(conset);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java
index 368e36590b0866d8628d54293b951122f6e28665..7bc6304be85fcc794ba2bf56c819b4d49990b1e9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java
@@ -215,9 +215,9 @@ public class ProfileServlet extends CMSServlet {
             } else if (v instanceof ArgSet) {
                 ArgSet set = (ArgSet) v;
                 ps.println("<set>");
-                Enumeration names = set.getNames();
+                Enumeration<String> names = set.getNames();
                 while (names.hasMoreElements()) {
-                    String n = (String) names.nextElement();
+                    String n = names.nextElement();
                     outputArgValueAsXML(ps, n, set.get(n));
                 }
                 ps.println("</set>");
@@ -426,10 +426,10 @@ public class ProfileServlet extends CMSServlet {
 
     protected void outputArgSet(PrintWriter writer, String name, ArgSet set)
             throws IOException {
-        Enumeration e = set.getNames();
+        Enumeration<String> e = set.getNames();
 
         while (e.hasMoreElements()) {
-            String n = (String) e.nextElement();
+            String n = e.nextElement();
             IArgValue val = set.get(n);
 
             if (val instanceof ArgSet) {
@@ -452,10 +452,10 @@ public class ProfileServlet extends CMSServlet {
             throws IOException {
         if (set == null)
             return;
-        Enumeration e = set.getNames();
+        Enumeration<String> e = set.getNames();
 
         while (e.hasMoreElements()) {
-            String n = (String) e.nextElement();
+            String n = e.nextElement();
             IArgValue val = set.get(n);
 
             if (val instanceof ArgSet) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
index 04a2c55d50c1ef38b07fb9e1c490715b86dae4d6..d021ef3878ce3c786531f4a1b71bab2ea85a6001 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
@@ -120,16 +120,16 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
     private void setInputsIntoContext(HttpServletRequest request, IProfile profile, IProfileContext ctx) {
 
         // passing inputs into context
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
-                String inputId = (String) inputIds.nextElement();
+                String inputId = inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
-                    String inputName = (String) inputNames.nextElement();
+                    String inputName = inputNames.nextElement();
 
                     if (request.getParameter(inputName) != null) {
                         ctx.set(inputName, request.getParameter(inputName));
@@ -142,11 +142,11 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
 
     private void setCredentialsIntoContext(HttpServletRequest request, IProfileAuthenticator authenticator,
             IProfileContext ctx) {
-        Enumeration authIds = authenticator.getValueNames();
+        Enumeration<String> authIds = authenticator.getValueNames();
 
         if (authIds != null) {
             while (authIds.hasMoreElements()) {
-                String authName = (String) authIds.nextElement();
+                String authName = authIds.nextElement();
 
                 if (request.getParameter(authName) != null) {
                     ctx.set(authName, request.getParameter(authName));
@@ -160,11 +160,11 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
         AuthCredentials credentials = new AuthCredentials();
 
         // build credential
-        Enumeration authNames = authenticator.getValueNames();
+        Enumeration<String> authNames = authenticator.getValueNames();
 
         if (authNames != null) {
             while (authNames.hasMoreElements()) {
-                String authName = (String) authNames.nextElement();
+                String authName = authNames.nextElement();
 
                 if (authName.equals("cert_request"))
                     credentials.set(authName, requestB64);
@@ -188,17 +188,17 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
 
     private void setInputsIntoRequest(HttpServletRequest request, IProfile
             profile, IRequest req) {
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
-                String inputId = (String) inputIds.nextElement();
+                String inputId = inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 if (inputNames != null) {
                     while (inputNames.hasMoreElements()) {
-                        String inputName = (String) inputNames.nextElement();
+                        String inputName = inputNames.nextElement();
 
                         if (request.getParameter(inputName) != null) {
                             req.setExtData(inputName, request.getParameter(inputName));
@@ -262,10 +262,11 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
 
         if (CMS.debugOn()) {
             CMS.debug("Start of ProfileSubmitCMCServlet Input Parameters");
-            Enumeration paramNames = request.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> paramNames = request.getParameterNames();
 
             while (paramNames.hasMoreElements()) {
-                String paramName = (String) paramNames.nextElement();
+                String paramName = paramNames.nextElement();
                 // added this facility so that password can be hidden,
                 // all sensitive parameters should be prefixed with 
                 // __ (double underscores); however, in the event that
@@ -552,9 +553,9 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
 
             // serial auth token into request
             if (authToken != null) {
-                Enumeration tokenNames = authToken.getElements();
+                Enumeration<String> tokenNames = authToken.getElements();
                 while (tokenNames.hasMoreElements()) {
-                    String tokenName = (String) tokenNames.nextElement();
+                    String tokenName = tokenNames.nextElement();
                     String[] vals = authToken.getInStringArray(tokenName);
                     if (vals != null) {
                         for (int i = 0; i < vals.length; i++) {
@@ -659,9 +660,9 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
 
                     // print request debug
                     if (reqs[k] != null) {
-                        Enumeration reqKeys = reqs[k].getExtDataKeys();
+                        Enumeration<String> reqKeys = reqs[k].getExtDataKeys();
                         while (reqKeys.hasMoreElements()) {
-                            String reqKey = (String) reqKeys.nextElement();
+                            String reqKey = reqKeys.nextElement();
                             String reqVal = reqs[k].getExtDataInString(reqKey);
                             if (reqVal != null) {
                                 CMS.debug("ProfileSubmitCMCServlet: key=$request." + reqKey + "$ value=" + reqVal);
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
index c4b14dc10c3c46ba15b0cdef3e536a49a110191b..6604fea5b92938f750cc84f98bdfe2b2b4347de9 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
@@ -17,6 +17,7 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmscore.apps;
 
+import java.util.Enumeration;
 import java.util.Hashtable;
 
 import javax.servlet.Servlet;
@@ -82,7 +83,7 @@ public class CommandQueue implements Runnable, ICommandQueue {
     }
 
     public void unRegisterProccess(Object currentRequest, Object currentServlet) {
-        java.util.Enumeration e = mCommandQueue.keys();
+        Enumeration<CMSRequest> e = mCommandQueue.keys();
 
         while (e.hasMoreElements()) {
             Object thisRequest = e.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/base/FileConfigStore.java b/pki/base/common/src/com/netscape/cmscore/base/FileConfigStore.java
index 8aac76e70711cacb90a00e67cb5dfc693454ac35..f0c52866e40f63853afcdc6bb9029f9586366858 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/FileConfigStore.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/FileConfigStore.java
@@ -172,8 +172,8 @@ public class FileConfigStore extends PropConfigStore implements
             String name) throws EBaseException,
             IOException {
         // print keys
-        Enumeration e0 = store.getPropertyNames();
-        Vector v = new Vector();
+        Enumeration<String> e0 = store.getPropertyNames();
+        Vector<String> v = new Vector<String>();
 
         while (e0.hasMoreElements()) {
             v.addElement(e0.nextElement());
@@ -197,7 +197,7 @@ public class FileConfigStore extends PropConfigStore implements
         }
 
         // print substores
-        Enumeration e1 = store.getSubStoreNames();
+        Enumeration<String> e1 = store.getSubStoreNames();
 
         while (e1.hasMoreElements()) {
             v.addElement(e1.nextElement());
diff --git a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
index d587a81f5ffd365acccf9e2602c3900a28321379..1f453a573babc06ff2cd4ebe0fc8a42ba8574bcf 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
@@ -170,8 +170,8 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * @see java.util.Hashtable#elements
      * @see java.util.Enumeration
      */
-    public Enumeration keys() {
-        Hashtable h = new Hashtable();
+    public Enumeration<String> keys() {
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
         enumerate(h);
         return h.keys();
@@ -182,8 +182,8 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * 
      * @return hashtable
      */
-    public Hashtable hashtable() {
-        Hashtable h = new Hashtable();
+    public Hashtable<String, Object> hashtable() {
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
         enumerate(h);
         return h;
@@ -193,7 +193,7 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * Return the number of items in this substore
      */
     public int size() {
-        Hashtable h = new Hashtable();
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
         enumerate(h);
         return h.size();
@@ -206,8 +206,8 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * 
      * @param h the hashtable
      */
-    private synchronized void enumerate(Hashtable h) {
-        Enumeration e = mSource.keys();
+    private synchronized void enumerate(Hashtable<String, Object> h) {
+        Enumeration<String> e = mSource.keys();
         // We only want the keys which match the current substore name
         // without the current substore prefix.  This code works even
         // if mStoreName is null.
@@ -215,7 +215,7 @@ public class PropConfigStore implements IConfigStore, Cloneable {
         int kIndex = fullName.length();
 
         while (e.hasMoreElements()) {
-            String key = (String) e.nextElement();
+            String key = e.nextElement();
 
             if (key.startsWith(fullName)) {
                 h.put(key.substring(kIndex), nakedGet(key));
@@ -589,10 +589,11 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * 
      * @param name substore name
      */
+    @SuppressWarnings("unchecked")
     public void removeSubStore(String name) {
         // this operation is expensive!!!
 
-        Enumeration e = mSource.keys();
+        Enumeration<String> e = mSource.keys();
         // We only want the keys which match the current substore name
         // without the current substore prefix.  This code works even
         // if mStoreName is null.
@@ -600,10 +601,10 @@ public class PropConfigStore implements IConfigStore, Cloneable {
         int kIndex = fullName.length();
 
         while (e.hasMoreElements()) {
-            String key = (String) e.nextElement();
+            String key = e.nextElement();
 
             if (key.startsWith(fullName + ".")) {
-                ((Hashtable) mSource).remove(key);
+                ((Hashtable<String, String>) mSource).remove(key);
             }
         }
     }
@@ -649,16 +650,16 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * 
      * @return a list of string-based property names
      */
-    public Enumeration getPropertyNames() {
+    public Enumeration<String> getPropertyNames() {
         // XXX - this operation is expensive!!!
-        Hashtable h = new Hashtable();
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
         enumerate(h);
-        Enumeration e = h.keys();
-        Vector v = new Vector();
+        Enumeration<String> e = h.keys();
+        Vector<String> v = new Vector<String>();
 
         while (e.hasMoreElements()) {
-            String pname = (String) e.nextElement();
+            String pname = e.nextElement();
             int i = pname.indexOf('.'); // substores have "."
 
             if (i == -1) {
@@ -678,16 +679,16 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * 
      * @return list of substore names
      */
-    public Enumeration getSubStoreNames() {
+    public Enumeration<String> getSubStoreNames() {
         // XXX - this operation is expensive!!!
-        Hashtable h = new Hashtable();
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
         enumerate(h);
-        Enumeration e = h.keys();
-        Vector v = new Vector();
+        Enumeration<String> e = h.keys();
+        Vector<String> v = new Vector<String>();
 
         while (e.hasMoreElements()) {
-            String pname = (String) e.nextElement();
+            String pname = e.nextElement();
             int i = pname.indexOf('.'); // substores have "."
 
             if (i != -1) {
@@ -717,10 +718,10 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * substore.
      */
     public void printProperties() {
-        Enumeration keys = mSource.keys();
+        Enumeration<String> keys = mSource.keys();
 
         while (keys.hasMoreElements()) {
-            String key = (String) keys.nextElement();
+            String key = keys.nextElement();
 
             if (mStoreName == null) {
                 System.out.println(key);
@@ -762,10 +763,10 @@ public class PropConfigStore implements IConfigStore, Cloneable {
                         subs.nextElement();
                 IConfigStore newSub = that.makeSubStore(
                         sub.getName());
-                Enumeration props = sub.getPropertyNames();
+                Enumeration<String> props = sub.getPropertyNames();
 
                 while (props.hasMoreElements()) {
-                    String n = (String) props.nextElement();
+                    String n = props.nextElement();
 
                     try {
                         newSub.putString(n,
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CrossCertPairSubsystem.java b/pki/base/common/src/com/netscape/cmscore/cert/CrossCertPairSubsystem.java
index dbc0c607f518a7f4b8f90430d3a04be87d58d2d6..8d8a337c592a78398795d637b8b8fa797f54ba56 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CrossCertPairSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CrossCertPairSubsystem.java
@@ -204,7 +204,8 @@ public class CrossCertPairSubsystem implements ICrossCertPairSubsystem {
                     return;
                 }
 
-                Enumeration en = caCerts.getByteValues();
+                @SuppressWarnings("unchecked")
+                Enumeration<byte[]> en = caCerts.getByteValues();
 
                 if ((en == null) || (en.hasMoreElements() == false)) {
                     debug("1st potential xcert");
@@ -216,7 +217,7 @@ public class CrossCertPairSubsystem implements ICrossCertPairSubsystem {
                 boolean match = false;
 
                 while (en.hasMoreElements()) {
-                    val = (byte[]) en.nextElement();
+                    val = en.nextElement();
                     debug("val =" + val.length);
                     if (val.length == 0) {
                         continue;
@@ -332,11 +333,12 @@ public class CrossCertPairSubsystem implements ICrossCertPairSubsystem {
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
-            val = (byte[]) vals.nextElement();
+            val = vals.nextElement();
             if (val.length == 0)
                 continue;
             if (byteArraysAreEqual(val, bval)) {
@@ -418,7 +420,8 @@ public class CrossCertPairSubsystem implements ICrossCertPairSubsystem {
                     return;
                 }
 
-                Enumeration en = xcerts.getByteValues();
+                @SuppressWarnings("unchecked")
+                Enumeration<byte[]> en = xcerts.getByteValues();
 
                 if ((en == null) || (en.hasMoreElements() == false)) {
                     debug("publishCertPair found no pairs in internal db");
@@ -427,7 +430,7 @@ public class CrossCertPairSubsystem implements ICrossCertPairSubsystem {
                 byte[] val = null;
 
                 while (en.hasMoreElements()) {
-                    val = (byte[]) en.nextElement();
+                    val = en.nextElement();
                     debug("val =" + val.length);
                     if (val.length == 0) {
                         continue;
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java b/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
index af72fee45d0c2a4f212f47a707ef72188fcc81e8..d7024f4ad58520a74846bd7a327e040f205509a8 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
@@ -43,7 +43,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
     public String reqType = "";
     public String reqId = "";
     protected String reqStatus = "";
-    protected Vector mNameVals = new Vector(); // sequence of name/vals.
+    protected Vector<Object> mNameVals = new Vector<Object>(); // sequence of name/vals.
 
     public HttpPKIMessage() {
     }
@@ -94,6 +94,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
     /**
      * copy contents to request.
      */
+    @SuppressWarnings("unchecked")
     public void toRequest(IRequest r) {
         // id, type and status 
         // type had to have been set in instantiation.
@@ -105,7 +106,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
         int len = RequestTransfer.getTransferAttributes(r).length;
         String key;
         Object value;
-        Enumeration enum1 = mNameVals.elements();
+        Enumeration<Object> enum1 = mNameVals.elements();
 
         while (enum1.hasMoreElements()) {
             key = (String) enum1.nextElement();
@@ -137,7 +138,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
         out.writeObject(reqStatus);
         if (Debug.ON)
             Debug.trace("read object req source status " + reqStatus);
-        Enumeration enum1 = mNameVals.elements();
+        Enumeration<Object> enum1 = mNameVals.elements();
 
         while (enum1.hasMoreElements()) {
             Object key = null;
@@ -175,7 +176,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
         reqType = (String) in.readObject();
         reqId = (String) in.readObject();
         reqStatus = (String) in.readObject();
-        mNameVals = new Vector();
+        mNameVals = new Vector<Object>();
         Object keyorval = null;
 
         try {
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/ByteArrayMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/ByteArrayMapper.java
index a51905c79e5e7398a9c774713d84b054f5514a67..38362f3412f67525ef5cf5d4141761ea758f1349 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/ByteArrayMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/ByteArrayMapper.java
@@ -39,7 +39,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class ByteArrayMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs a byte array mapper.
@@ -52,7 +52,7 @@ public class ByteArrayMapper implements IDBAttrMapper {
     /**
      * Lists a list of supported ldap attribute names.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java b/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
index df44797f12f948a65c47c7f8d6588b5659579a3a..9f0797d40d97856cb67bd7758e5a7a3ec7cc2311 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
@@ -56,7 +56,7 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
     protected Hashtable mUnrevokedCerts = null;
     protected Hashtable mExpiredCerts = null;
     protected byte mDeltaCRL[] = null;
-    protected static Vector mNames = new Vector();
+    protected static Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(ATTR_ID);
         mNames.addElement(ATTR_CRL_NUMBER);
@@ -197,11 +197,11 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
         throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mNames.elements();
     }
 
-    public Enumeration getSerializableAttrNames() {
+    public Enumeration<String> getSerializableAttrNames() {
         return mNames.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java
index 3f5895ade905109ea3e83d144563a8d99626471a..f4074c2132d132e771e3be9ebb2841f9af7a92c5 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java
@@ -49,8 +49,8 @@ public class CertRecordMapper implements IDBAttrMapper {
         mDB = db;
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(CertDBSchema.LDAP_ATTR_CERT_RECORD_ID);
         return v.elements();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
index 9ee5be524489f0ccc18d741f96e64bddcb43c857..8b29dec532e5d7bd1e6e91c2c6dbe1e1f6d76180 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -752,10 +752,10 @@ public class CertificateRepository extends Repository
         modifyCertificateRecord(id, mods);
     }
 
-    public Enumeration searchCertificates(String filter, int maxSize)
+    public Enumeration<Object> searchCertificates(String filter, int maxSize)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
 
         CMS.debug("searchCertificates filter " + filter + " maxSize " + maxSize);
         try {
@@ -767,10 +767,10 @@ public class CertificateRepository extends Repository
         return e;
     }
 
-    public Enumeration searchCertificates(String filter, int maxSize, int timeLimit)
+    public Enumeration<Object> searchCertificates(String filter, int maxSize, int timeLimit)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
 
         CMS.debug("searchCertificateswith time limit filter " + filter);
         try {
@@ -787,11 +787,11 @@ public class CertificateRepository extends Repository
      * 
      * @deprecated replaced by <code>findCertificatesInList</code>
      */
-    public Enumeration findCertRecs(String filter)
+    public Enumeration<Object> findCertRecs(String filter)
             throws EBaseException {
         CMS.debug("findCertRecs " + filter);
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
         try {
             e = s.search(getDN(), filter);
         } finally {
@@ -801,13 +801,13 @@ public class CertificateRepository extends Repository
         return e;
     }
 
-    public Enumeration findCertRecs(String filter, String[] attrs)
+    public Enumeration<Object> findCertRecs(String filter, String[] attrs)
             throws EBaseException {
 
         CMS.debug("findCertRecs " + filter
                  + "attrs " + Arrays.toString(attrs));
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
         try {
             e = s.search(getDN(), filter, attrs);
         } finally {
@@ -820,11 +820,11 @@ public class CertificateRepository extends Repository
 
     public Enumeration<X509CertImpl> findCertificates(String filter)
             throws EBaseException {
-        Enumeration e = findCertRecords(filter);
+        Enumeration<ICertRecord> e = findCertRecords(filter);
         Vector<X509CertImpl> v = new Vector<X509CertImpl>();
 
         while (e.hasMoreElements()) {
-            CertRecord rec = (CertRecord) e.nextElement();
+            ICertRecord rec = e.nextElement();
 
             v.addElement(rec.getCertificate());
         }
@@ -837,10 +837,10 @@ public class CertificateRepository extends Repository
      * If you are going to process everything in the list,
      * use this.
      */
-    public Enumeration findCertRecords(String filter)
+    public Enumeration<ICertRecord> findCertRecords(String filter)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             //e = s.search(getDN(), filter);
@@ -1066,7 +1066,7 @@ public class CertificateRepository extends Repository
 
             list = findCertRecordsInList(filter, null, "serialno", 10);
             int size = list.getSize();
-            Enumeration e = list.getCertRecords(0, size - 1);
+            Enumeration<ICertRecord> e = list.getCertRecords(0, size - 1);
 
             tab = new Hashtable<String, RenewableCertificateCollection>();
             while (e.hasMoreElements()) {
@@ -1134,7 +1134,7 @@ public class CertificateRepository extends Repository
 
             list = findCertRecordsInList(filter, null, "serialno", 10);
             int size = list.getSize();
-            Enumeration e = list.getCertRecords(0, size - 1);
+            Enumeration<ICertRecord> e = list.getCertRecords(0, size - 1);
 
             Vector<X509CertImpl> v = new Vector<X509CertImpl>();
 
@@ -1161,7 +1161,7 @@ public class CertificateRepository extends Repository
         X509CertImpl certs[] = null;
 
         try {
-            Enumeration e = null;
+            Enumeration<ICertRecord> e = null;
 
             if (filter != null && filter.length() > 0) {
                 //e = s.search(getDN(), filter);
@@ -1197,10 +1197,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration<CertRecord> getValidCertificates(String from, String to)
+    public Enumeration<ICertRecord> getValidCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Vector<CertRecord> v = new Vector<CertRecord>();
+        Vector<ICertRecord> v = new Vector<ICertRecord>();
 
         try {
 
@@ -1256,10 +1256,10 @@ public class CertificateRepository extends Repository
     /**
      * Retrives all valid certificates excluding ones already revoked.
      */
-    public Enumeration getAllValidCertificates()
+    public Enumeration<ICertRecord> getAllValidCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1293,10 +1293,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration getValidNotPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getValidNotPublishedCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1335,10 +1335,10 @@ public class CertificateRepository extends Repository
      * Retrives all valid not published certificates
      * excluding ones already revoked.
      */
-    public Enumeration getAllValidNotPublishedCertificates()
+    public Enumeration<ICertRecord> getAllValidNotPublishedCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1374,10 +1374,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration getExpiredCertificates(String from, String to)
+    public Enumeration<ICertRecord> getExpiredCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1409,10 +1409,10 @@ public class CertificateRepository extends Repository
     /**
      * Retrives all expired certificates.
      */
-    public Enumeration getAllExpiredCertificates()
+    public Enumeration<ICertRecord> getAllExpiredCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1441,10 +1441,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration getExpiredPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getExpiredPublishedCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1480,10 +1480,10 @@ public class CertificateRepository extends Repository
     /**
      * Retrives all expired publishedcertificates.
      */
-    public Enumeration getAllExpiredPublishedCertificates()
+    public Enumeration<ICertRecord> getAllExpiredPublishedCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             Date now = CMS.getCurrentDate();
@@ -1621,10 +1621,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration getRevokedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getRevokedCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             String ldapfilter = "(&(" + CertRecord.ATTR_REVO_INFO + "=*)";
@@ -1653,10 +1653,10 @@ public class CertificateRepository extends Repository
      * Retrives all revoked certificates including ones already expired or
      * not yet valid.
      */
-    public Enumeration getAllRevokedCertificates()
+    public Enumeration<ICertRecord> getAllRevokedCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
         // index is setup for this filter
         String ldapfilter = "(|(" + CertRecord.ATTR_CERT_STATUS + "=" + CertRecord.STATUS_REVOKED + ")("
                 + CertRecord.ATTR_CERT_STATUS + "=" + CertRecord.STATUS_REVOKED_EXPIRED + "))";
@@ -1682,10 +1682,10 @@ public class CertificateRepository extends Repository
      * @param from The starting point of the serial number range.
      * @param to The ending point of the serial number range.
      */
-    public Enumeration getRevokedPublishedCertificates(String from, String to)
+    public Enumeration<ICertRecord> getRevokedPublishedCertificates(String from, String to)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
             String ldapfilter = "(&(" + CertRecord.ATTR_REVO_INFO + "=*)";
@@ -1717,10 +1717,10 @@ public class CertificateRepository extends Repository
      * Retrives all revoked published certificates including ones
      * already expired or not yet valid.
      */
-    public Enumeration getAllRevokedPublishedCertificates()
+    public Enumeration<ICertRecord> getAllRevokedPublishedCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
         // index is setup for this filter
         String ldapfilter = "(&(|(" + CertRecord.ATTR_CERT_STATUS + "=" + CertRecord.STATUS_REVOKED + ")("
                 + CertRecord.ATTR_CERT_STATUS + "=" + CertRecord.STATUS_REVOKED_EXPIRED + "))";
@@ -1746,10 +1746,10 @@ public class CertificateRepository extends Repository
     /**
      * Retrieves all revoked certificates that have not expired.
      */
-    public Enumeration getRevokedCertificates(Date asOfDate)
+    public Enumeration<ICertRecord> getRevokedCertificates(Date asOfDate)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
 
         try {
 
@@ -1778,10 +1778,10 @@ public class CertificateRepository extends Repository
     /**
      * Retrives all revoked certificates excluing ones already expired.
      */
-    public Enumeration getAllRevokedNonExpiredCertificates()
+    public Enumeration<ICertRecord> getAllRevokedNonExpiredCertificates()
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<ICertRecord> e = null;
         String ldapfilter = "(" + CertRecord.ATTR_CERT_STATUS + "=" + CertRecord.STATUS_REVOKED + ")"; // index is setup for this filter
 
         try {
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DateArrayMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/DateArrayMapper.java
index a2dfc9c01983ccc3ddb86b1c610e1501a8698f6f..20562404bc43f87e3115c96facc2d4bf92cf0857 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DateArrayMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DateArrayMapper.java
@@ -39,7 +39,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class DateArrayMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs a date array mapper.
@@ -52,7 +52,7 @@ public class DateArrayMapper implements IDBAttrMapper {
     /**
      * Retrieves a list of support ldap attributes.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
@@ -84,12 +84,12 @@ public class DateArrayMapper implements IDBAttrMapper {
 
         if (attr == null)
             return;
-        Enumeration e = attr.getStringValues();
-        Vector v = new Vector();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = attr.getStringValues();
+        Vector<Date> v = new Vector<Date>();
 
         while (e.hasMoreElements()) {
-            v.addElement(DateMapper.dateFromDB((String)
-                    e.nextElement()));
+            v.addElement(DateMapper.dateFromDB(e.nextElement()));
         }
         if (v.size() == 0)
             return;
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DateMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/DateMapper.java
index 58cd1bfee059c419ace1e94578e4ad08b04db1d3..a767758f64dd55c4ca4ed0d010b234a4626a1702 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DateMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DateMapper.java
@@ -41,7 +41,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class DateMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
     private static SimpleDateFormat formatter = new
             SimpleDateFormat("yyyyMMddHHmmss'Z'");
 
@@ -56,7 +56,7 @@ public class DateMapper implements IDBAttrMapper {
     /**
      * Retrieves a list of ldap attribute names.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/IntegerMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/IntegerMapper.java
index 8d9384927e4c3439e0a1f923b2bc32566d269ffc..8dc07e4d9fcf4199b2157516aaac9b445896f522 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/IntegerMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/IntegerMapper.java
@@ -38,7 +38,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class IntegerMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs mapper to deal with Integer.
@@ -51,7 +51,7 @@ public class IntegerMapper implements IDBAttrMapper {
     /**
      * Retrieves a list of supported ldap attributes.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecord.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecord.java
index f42377fe2e5ae993ecf6da61c3ca8d136f87606d..8f288871598532318b1e67bc5b25ea385d03a452 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecord.java
@@ -57,7 +57,7 @@ public class KeyRecord implements IDBObj, IKeyRecord {
     private Date mModifyTime = null;
     private String mArchivedBy = null;
 
-    protected static Vector mNames = new Vector();
+    protected static Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(ATTR_STATE);
         mNames.addElement(ATTR_ID);
@@ -179,14 +179,14 @@ public class KeyRecord implements IDBObj, IKeyRecord {
      * Retrieves an enumeration of attributes.
      * <P>
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mNames.elements();
     }
 
     /**
      * Retrieves serializable attribute names.
      */
-    public Enumeration getSerializableAttrNames() {
+    public Enumeration<String> getSerializableAttrNames() {
         return mNames.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
index dd0c88a97a40c699cf7f210466a2528acd369f85..34e50c711636c64da6910dccae0aba0a824e3fe4 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
@@ -34,12 +34,12 @@ import com.netscape.certsrv.dbs.keydb.IKeyRecordList;
  */
 public class KeyRecordList implements IKeyRecordList {
 
-    private IDBVirtualList mVlist = null;
+    private IDBVirtualList<Object> mVlist = null;
 
     /**
      * Constructs a key list.
      */
-    public KeyRecordList(IDBVirtualList vlist) {
+    public KeyRecordList(IDBVirtualList<Object> vlist) {
         mVlist = vlist;
     }
 
@@ -62,7 +62,7 @@ public class KeyRecordList implements IKeyRecordList {
     }
 
     public IKeyRecord getKeyRecord(int i) {
-        KeyRecord record = (KeyRecord) mVlist.getElementAt(i);
+        IKeyRecord record = (IKeyRecord) mVlist.getElementAt(i);
 
         if (record == null)
             return null;
@@ -73,12 +73,12 @@ public class KeyRecordList implements IKeyRecordList {
     /**
      * Retrieves requests.
      */
-    public Enumeration getKeyRecords(int startidx, int endidx)
+    public Enumeration<IKeyRecord> getKeyRecords(int startidx, int endidx)
             throws EBaseException {
-        Vector entries = new Vector();
+        Vector<IKeyRecord> entries = new Vector<IKeyRecord>();
 
         for (int i = startidx; i <= endidx; i++) {
-            Object element = mVlist.getElementAt(i);
+            IKeyRecord element = (IKeyRecord) mVlist.getElementAt(i);
 
             if (element != null) {
                 entries.addElement(element);
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
index 550cd15e7e2ee319159268d62933dfb47e91b7fa..1a6103492b06cb8a5b052ceed32ac894b4350dfd 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
@@ -50,8 +50,8 @@ public class KeyRecordMapper implements IDBAttrMapper {
         mDB = db;
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(KeyDBSchema.LDAP_ATTR_KEY_RECORD_ID);
         return v.elements();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyStateMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyStateMapper.java
index dc6aadff1e1e55659fa2e039356dd506b6b4bb73..2622cdbc643239c0d8a66a2a62ff50ca3ac83311 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyStateMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyStateMapper.java
@@ -43,8 +43,8 @@ public class KeyStateMapper implements IDBAttrMapper {
         mLdapName = ldapName;
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(mLdapName);
         return v.elements();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/LongMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/LongMapper.java
index 2d2d539ed8907f3e58bf2a5285ee1e84047b2245..b4d6c75d62114bc489fa7201e9bca18847566c7f 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/LongMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/LongMapper.java
@@ -38,7 +38,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class LongMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs Long mapper.
@@ -51,7 +51,7 @@ public class LongMapper implements IDBAttrMapper {
     /**
      * Returns a list of supported ldap attribute names.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/MetaInfoMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/MetaInfoMapper.java
index f175c811a5608bad75df273a03c689fbae7795ea..9b224508c0f62ce60d63905f095f7a0d22c4048b 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/MetaInfoMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/MetaInfoMapper.java
@@ -48,7 +48,7 @@ public class MetaInfoMapper implements IDBAttrMapper {
     public static final String SEP = ":";
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs a metainfo object.
@@ -61,7 +61,7 @@ public class MetaInfoMapper implements IDBAttrMapper {
     /**
      * Returns a list of supported ldap attribute names.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
@@ -72,7 +72,7 @@ public class MetaInfoMapper implements IDBAttrMapper {
             String name, Object obj, LDAPAttributeSet attrs)
             throws EBaseException {
         MetaInfo info = (MetaInfo) obj;
-        Enumeration e = info.getElements();
+        Enumeration<String> e = info.getElements();
 
         if (!e.hasMoreElements())
             return; // dont add anything
@@ -80,7 +80,7 @@ public class MetaInfoMapper implements IDBAttrMapper {
 
         while (e.hasMoreElements()) {
             String s = null;
-            String attrName = (String) e.nextElement();
+            String attrName = e.nextElement();
             String value = (String) info.get(attrName);
 
             s = attrName + SEP + value;
@@ -99,11 +99,12 @@ public class MetaInfoMapper implements IDBAttrMapper {
 
         if (attr == null)
             return;
-        Enumeration values = attr.getStringValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> values = attr.getStringValues();
         MetaInfo info = new MetaInfo();
 
         while (values.hasMoreElements()) {
-            String s = (String) values.nextElement();
+            String s = values.nextElement();
             StringTokenizer st = new StringTokenizer(s, SEP);
 
             info.set(st.nextToken(), st.nextToken());
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
index 580658eaac2d8dc74c33f3a8e8893b3404ee11ec..5af8e533d66531571c95418eb73d1414d22aa656 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
@@ -350,7 +350,7 @@ class AttributeSet implements IAttrSet {
      *
      */
     private static final long serialVersionUID = -3155846653754028803L;
-    Hashtable ht = new Hashtable();
+    Hashtable<String, Object> ht = new Hashtable<String, Object>();
 
     public AttributeSet() {
     }
@@ -372,7 +372,7 @@ class AttributeSet implements IAttrSet {
         ht.put(name, ob);
     }
 
-    public Enumeration getElements() {
+    public Enumeration<Object> getElements() {
         return ht.elements();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
index 325d2a0d384e2c8f909f2b7ee2f703cac9e516ac..97297de48f554b83f6a89d80e36c869f4b952aed 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
@@ -188,10 +188,10 @@ public class LdapPublishModule implements ILdapPublishModule {
                 System.out.println("No ldap publishing configurations.");
             return;
         }
-        Enumeration substores = types.getSubStoreNames();
+        Enumeration<String> substores = types.getSubStoreNames();
 
         while (substores.hasMoreElements()) {
-            String certType = (String) substores.nextElement();
+            String certType = substores.nextElement();
             IConfigStore current = types.getSubStore(certType);
 
             if (current == null || current.size() <= 0) {
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/EmailResolverKeys.java b/pki/base/common/src/com/netscape/cmscore/notification/EmailResolverKeys.java
index 1cd8abd834ce7d910384dd5cbdabd4f6ed5df325..d0dedafa7624d66a41b3e841e8847bcc0caeb34a 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/EmailResolverKeys.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/EmailResolverKeys.java
@@ -35,10 +35,10 @@ public class EmailResolverKeys implements IEmailResolverKeys {
      *
      */
     private static final long serialVersionUID = -8823197350102151516L;
-    private Hashtable mKeys = null;
+    private Hashtable<String, Object> mKeys = null;
 
     public EmailResolverKeys() {
-        mKeys = new Hashtable();
+        mKeys = new Hashtable<String, Object>();
     }
 
     /**
@@ -65,7 +65,7 @@ public class EmailResolverKeys implements IEmailResolverKeys {
      * @return the named email resolver key
      */
     public Object get(String name) {
-        return ((Object) mKeys.get(name));
+        return mKeys.get(name);
     }
 
     /**
@@ -87,7 +87,7 @@ public class EmailResolverKeys implements IEmailResolverKeys {
      * @return an enumeration of the values in this key set
      * @see java.util.Enumeration
      */
-    public Enumeration getElements() {
-        return (mKeys.elements());
+    public Enumeration<Object> getElements() {
+        return mKeys.elements();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java b/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
index ebdeba4cea8b04bb16a5dd351a38e2f65784ad51..2386f6e0fc0cadddcd915de1e02a2d9f6342287d 100644
--- a/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
+++ b/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
@@ -350,7 +350,7 @@ class AttributeSet implements IAttrSet {
      *
      */
     private static final long serialVersionUID = -3985810281989018413L;
-    Hashtable ht = new Hashtable();
+    Hashtable<String, Object> ht = new Hashtable<String, Object>();
 
     public AttributeSet() {
     }
@@ -372,7 +372,7 @@ class AttributeSet implements IAttrSet {
         ht.put(name, ob);
     }
 
-    public Enumeration getElements() {
+    public Enumeration<Object> getElements() {
         return ht.elements();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java b/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
index c7f8c493a0e13a82382229fa922cc3fb50364a27..4c25d68136764ae6c88ba7a74b8e53ca31d9d49b 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
@@ -869,7 +869,7 @@ class ExtAttrDynMapper implements IDBDynAttrMapper {
 
     protected final static String extAttrPrefix = "extdata-";
 
-    protected final static Vector mAttrs = new Vector();
+    protected final static Vector<String> mAttrs = new Vector<String>();
 
     static {
         mAttrs.add(Schema.LDAP_ATTR_EXT_ATTR);
diff --git a/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java b/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
index 3d57c6276d9a2f2e32689fb5790f0af097052f7a..e0fe0252d9911b5cade6403a4e848f0216cae88a 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
@@ -217,20 +217,20 @@ public class PWsdrCache {
     }
 
     public void addEntry(String tag, String pwd) throws EBaseException {
-        addEntry(tag, pwd, (Hashtable) null);
+        addEntry(tag, pwd, (Hashtable<String, String>) null);
     }
 
     /*
      * Store passwd in pwcache.
      */
-    public void addEntry(Hashtable ht) throws EBaseException {
+    public void addEntry(Hashtable<String, String> ht) throws EBaseException {
         addEntry((String) null, (String) null, ht);
     }
 
     /*
      * add passwd in pwcache.
      */
-    public void addEntry(String tag, String pwd, Hashtable tagPwds) throws EBaseException {
+    public void addEntry(String tag, String pwd, Hashtable<String, String> tagPwds) throws EBaseException {
 
         String stringToAdd = null;
         String bufs = null;
@@ -238,11 +238,11 @@ public class PWsdrCache {
         if (tagPwds == null) {
             stringToAdd = tag + ":" + pwd + "\n";
         } else {
-            Enumeration enum1 = tagPwds.keys();
+            Enumeration<String> enum1 = tagPwds.keys();
 
             while (enum1.hasMoreElements()) {
-                tag = (String) enum1.nextElement();
-                pwd = (String) tagPwds.get(tag);
+                tag = enum1.nextElement();
+                pwd = tagPwds.get(tag);
                 debug("password tag: " + tag + " stored in " + mPWcachedb);
 
                 if (stringToAdd == null) {
@@ -435,13 +435,13 @@ public class PWsdrCache {
         }
     }
 
-    public String hashtable2String(Hashtable ht) {
-        Enumeration enum1 = ht.keys();
+    public String hashtable2String(Hashtable<String, String> ht) {
+        Enumeration<String> enum1 = ht.keys();
         String returnString = null;
 
         while (enum1.hasMoreElements()) {
-            String tag = (String) enum1.nextElement();
-            String pwd = (String) ht.get(tag);
+            String tag = enum1.nextElement();
+            String pwd = ht.get(tag);
 
             if (returnString == null) {
                 returnString = tag + ":" + pwd + "\n";
@@ -452,8 +452,8 @@ public class PWsdrCache {
         return returnString;
     }
 
-    public Hashtable string2Hashtable(String cache) {
-        Hashtable ht = new Hashtable();
+    public Hashtable<String, String> string2Hashtable(String cache) {
+        Hashtable<String, String> ht = new Hashtable<String, String>();
 
         // first, break into lines
         StringTokenizer st = new StringTokenizer(cache, "\n");
diff --git a/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java b/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
index 0cd27840d5d9241e52efa0a14b2a6de4380dd8dd..8770dca2bb9d9fb827f77c9cf04021a85e364464 100644
--- a/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
+++ b/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
@@ -34,7 +34,7 @@ public class AgentApprovalsTest extends CMSBaseTestCase {
         agentApprovals.mVector.add(approval2);
         agentApprovals.mVector.add(approval3);
 
-        Vector stringVector = agentApprovals.toStringVector();
+        Vector<String> stringVector = agentApprovals.toStringVector();
         assertNotNull(stringVector);
         assertEquals(3, stringVector.size());
         assertEquals(approval1.getDate().getTime() + ";" + approval1.getUserName(),
diff --git a/pki/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java b/pki/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
index b76cfd78c53ee93616c8f0619c40875bdfc2ca69..c74f66ba1aedaa8992485610a898b07b0153337e 100644
--- a/pki/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/dbs/DBRegistryTest.java
@@ -168,7 +168,7 @@ class RequestRecordStub extends RequestRecordDefaultStub {
         return "foo";
     }
 
-    public Enumeration getSerializableAttrNames() {
+    public Enumeration<String> getSerializableAttrNames() {
         getSerializedAttrNamesCalled = true;
         return Collections.enumeration(Arrays.asList(attrs));
     }
diff --git a/pki/base/common/test/com/netscape/cmscore/request/DBDynAttrMapperDefaultStub.java b/pki/base/common/test/com/netscape/cmscore/request/DBDynAttrMapperDefaultStub.java
index 6f3bf7fe3fcb275a35196b616aebdf6b297f8811..cccbe600ff7152158bead91654d9084de6f4e093 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/DBDynAttrMapperDefaultStub.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/DBDynAttrMapperDefaultStub.java
@@ -16,7 +16,7 @@ public class DBDynAttrMapperDefaultStub implements IDBDynAttrMapper {
         return false;
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return null;
     }
 
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
index ae0af3d44f4157d764241c9ad777721d10499c5a..470e06cf900d56df37ddf5065700091b981780f8 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
@@ -431,20 +431,20 @@ class PWsdrCache {
     }
 
     public void addEntry(String tag, String pwd) throws IOException {
-        addEntry(tag, pwd, (Hashtable) null);
+        addEntry(tag, pwd, (Hashtable<String, String>) null);
     }
 
     /*
      * Store passwd in pwcache.
      */
-    public void addEntry(Hashtable ht) throws IOException {
+    public void addEntry(Hashtable<String, String> ht) throws IOException {
         addEntry((String) null, (String) null, ht);
     }
 
     /*
      * add passwd in pwcache.
      */
-    public void addEntry(String tag, String pwd, Hashtable tagPwds) throws IOException {
+    public void addEntry(String tag, String pwd, Hashtable<String, String> tagPwds) throws IOException {
         System.out.println("PWsdrCache: in addEntry");
         String stringToAdd = null;
         String bufs = null;
@@ -452,11 +452,11 @@ class PWsdrCache {
         if (tagPwds == null) {
             stringToAdd = tag + ":" + pwd + "\n";
         } else {
-            Enumeration enum1 = tagPwds.keys();
+            Enumeration<String> enum1 = tagPwds.keys();
 
             while (enum1.hasMoreElements()) {
-                tag = (String) enum1.nextElement();
-                pwd = (String) tagPwds.get(tag);
+                tag = enum1.nextElement();
+                pwd = tagPwds.get(tag);
                 debug("password tag: " + tag + " stored in " + mPWcachedb);
 
                 if (stringToAdd == null) {
@@ -472,7 +472,7 @@ class PWsdrCache {
         if (dcrypts != null) {
             // converts to Hashtable, replace if tag exists, add
             //                if tag doesn't exist
-            Hashtable ht = string2Hashtable(dcrypts);
+            Hashtable<String, String> ht = string2Hashtable(dcrypts);
 
             if (ht.containsKey(tag) == false) {
                 debug("adding new tag: " + tag);
@@ -502,7 +502,7 @@ class PWsdrCache {
         if (dcrypts != null) {
             // converts to Hashtable, replace if tag exists, add
             //                if tag doesn't exist
-            Hashtable ht = string2Hashtable(dcrypts);
+            Hashtable<String, String> ht = string2Hashtable(dcrypts);
 
             if (ht.containsKey(tag) == false) {
                 debug("tag: " + tag + " does not exist");
@@ -673,13 +673,13 @@ class PWsdrCache {
         }
     }
 
-    public String hashtable2String(Hashtable ht) {
-        Enumeration enum1 = ht.keys();
+    public String hashtable2String(Hashtable<String, String> ht) {
+        Enumeration<String> enum1 = ht.keys();
         String returnString = null;
 
         while (enum1.hasMoreElements()) {
-            String tag = (String) enum1.nextElement();
-            String pwd = (String) ht.get(tag);
+            String tag = enum1.nextElement();
+            String pwd = ht.get(tag);
 
             if (returnString == null) {
                 returnString = tag + ":" + pwd + "\n";
@@ -690,8 +690,8 @@ class PWsdrCache {
         return returnString;
     }
 
-    public Hashtable string2Hashtable(String cache) {
-        Hashtable ht = new Hashtable();
+    public Hashtable<String, String> string2Hashtable(String cache) {
+        Hashtable<String, String> ht = new Hashtable<String, String>();
 
         // first, break into lines
         StringTokenizer st = new StringTokenizer(cache, "\n");
@@ -727,7 +727,7 @@ class PWsdrCache {
      * if tag not found, return null, which will cause it to give up
      */
     public Password getEntry(String tag) {
-        Hashtable pwTable = null;
+        Hashtable<String, String> pwTable = null;
         String pw = null;
 
         debug("in getEntry, tag=" + tag);
diff --git a/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java b/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
index c4d77c783b0f2738bd8cc3fac5f32583eb91c5b8..91763ed83f023b8345f38e145914b53d981ae94b 100644
--- a/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
+++ b/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
@@ -140,7 +140,7 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
                 }
 
                 IConfigStore storeConfig = mConfig.getSubStore(PROP_STORE);
-                Enumeration ids = storeConfig.getSubStoreNames();
+                Enumeration<String> ids = storeConfig.getSubStoreNames();
 
                 while (ids.hasMoreElements()) {
                     String id = (String) ids.nextElement();
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
index 100cbb5af80e44523e4e757ecf37a71c9ad17f31..badec5930a0abed879d1e46be1d5314de2a242c9 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
@@ -30,14 +30,14 @@ import java.util.Hashtable;
  */
 public class HttpMessage {
     protected String mLine = null; // request or response line.
-    protected Hashtable mHeaders = null;
+    protected Hashtable<String, String> mHeaders = null;
     protected String mContent = null; // arbitrary content chars assumed.
 
     /**
      * Instantiate a HttpResponse for write to http client.
      */
     public HttpMessage() {
-        mHeaders = new Hashtable();
+        mHeaders = new Hashtable<String, String>();
     }
 
     /**
@@ -48,7 +48,7 @@ public class HttpMessage {
      */
     public void setHeader(String name, String value) {
         if (mHeaders == null)
-            mHeaders = new Hashtable();
+            mHeaders = new Hashtable<String, String>();
         mHeaders.put(name.toLowerCase(), value);
     }
 
@@ -66,12 +66,12 @@ public class HttpMessage {
     public void writeHeaders(OutputStreamWriter writer)
             throws IOException {
         if (mHeaders != null) {
-            Enumeration keys = mHeaders.keys();
+            Enumeration<String> keys = mHeaders.keys();
             String header, value;
 
             while (keys.hasMoreElements()) {
-                header = (String) keys.nextElement();
-                value = (String) mHeaders.get(header);
+                header = keys.nextElement();
+                value = mHeaders.get(header);
                 writer.write(header + ":" + value + Http.CRLF);
             }
         }
@@ -84,7 +84,7 @@ public class HttpMessage {
      */
     public void readHeaders(BufferedReader reader)
             throws IOException {
-        mHeaders = new Hashtable();
+        mHeaders = new Hashtable<String, String>();
 
         int colon;
         String line, key, value;
@@ -129,7 +129,7 @@ public class HttpMessage {
         readHeaders(reader);
 
         // won't work if content length is not set.
-        String lenstr = (String) mHeaders.get("content-length");
+        String lenstr = mHeaders.get("content-length");
 
         if (lenstr != null) {
             int len = Integer.parseInt(lenstr);
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
index 46860de19c88e048225b3545d6c3abf2fbcb39b4..d6974d37144b64fad7dffd0c2a2924424670d657 100644
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
+++ b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
@@ -21,7 +21,7 @@ import java.util.Enumeration;
 import java.util.Vector;
 
 public class AttributeSet {
-    private Vector _attrs = new Vector();
+    private Vector<Attribute> _attrs = new Vector<Attribute>();
 
     public AttributeSet() {
     }
@@ -34,7 +34,7 @@ public class AttributeSet {
         return _attrs.size();
     }
 
-    public Enumeration getAttributes() {
+    public Enumeration<Attribute> getAttributes() {
         return _attrs.elements();
     }
 
@@ -51,6 +51,6 @@ public class AttributeSet {
     }
 
     public Attribute getAttributeAt(int pos) {
-        return (Attribute) _attrs.elementAt(pos);
+        return _attrs.elementAt(pos);
     }
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
index 8890d79fed3f001bfe4105667f72c68a97ef0c12..8317ad785f8773631507f2d89231cf1cebbfd417 100644
--- a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
+++ b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
@@ -137,8 +137,8 @@ public class XMLObject {
         return v;
     }
 
-    public Vector getValuesFromContainer(Node container, String tagname) {
-        Vector v = new Vector();
+    public Vector<String> getValuesFromContainer(Node container, String tagname) {
+        Vector<String> v = new Vector<String>();
         NodeList c = container.getChildNodes();
         int len = c.getLength();
         for (int i = 0; i < len; i++) {
diff --git a/pki/base/util/src/netscape/security/acl/GroupImpl.java b/pki/base/util/src/netscape/security/acl/GroupImpl.java
index fc50714f8fa0ab350fb3d28f524fc872ec3029ee..ed087a54487d8b6d7f31e1aaf66adff8c6c91ad2 100644
--- a/pki/base/util/src/netscape/security/acl/GroupImpl.java
+++ b/pki/base/util/src/netscape/security/acl/GroupImpl.java
@@ -28,7 +28,7 @@ import java.util.Vector;
  * @author Satish Dharmaraj
  */
 public class GroupImpl implements Group {
-    private Vector groupMembers = new Vector(50, 100);
+    private Vector<Principal> groupMembers = new Vector<Principal>(50, 100);
     private String group;
 
     /**
@@ -73,7 +73,7 @@ public class GroupImpl implements Group {
     /**
      * returns the enumeration of the members in the group.
      */
-    public Enumeration members() {
+    public Enumeration<Principal> members() {
         return groupMembers.elements();
     }
 
@@ -118,7 +118,7 @@ public class GroupImpl implements Group {
         if (groupMembers.contains(member)) {
             return true;
         } else {
-            Vector alreadySeen = new Vector(10);
+            Vector<Group> alreadySeen = new Vector<Group>(10);
             return isMemberRecurse(member, alreadySeen);
         }
     }
@@ -136,11 +136,11 @@ public class GroupImpl implements Group {
     // a vector of already seen groups. Only new groups are considered, 
     // thereby avoiding loops.
     //
-    boolean isMemberRecurse(Principal member, Vector alreadySeen) {
-        Enumeration e = members();
+    boolean isMemberRecurse(Principal member, Vector<Group> alreadySeen) {
+        Enumeration<Principal> e = members();
         while (e.hasMoreElements()) {
             boolean mem = false;
-            Principal p = (Principal) e.nextElement();
+            Principal p = e.nextElement();
 
             // if the member is in this collection, return true
             if (p.equals(member)) {
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS10Attributes.java b/pki/base/util/src/netscape/security/pkcs/PKCS10Attributes.java
index 46b309cc772240dc1194c14cfdd19b8e03d8442a..8beb1e64cbc4ae34b5abccb986159aa8690f2e75 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS10Attributes.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS10Attributes.java
@@ -35,19 +35,19 @@ import netscape.security.util.DerValue;
  * @author Hemma Prafullchandra
  * @version 1.10
  */
-public class PKCS10Attributes extends Vector implements DerEncoder {
+public class PKCS10Attributes extends Vector<PKCS10Attribute> implements DerEncoder {
 
     /**
      *
      */
     private static final long serialVersionUID = 1362260612357629542L;
-    private Hashtable map;
+    private Hashtable<String, PKCS10Attribute> map;
 
     /**
      * Default constructor for the certificate attribute.
      */
     public PKCS10Attributes() {
-        map = new Hashtable();
+        map = new Hashtable<String, PKCS10Attribute>();
     }
 
     /**
@@ -59,7 +59,7 @@ public class PKCS10Attributes extends Vector implements DerEncoder {
     public PKCS10Attributes(DerInputStream in)
             throws IOException {
 
-        map = new Hashtable();
+        map = new Hashtable<String, PKCS10Attribute>();
         DerValue[] attrs = in.getSet(5, true);
 
         if (attrs != null) {
@@ -107,41 +107,41 @@ public class PKCS10Attributes extends Vector implements DerEncoder {
     /**
      * Set the attribute value.
      */
-    public void setAttribute(String name, Object obj) throws IOException {
-        map.put(name, obj);
-        addElement(obj);
+    public void setAttribute(String name, PKCS10Attribute attr) throws IOException {
+        map.put(name, attr);
+        addElement(attr);
     }
 
     /**
      * Get the attribute value.
      */
-    public Object getAttribute(String name) throws IOException {
-        Object obj = map.get(name);
+    public PKCS10Attribute getAttribute(String name) throws IOException {
+        PKCS10Attribute attr = map.get(name);
         /*
-        if (obj == null) {
+        if (attr == null) {
             throw new IOException("No attribute found with name " + name);
         }
         */
-        return (obj);
+        return (attr);
     }
 
     /**
      * Delete the attribute value.
      */
     public void deleteAttribute(String name) throws IOException {
-        Object obj = map.get(name);
-        if (obj == null) {
+        PKCS10Attribute attr = map.get(name);
+        if (attr == null) {
             throw new IOException("No attribute found with name " + name);
         }
         map.remove(name);
-        removeElement(obj);
+        removeElement(attr);
     }
 
     /**
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
-        return (map.elements());
+    public Enumeration<PKCS10Attribute> getElements() {
+        return map.elements();
     }
 }
diff --git a/pki/base/util/src/netscape/security/x509/Attribute.java b/pki/base/util/src/netscape/security/x509/Attribute.java
index b026e30c349bad04d0aec94a6a53f6505b104a7c..11e22db10d833583b9f53cebac059ea824a9f19c 100644
--- a/pki/base/util/src/netscape/security/x509/Attribute.java
+++ b/pki/base/util/src/netscape/security/x509/Attribute.java
@@ -64,7 +64,7 @@ public final class Attribute implements Serializable, DerEncoder {
     private static final long serialVersionUID = -931486084625476764L;
     //private variables
     ObjectIdentifier oid;
-    Vector valueSet = new Vector();
+    Vector<String> valueSet = new Vector<String>();
     transient protected X500NameAttrMap attrMap;
 
     //========== CONSTRUCTOR ==================================
@@ -93,7 +93,7 @@ public final class Attribute implements Serializable, DerEncoder {
      * @param oid the object identifier of the attribute type
      * @param values String value vector
      */
-    public Attribute(ObjectIdentifier oid, Vector values)
+    public Attribute(ObjectIdentifier oid, Vector<String> values)
             throws IOException {
 
         //pre-condition verification
@@ -104,13 +104,9 @@ public final class Attribute implements Serializable, DerEncoder {
         this.oid = oid;
 
         //copy the value into the valueSet list
-        Enumeration vals = values.elements();
+        Enumeration<String> vals = values.elements();
         while (vals.hasMoreElements()) {
-            Object obj = vals.nextElement();
-            if (obj instanceof String)
-                valueSet.addElement(obj);
-            else
-                throw new IOException("values vectore must consist of String object");
+            valueSet.addElement(vals.nextElement());
         }
     }
 
@@ -120,7 +116,7 @@ public final class Attribute implements Serializable, DerEncoder {
      * @param oid attribute type string CN,OU,O,C,L,TITLE,ST,STREET,UID,MAIL,E,DC
      * @param values String value vector
      */
-    public Attribute(String attr, Vector values)
+    public Attribute(String attr, Vector<String> values)
             throws IOException {
 
         //pre-condition verification
@@ -143,13 +139,9 @@ public final class Attribute implements Serializable, DerEncoder {
         this.oid = id;
 
         //copy the value into the valueSet list
-        Enumeration vals = values.elements();
+        Enumeration<String> vals = values.elements();
         while (vals.hasMoreElements()) {
-            Object obj = vals.nextElement();
-            if (obj instanceof String)
-                valueSet.addElement(obj);
-            else
-                throw new IOException("Values vectore must consist of String object");
+            valueSet.addElement(vals.nextElement());
         }
     }
 
@@ -188,7 +180,7 @@ public final class Attribute implements Serializable, DerEncoder {
      * 
      * @return Enumeration of values of this Attribute.
      */
-    public Enumeration getValues() {
+    public Enumeration<String> getValues() {
         if (valueSet == null)
             return null;
         return valueSet.elements();
@@ -223,11 +215,11 @@ public final class Attribute implements Serializable, DerEncoder {
     public String toString() {
         String theoid = "Attribute: " + oid + "\n";
         String values = "Values: ";
-        Enumeration n = valueSet.elements();
+        Enumeration<String> n = valueSet.elements();
         if (n.hasMoreElements()) {
-            values += (String) n.nextElement();
+            values += n.nextElement();
             while (n.hasMoreElements())
-                values += "," + (String) n.nextElement();
+                values += "," + n.nextElement();
         }
         return theoid + values + "\n";
     }
@@ -260,9 +252,9 @@ public final class Attribute implements Serializable, DerEncoder {
         }
 
         //loop through all the values and encode
-        Enumeration vals = valueSet.elements();
+        Enumeration<String> vals = valueSet.elements();
         while (vals.hasMoreElements()) {
-            String val = (String) vals.nextElement();
+            String val = vals.nextElement();
             DerValue derobj = converter.getValue(val);
             derobj.encode(tmp);
         }
-- 
1.7.5.1

