From 8679444913a8d04e4d2f0ec02a19503dd1187d4f Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Fri, 3 Feb 2012 13:49:11 -0600
Subject: [PATCH] Added generics (part 3).

This patch brings down the warnings from 3992 to 3500.

Ticket #2
---
 .../netscape/certsrv/dbs/crldb/ICRLRepository.java |    2 +-
 .../src/com/netscape/certsrv/usrgrp/IGroup.java    |    2 +-
 .../cms/authentication/TokenAuthentication.java    |    4 +-
 .../authentication/UidPwdDirAuthentication.java    |    4 +-
 .../authentication/UidPwdPinDirAuthentication.java |    5 +-
 .../common/src/com/netscape/cms/jobs/AJobBase.java |    4 +-
 .../cms/listeners/CertificateIssuedListener.java   |   21 ++--
 .../cms/listeners/CertificateRevokedListener.java  |   21 ++--
 .../src/com/netscape/cms/ocsp/LDAPStore.java       |   18 ++--
 .../cms/policy/constraints/RSAKeyConstraints.java  |   18 ++--
 .../com/netscape/cms/profile/def/NoDefault.java    |    4 +-
 .../profile/def/SubjectInfoAccessExtDefault.java   |   10 +-
 .../cms/profile/updater/SubsystemGroupUpdater.java |   10 +-
 .../cms/servlet/admin/PublisherAdminServlet.java   |  117 ++++++++++----------
 .../netscape/cms/servlet/admin/RAAdminServlet.java |   45 +++++---
 .../cms/servlet/admin/UsrGrpAdminServlet.java      |   42 +++----
 .../com/netscape/cms/servlet/base/CMSServlet.java  |    6 -
 .../com/netscape/cms/servlet/cert/DisplayCRL.java  |    4 +-
 .../src/com/netscape/cms/servlet/cert/GetInfo.java |    4 +-
 .../netscape/cms/servlet/cert/ReasonToRevoke.java  |    1 -
 .../cms/servlet/cert/RemoteAuthConfig.java         |   34 +++---
 .../netscape/cms/servlet/cert/RenewalServlet.java  |    4 +-
 .../cms/servlet/cert/RevocationServlet.java        |    4 +-
 .../com/netscape/cms/servlet/cert/UpdateDir.java   |   12 +-
 .../netscape/cms/servlet/common/CMSGateway.java    |    5 +-
 .../netscape/cms/servlet/common/CMSRequest.java    |    2 +-
 .../netscape/cms/servlet/csadmin/RegisterUser.java |    8 +-
 .../netscape/cms/servlet/csadmin/SessionTimer.java |    4 +-
 .../netscape/cms/servlet/csadmin/SizePanel.java    |   12 +-
 .../cms/servlet/csadmin/UpdateConnector.java       |    5 +-
 .../netscape/cms/servlet/ocsp/ListCAServlet.java   |    3 +-
 .../com/netscape/cms/servlet/request/QueryReq.java |   26 ++--
 .../netscape/cms/servlet/wizard/WizardServlet.java |   33 +++---
 .../netscape/cmscore/cert/X500NameSubsystem.java   |    2 +-
 .../cmscore/connector/RequestTransfer.java         |    6 +-
 .../com/netscape/cmscore/connector/Resender.java   |   16 ++--
 .../com/netscape/cmscore/dbs/CRLRepository.java    |    4 +-
 .../src/com/netscape/cmscore/dbs/DBSubsystem.java  |   36 +++---
 .../com/netscape/cmscore/dbs/RepositoryRecord.java |    6 +-
 .../src/com/netscape/cmscore/dbs/StringMapper.java |    4 +-
 .../netscape/cmscore/dbs/StringVectorMapper.java   |   16 ++-
 .../com/netscape/cmscore/dbs/X500NameMapper.java   |    4 +-
 .../cmscore/ldap/LdapSimpleExpression.java         |    9 +-
 .../netscape/cmscore/policy/SimpleExpression.java  |    6 +-
 .../netscape/cmscore/request/ARequestQueue.java    |    1 +
 .../netscape/cmscore/request/ARequestRecord.java   |    2 +-
 .../com/netscape/cmscore/request/RequestQueue.java |   13 +--
 .../netscape/cmscore/request/RequestRecord.java    |   86 ++++++++-------
 .../src/com/netscape/cmscore/usrgrp/User.java      |    4 +-
 .../src/com/netscape/cmscore/util/Debug.java       |    4 +-
 .../netscape/cmscore/request/RequestQueueTest.java |    2 +-
 .../cmscore/request/RequestRecordTest.java         |    4 +-
 .../test/com/netscape/cmscore/test/TestHelper.java |    2 +-
 .../src/com/netscape/cmstools/TokenInfo.java       |   10 +-
 .../kra/src/com/netscape/kra/StorageKeyUnit.java   |   10 +-
 .../cmsutil/password/PlainPasswordFile.java        |    2 +-
 .../cmsutil/password/PlainPasswordReader.java      |    2 +-
 .../security/provider/DSAKeyPairGenerator.java     |    6 +-
 58 files changed, 379 insertions(+), 372 deletions(-)

diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
index b58a6e38b0547ce3f15d429fbc70bd230cb83f6a..3fb40b26d413502a6b88580646bad4d387f7a93a 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
@@ -48,7 +48,7 @@ public interface ICRLRepository {
      * @return A list of issuing points' names.
      * @exception EBaseException failed to retrieve all the issuing points' names.
      */
-    public Vector getIssuingPointsNames() throws EBaseException;
+    public Vector<String> getIssuingPointsNames() throws EBaseException;
 
     /**
      * Reads issuing point record.
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
index 18903f4a5a6fefb6fcfef0d40bb016351aeb46a9..522d0fc894249cb456d26f76244a6dca090d28e5 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
@@ -70,5 +70,5 @@ public interface IGroup extends IAttrSet, IGroupConstants {
      * 
      * @return a list of member names for this group.
      */
-    public Enumeration getMemberNames();
+    public Enumeration<String> getMemberNames();
 }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/TokenAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/TokenAuthentication.java
index 5dcb80a61766a0e64b43227a842e9be564320972..f8e0669e9f7d827cdaf8fef1816616da6879b31f 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/TokenAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/TokenAuthentication.java
@@ -279,8 +279,8 @@ public class TokenAuthentication implements IAuthManager,
     /**
      * 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(CRED_SESSION_ID);
         return v.elements();
diff --git a/pki/base/common/src/com/netscape/cms/authentication/UidPwdDirAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/UidPwdDirAuthentication.java
index dd750614708d9a1f56a45c1c1ec70b3168a04e9f..d4a9de1080e6e0c433507d85a1a79dbf0769ec74 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/UidPwdDirAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/UidPwdDirAuthentication.java
@@ -224,8 +224,8 @@ public class UidPwdDirAuthentication extends DirBasedAuthentication
     /**
      * 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(CRED_UID);
         v.addElement(CRED_PWD);
diff --git a/pki/base/common/src/com/netscape/cms/authentication/UidPwdPinDirAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/UidPwdPinDirAuthentication.java
index 2908d532a4c1ba64482dc52b8ac8241b825bbbee..880b7c7676e8a5148516c36a544c2c276cbaa00e 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/UidPwdPinDirAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/UidPwdPinDirAuthentication.java
@@ -301,13 +301,14 @@ public class UidPwdPinDirAuthentication extends DirBasedAuthentication
             throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
         }
 
-        Enumeration pinValues = pinAttr.getByteValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> pinValues = pinAttr.getByteValues();
 
         if (!pinValues.hasMoreElements()) {
             log(ILogger.LL_SECURITY, CMS.getLogMessage("CMS_AUTH_NO_PIN_FOUND", uid));
             throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
         }
-        byte[] entrypin = (byte[]) pinValues.nextElement();
+        byte[] entrypin = pinValues.nextElement();
 
         // compare value digest.
 
diff --git a/pki/base/common/src/com/netscape/cms/jobs/AJobBase.java b/pki/base/common/src/com/netscape/cms/jobs/AJobBase.java
index 5b8176da26d60df4f3248945786af31cd94affc6..4a70147de474c1a9d71850a97d1696213f05f4ab 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/AJobBase.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/AJobBase.java
@@ -71,8 +71,8 @@ public abstract class AJobBase implements IJob, Runnable {
     protected String mItemForm = null;
     protected String mSummarySenderEmail = null;
     protected String mSummaryReceiverEmail = null;
-    protected Hashtable mContentParams = new Hashtable();
-    protected Hashtable mItemParams = new Hashtable();
+    protected Hashtable<String, Object> mContentParams = new Hashtable<String, Object>();
+    protected Hashtable<String, Object> mItemParams = new Hashtable<String, Object>();
 
     public AJobBase() {
     }
diff --git a/pki/base/common/src/com/netscape/cms/listeners/CertificateIssuedListener.java b/pki/base/common/src/com/netscape/cms/listeners/CertificateIssuedListener.java
index 6c9a295b3c9496f382134bea6adced65517187b3..91526d58325aa4159d10a6424aeff8b43cabd9d6 100644
--- a/pki/base/common/src/com/netscape/cms/listeners/CertificateIssuedListener.java
+++ b/pki/base/common/src/com/netscape/cms/listeners/CertificateIssuedListener.java
@@ -89,9 +89,8 @@ public class CertificateIssuedListener implements IRequestListener {
     private String mSubject_Success = null;
     private String mFormPath = null;
     private String mRejectPath = null;
-    private Hashtable mContentParams = new Hashtable();
+    private Hashtable<String, Object> mContentParams = new Hashtable<String, Object>();
 
-    private ICertAuthority mSub = null;
     private IConfigStore mConfig = null;
     private DateFormat mDateFormat = null;
     private ICertAuthority mSubsystem = null;
@@ -389,19 +388,19 @@ public class CertificateIssuedListener implements IRequestListener {
         mContentParams.put(IEmailFormProcessor.TOKEN_ID,
                 mConfig.getName());
         mContentParams.put(IEmailFormProcessor.TOKEN_SERIAL_NUM,
-                (Object) issuedCert[0].getSerialNumber().toString());
+                issuedCert[0].getSerialNumber().toString());
         mContentParams.put(IEmailFormProcessor.TOKEN_HEX_SERIAL_NUM,
-                (Object) Long.toHexString(issuedCert[0].getSerialNumber().longValue()));
+                Long.toHexString(issuedCert[0].getSerialNumber().longValue()));
         mContentParams.put(IEmailFormProcessor.TOKEN_REQUEST_ID,
-                (Object) mReqId.toString());
+                mReqId.toString());
         mContentParams.put(IEmailFormProcessor.TOKEN_HTTP_HOST,
-                (Object) mHttpHost);
+                mHttpHost);
         mContentParams.put(IEmailFormProcessor.TOKEN_HTTP_PORT,
-                (Object) mHttpPort);
+                mHttpPort);
         mContentParams.put(IEmailFormProcessor.TOKEN_ISSUER_DN,
-                (Object) issuedCert[0].getIssuerDN().toString());
+                issuedCert[0].getIssuerDN().toString());
         mContentParams.put(IEmailFormProcessor.TOKEN_SUBJECT_DN,
-                (Object) issuedCert[0].getSubjectDN().toString());
+                issuedCert[0].getSubjectDN().toString());
 
         Date date = (Date) issuedCert[0].getNotAfter();
 
@@ -413,9 +412,9 @@ public class CertificateIssuedListener implements IRequestListener {
                 mDateFormat.format(date));
 
         mContentParams.put(IEmailFormProcessor.TOKEN_SENDER_EMAIL,
-                (Object) mSenderEmail);
+                mSenderEmail);
         mContentParams.put(IEmailFormProcessor.TOKEN_RECIPIENT_EMAIL,
-                (Object) mEmail);
+                mEmail);
         // ... and more
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/listeners/CertificateRevokedListener.java b/pki/base/common/src/com/netscape/cms/listeners/CertificateRevokedListener.java
index 841f71863b3f691ab19ec01b5689e8e2d0d3a3df..da041b85de27668342a7716b3350be02010cf11c 100644
--- a/pki/base/common/src/com/netscape/cms/listeners/CertificateRevokedListener.java
+++ b/pki/base/common/src/com/netscape/cms/listeners/CertificateRevokedListener.java
@@ -91,9 +91,8 @@ public class CertificateRevokedListener implements IRequestListener {
     private String mSubject_Success = null;
     private String mFormPath = null;
     private String mRejectPath = null;
-    private Hashtable mContentParams = new Hashtable();
+    private Hashtable<String, Object> mContentParams = new Hashtable<String, Object>();
 
-    private ICertAuthority mSub = null;
     private IConfigStore mConfig = null;
     private DateFormat mDateFormat = null;
     private ICertAuthority mSubsystem = null;
@@ -301,15 +300,15 @@ public class CertificateRevokedListener implements IRequestListener {
         mContentParams.put(IEmailFormProcessor.TOKEN_ID,
                 mConfig.getName());
         mContentParams.put(IEmailFormProcessor.TOKEN_SERIAL_NUM,
-                (Object) crlentries[0].getSerialNumber().toString());
+                crlentries[0].getSerialNumber().toString());
         mContentParams.put(IEmailFormProcessor.TOKEN_HEX_SERIAL_NUM,
-                (Object) Long.toHexString(crlentries[0].getSerialNumber().longValue()));
+                Long.toHexString(crlentries[0].getSerialNumber().longValue()));
         mContentParams.put(IEmailFormProcessor.TOKEN_REQUEST_ID,
-                (Object) mReqId.toString());
+                mReqId.toString());
         mContentParams.put(IEmailFormProcessor.TOKEN_HTTP_HOST,
-                (Object) mHttpHost);
+                mHttpHost);
         mContentParams.put(IEmailFormProcessor.TOKEN_HTTP_PORT,
-                (Object) mHttpPort);
+                mHttpPort);
 
         try {
             RevokedCertImpl revCert = (RevokedCertImpl) crlentries[0];
@@ -318,9 +317,9 @@ public class CertificateRevokedListener implements IRequestListener {
             X509Certificate cert = certDB.getX509Certificate(revCert.getSerialNumber());
 
             mContentParams.put(IEmailFormProcessor.TOKEN_ISSUER_DN,
-                    (Object) cert.getIssuerDN().toString());
+                    cert.getIssuerDN().toString());
             mContentParams.put(IEmailFormProcessor.TOKEN_SUBJECT_DN,
-                    (Object) cert.getSubjectDN().toString());
+                    cert.getSubjectDN().toString());
             Date date = (Date) crlentries[0].getRevocationDate();
 
             mContentParams.put(IEmailFormProcessor.TOKEN_REVOCATION_DATE,
@@ -331,9 +330,9 @@ public class CertificateRevokedListener implements IRequestListener {
         }
 
         mContentParams.put(IEmailFormProcessor.TOKEN_SENDER_EMAIL,
-                (Object) mSenderEmail);
+                mSenderEmail);
         mContentParams.put(IEmailFormProcessor.TOKEN_RECIPIENT_EMAIL,
-                (Object) mEmail);
+                mEmail);
         // ... and more
     }
 
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 bdfbc9ca2f1253e492ec2b49dba224174df10250..765a7950459e634892ecd6c0fa6aa7a0c99d2c8a 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
@@ -100,8 +100,8 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
     private String mCRLAttr = null;
     private boolean mByName = true;
     private String mCACertAttr = null;
-    protected Hashtable mReqCounts = new Hashtable();
-    private Hashtable<X509CertImpl, Object> mCRLs = new Hashtable<X509CertImpl, Object>();
+    protected Hashtable<String, Long> mReqCounts = new Hashtable<String, Long>();
+    private Hashtable<X509CertImpl, X509CRLImpl> mCRLs = new Hashtable<X509CertImpl, X509CRLImpl>();
 
     /**
      * Constructs the default store.
@@ -110,7 +110,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_NOT_FOUND_GOOD
                 + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_NOT_FOUND_GOOD"));
@@ -209,7 +209,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
 
     public void updateCRLHash(X509CertImpl caCert, X509CRLImpl crl)
             throws EBaseException {
-        X509CRLImpl oldCRL = (X509CRLImpl) mCRLs.get(caCert);
+        X509CRLImpl oldCRL = mCRLs.get(caCert);
 
         if (oldCRL != null) {
             if (oldCRL.getThisUpdate().getTime() >= crl.getThisUpdate().getTime()) {
@@ -278,7 +278,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
             mOCSPAuthority.log(ILogger.LL_INFO, "start OCSP request");
             TBSRequest tbsReq = request.getTBSRequest();
 
-            Vector singleResponses = new Vector();
+            Vector<SingleResponse> singleResponses = new Vector<SingleResponse>();
 
             if (statsSub != null) {
                 statsSub.startTiming("lookup");
@@ -364,7 +364,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
     }
 
     public long getReqCount(String id) {
-        Long c = (Long) mReqCounts.get(id);
+        Long c = mReqCounts.get(id);
 
         if (c == null)
             return 0;
@@ -397,12 +397,12 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
 
     public Enumeration<Object> searchAllCRLIssuingPointRecord(int maxSize)
             throws EBaseException {
-        Vector recs = new Vector();
+        Vector<Object> recs = new Vector<Object>();
         Enumeration<X509CertImpl> keys = mCRLs.keys();
 
         while (keys.hasMoreElements()) {
             X509CertImpl caCert = keys.nextElement();
-            X509CRLImpl crl = (X509CRLImpl) mCRLs.get(caCert);
+            X509CRLImpl crl = mCRLs.get(caCert);
 
             recs.addElement(new TempCRLIssuingPointRecord(caCert, crl));
         }
@@ -483,7 +483,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
             if (mOCSPAuthority.arraysEqual(digest, keyhsh)) {
                 theCert = caCert;
                 incReqCount(caCert.getSubjectDN().toString());
-                theCRL = (X509CRLImpl) mCRLs.get(caCert);
+                theCRL = mCRLs.get(caCert);
                 break;
             }
         }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/RSAKeyConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/RSAKeyConstraints.java
index d6dde414a99465f940e797674e9d8354da64712b..7c53808c5b518adcf40d22aa31d2b4b3f507ae85 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/RSAKeyConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/RSAKeyConstraints.java
@@ -55,7 +55,7 @@ import com.netscape.cms.policy.APolicyRule;
  */
 public class RSAKeyConstraints extends APolicyRule
         implements IEnrollmentPolicy, IExtendedPluginInfo {
-    private Vector mExponents;
+    private Vector<BigInt> mExponents;
     private int mMinSize;
     private int mMaxSize;
 
@@ -66,7 +66,7 @@ public class RSAKeyConstraints extends APolicyRule
     private final static String PROP_EXPONENTS = "exponents";
     private final static String RSA = "RSA";
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     static {
         defConfParams.addElement(PROP_MIN_SIZE + "=" + DEF_MIN_SIZE);
@@ -130,7 +130,7 @@ public class RSAKeyConstraints extends APolicyRule
             throw new EBaseException(
                     CMS.getUserMessage("CMS_BASE_A_GREATER_THAN_EQUAL_B", PROP_MIN_SIZE, PROP_MAX_SIZE));
 
-        mExponents = new Vector();
+        mExponents = new Vector<BigInt>();
 
         // Get exponents
         exponents = config.getString(PROP_EXPONENTS, null);
@@ -223,7 +223,7 @@ public class RSAKeyConstraints extends APolicyRule
                     if (!mExponents.contains(exp)) {
                         StringBuffer sb = new StringBuffer();
 
-                        for (Enumeration e = mExponents.elements(); e.hasMoreElements();) {
+                        for (Enumeration<BigInt> e = mExponents.elements(); e.hasMoreElements();) {
                             BigInt bi = (BigInt) e.nextElement();
 
                             sb.append(bi.toBigInteger().toString());
@@ -252,15 +252,15 @@ public class RSAKeyConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector confParams = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> confParams = new Vector<String>();
 
         confParams.addElement(PROP_MIN_SIZE + "=" + mMinSize);
         confParams.addElement(PROP_MAX_SIZE + "=" + mMaxSize);
         StringBuffer sb = new StringBuffer();
 
-        for (Enumeration e = mExponents.elements(); e.hasMoreElements();) {
-            sb.append(((BigInt) e.nextElement()).toInt());
+        for (Enumeration<BigInt> e = mExponents.elements(); e.hasMoreElements();) {
+            sb.append(e.nextElement().toInt());
             sb.append(",");
         }
         if (sb.length() > 0)
@@ -274,7 +274,7 @@ public class RSAKeyConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 }
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 a58b1800819aba06bf12009d13d6198651a7d361..4678f44875057ddeff39dffdbd42332254fdc422 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
@@ -40,7 +40,7 @@ public class NoDefault implements IPolicyDefault {
 
     public static final String PROP_NAME = "name";
 
-    protected Vector mValues = new Vector();
+    protected Vector<String> mValues = new Vector<String>();
     protected Vector<String> mNames = new Vector<String>();
     protected IConfigStore mConfig = null;
 
@@ -80,7 +80,7 @@ public class NoDefault implements IPolicyDefault {
             throws EProfileException {
     }
 
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return mValues.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
index a145378ee03d6726d68f1b7481610a32c0a448ce..670728e59ecbe4fb458367abc526587e977a4e36 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
@@ -112,7 +112,7 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -220,7 +220,7 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
                 }
                 boolean critical = ext.isCritical();
 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 ext = new SubjectInfoAccessExtension(critical);
@@ -230,11 +230,11 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
                 String enable = null;
 
                 for (int i = 0; i < size; i++) {
-                    NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    NameValuePairs nvps = v.elementAt(i);
+                    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/updater/SubsystemGroupUpdater.java b/pki/base/common/src/com/netscape/cms/profile/updater/SubsystemGroupUpdater.java
index 928e36c2b703b6e6b8a1418b539681411602257a..52c87113d8feb5f2167789ec49f821e74eb462b1 100644
--- a/pki/base/common/src/com/netscape/cms/profile/updater/SubsystemGroupUpdater.java
+++ b/pki/base/common/src/com/netscape/cms/profile/updater/SubsystemGroupUpdater.java
@@ -54,8 +54,8 @@ public class SubsystemGroupUpdater implements IProfileUpdater {
     private EnrollProfile mEnrollProfile = null;
     private IConfigStore mConfig = null;
     private ILogger mSignedAuditLogger = CMS.getSignedAuditLogger();
-    private Vector mConfigNames = new Vector();
-    private Vector mValueNames = new Vector();
+    private Vector<String> mConfigNames = new Vector<String>();
+    private Vector<String> mValueNames = new Vector<String>();
 
     private final static String LOGGING_SIGNED_AUDIT_CONFIG_ROLE =
             "LOGGING_SIGNED_AUDIT_CONFIG_ROLE_3";
@@ -74,7 +74,7 @@ public class SubsystemGroupUpdater implements IProfileUpdater {
         mEnrollProfile = (EnrollProfile) profile;
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mConfigNames.elements();
     }
 
@@ -239,9 +239,9 @@ public class SubsystemGroupUpdater implements IProfileUpdater {
             group = system.getGroupFromName(groupName);
 
             auditParams += "+user;;";
-            Enumeration members = group.getMemberNames();
+            Enumeration<String> members = group.getMemberNames();
             while (members.hasMoreElements()) {
-                auditParams += (String) members.nextElement();
+                auditParams += members.nextElement();
                 if (members.hasMoreElements()) {
                     auditParams += ",";
                 }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
index 58cf327bb2e82c1cfd211e120f54cf2a68cd9afc..799e1bb37e1b72550ea7eeb97d7e226198aa6b63 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
@@ -327,13 +327,13 @@ public class PublisherAdminServlet extends AdminServlet {
 
     private IExtendedPluginInfo getExtendedPluginInfo(IPublisherProcessor
             p) {
-        Enumeration mappers = p.getMapperInsts().keys();
-        Enumeration publishers = p.getPublisherInsts().keys();
+        Enumeration<String> mappers = p.getMapperInsts().keys();
+        Enumeration<String> publishers = p.getPublisherInsts().keys();
 
         StringBuffer map = new StringBuffer();
 
         for (; mappers.hasMoreElements();) {
-            String name = (String) mappers.nextElement();
+            String name = mappers.nextElement();
 
             if (map.length() == 0) {
                 map.append(name);
@@ -372,7 +372,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         if (implType.equals(Constants.PR_EXT_PLUGIN_IMPLTYPE_PUBLISHRULE)) {
             IPublisherProcessor p_processor = mProcessor;
-            Plugin plugin = (Plugin) p_processor.getRulePlugins().get(implName);
+            RulePlugin plugin = p_processor.getRulePlugins().get(implName);
 
             // Should get the registered rules from processor
             // instead of plugin
@@ -439,10 +439,11 @@ public class PublisherAdminServlet extends AdminServlet {
         IConfigStore ldapcfg = publishcfg.getSubStore(IPublisherProcessor.PROP_LDAP_PUBLISH_SUBSTORE);
         IConfigStore ldap = ldapcfg.getSubStore(IPublisherProcessor.PROP_LDAP);
 
-        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;
@@ -502,7 +503,6 @@ public class PublisherAdminServlet extends AdminServlet {
 
     private void setLDAPDest(HttpServletRequest req, HttpServletResponse resp)
             throws ServletException, IOException, EBaseException {
-        NameValuePairs params = new NameValuePairs();
 
         //Save New Settings to the config file
         IConfigStore config = mAuth.getConfigStore();
@@ -521,11 +521,12 @@ public class PublisherAdminServlet extends AdminServlet {
         }
 
         //set reset of the parameters
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
         String pwd = null;
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -641,11 +642,12 @@ public class PublisherAdminServlet extends AdminServlet {
         }
 
         //set reset of the parameters
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
         String pwd = null;
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             if (name.equals(Constants.OP_TYPE))
                 continue;
@@ -1038,7 +1040,7 @@ public class PublisherAdminServlet extends AdminServlet {
         IConfigStore instancesConfig = destStore.getSubStore("impl");
 
         // Does the class exist?
-        Class newImpl = null;
+        Class<?> newImpl = null;
 
         try {
             newImpl = Class.forName(classPath);
@@ -1147,7 +1149,7 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getMapperDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getMapperDefaultParams(implname);
 
         IConfigStore destStore = mConfig.getSubStore(mAuth.getId() + ".publish.mapper");
         IConfigStore instancesConfig = destStore.getSubStore("instance");
@@ -1243,10 +1245,10 @@ public class PublisherAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = mProcessor.getMapperPlugins().keys();
+        Enumeration<String> e = mProcessor.getMapperPlugins().keys();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             MapperPlugin value = (MapperPlugin)
                     mProcessor.getMapperPlugins().get(name);
             // get Description
@@ -1284,10 +1286,10 @@ public class PublisherAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = mProcessor.getMapperInsts().keys();
+        Enumeration<String> e = mProcessor.getMapperInsts().keys();
 
         for (; e.hasMoreElements();) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             ILdapMapper value = mProcessor.getMapperInstance(name);
 
             params.add(name, getMapperPluginName(value) + ";visible");
@@ -1373,7 +1375,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // first check if any instances from this mapper
         // DON'T remove mapper if any instance
-        for (Enumeration e = mProcessor.getMapperInsts().keys(); e.hasMoreElements();) {
+        for (Enumeration<String> e = mProcessor.getMapperInsts().keys(); e.hasMoreElements();) {
             String name = (String) e.nextElement();
             ILdapMapper mapper = mProcessor.getMapperInstance(name);
 
@@ -1421,14 +1423,14 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getMapperDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getMapperDefaultParams(implname);
         NameValuePairs params = new NameValuePairs();
 
         // implName is always required so always send it.
         params.add(Constants.PR_MAPPER_IMPL_NAME, "");
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
 
                 params.add(kv.substring(0, index),
@@ -1463,7 +1465,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         ILdapMapper mapperInst = (ILdapMapper)
                 mProcessor.getMapperInstance(id);
-        Vector configParams = mapperInst.getInstanceParams();
+        Vector<String> configParams = mapperInst.getInstanceParams();
         NameValuePairs params = new NameValuePairs();
 
         params.add(Constants.PR_MAPPER_IMPL_NAME,
@@ -1471,7 +1473,7 @@ public class PublisherAdminServlet extends AdminServlet {
         // implName is always required so always send it.
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
 
                 params.add(kv.substring(0, index),
@@ -1528,14 +1530,14 @@ public class PublisherAdminServlet extends AdminServlet {
 
         ILdapMapper oldinst =
                 (ILdapMapper) mProcessor.getMapperInstance(id);
-        Vector oldConfigParms = oldinst.getInstanceParams();
+        Vector<String> oldConfigParms = oldinst.getInstanceParams();
         NameValuePairs saveParams = new NameValuePairs();
 
         // implName is always required so always include it it.
         saveParams.add("pluginName", implname);
         if (oldConfigParms != null) {
             for (int i = 0; i < oldConfigParms.size(); i++) {
-                String kv = (String) oldConfigParms.elementAt(i);
+                String kv = oldConfigParms.elementAt(i);
                 int index = kv.indexOf('=');
 
                 saveParams.add(kv.substring(0, index),
@@ -1554,7 +1556,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // create new substore.
 
-        Vector configParams = mProcessor.getMapperInstanceParams(id);
+        Vector<String> configParams = mProcessor.getMapperInstanceParams(id);
 
         instancesConfig.removeSubStore(id);
 
@@ -1563,7 +1565,7 @@ public class PublisherAdminServlet extends AdminServlet {
         substore.put("pluginName", implname);
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
                 String key = kv.substring(0, index);
                 String val = req.getParameter(key);
@@ -1683,7 +1685,7 @@ public class PublisherAdminServlet extends AdminServlet {
         IConfigStore instancesConfig = destStore.getSubStore("impl");
 
         // Does the class exist?
-        Class newImpl = null;
+        Class<?> newImpl = null;
 
         try {
             newImpl = Class.forName(classPath);
@@ -1781,7 +1783,7 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getRuleDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getRuleDefaultParams(implname);
 
         IConfigStore destStore =
                 mConfig.getSubStore(mAuth.getId()
@@ -1792,7 +1794,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
                 String val = req.getParameter(kv.substring(0, index));
 
@@ -1882,10 +1884,10 @@ public class PublisherAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = mProcessor.getRulePlugins().keys();
+        Enumeration<String> e = mProcessor.getRulePlugins().keys();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             RulePlugin value = (RulePlugin)
                     mProcessor.getRulePlugins().get(name);
             // get Description
@@ -1909,11 +1911,10 @@ public class PublisherAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        String insts = null;
-        Enumeration e = mProcessor.getRuleInsts().keys();
+        Enumeration<String> e = mProcessor.getRuleInsts().keys();
 
         for (; e.hasMoreElements();) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             ILdapRule value = (ILdapRule)
                     mProcessor.getRuleInsts().get((Object) name);
             String enabled = value.enabled() ? "enabled" : "disabled";
@@ -1959,9 +1960,8 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // first check if any instances from this rule
         // DON'T remove rule if any instance
-        for (Enumeration e = mProcessor.getRuleInsts().elements(); e.hasMoreElements();) {
-            ILdapRule rule = (ILdapRule)
-                    e.nextElement();
+        for (Enumeration<ILdapRule> e = mProcessor.getRuleInsts().elements(); e.hasMoreElements();) {
+            ILdapRule rule = e.nextElement();
 
             if (id.equals(getRulePluginName(rule))) {
                 sendResponse(ERROR, CMS.getUserMessage(getLocale(req), "CMS_LDAP_SRVLT_IN_USE"), null, resp);
@@ -2058,7 +2058,7 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getRuleDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getRuleDefaultParams(implname);
         NameValuePairs params = new NameValuePairs();
 
         // implName is always required so always send it.
@@ -2099,7 +2099,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         ILdapRule ruleInst = (ILdapRule)
                 mProcessor.getRuleInsts().get(id);
-        Vector configParams = ruleInst.getInstanceParams();
+        Vector<String> configParams = ruleInst.getInstanceParams();
         NameValuePairs params = new NameValuePairs();
 
         params.add(Constants.PR_RULE_IMPL_NAME,
@@ -2163,14 +2163,14 @@ public class PublisherAdminServlet extends AdminServlet {
 
         ILdapRule oldinst =
                 (ILdapRule) mProcessor.getRuleInsts().get((Object) id);
-        Vector oldConfigParms = oldinst.getInstanceParams();
+        Vector<String> oldConfigParms = oldinst.getInstanceParams();
         NameValuePairs saveParams = new NameValuePairs();
 
         // implName is always required so always include it it.
         saveParams.add("pluginName", implname);
         if (oldConfigParms != null) {
             for (int i = 0; i < oldConfigParms.size(); i++) {
-                String kv = (String) oldConfigParms.elementAt(i);
+                String kv = oldConfigParms.elementAt(i);
                 int index = kv.indexOf('=');
 
                 saveParams.add(kv.substring(0, index),
@@ -2189,7 +2189,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // create new substore.
 
-        Vector configParams = mProcessor.getRuleDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getRuleDefaultParams(implname);
 
         instancesConfig.removeSubStore(id);
 
@@ -2198,7 +2198,7 @@ public class PublisherAdminServlet extends AdminServlet {
         substore.put("pluginName", implname);
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
                 String key = kv.substring(0, index);
                 String val = req.getParameter(key);
@@ -2322,7 +2322,7 @@ public class PublisherAdminServlet extends AdminServlet {
         IConfigStore instancesConfig = destStore.getSubStore("impl");
 
         // Does the class exist?
-        Class newImpl = null;
+        Class<?> newImpl = null;
 
         try {
             newImpl = Class.forName(classPath);
@@ -2422,7 +2422,7 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getPublisherDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getPublisherDefaultParams(implname);
 
         IConfigStore destStore =
                 mConfig.getSubStore(mAuth.getId() + ".publish.publisher");
@@ -2431,7 +2431,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         if (configParams != null) {
             for (int i = 0; i < configParams.size(); i++) {
-                String kv = (String) configParams.elementAt(i);
+                String kv = configParams.elementAt(i);
                 int index = kv.indexOf('=');
                 String val = null;
 
@@ -2533,10 +2533,10 @@ public class PublisherAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = mProcessor.getPublisherPlugins().keys();
+        Enumeration<String> e = mProcessor.getPublisherPlugins().keys();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             PublisherPlugin value = (PublisherPlugin)
                     mProcessor.getPublisherPlugins().get(name);
             // get Description
@@ -2571,11 +2571,10 @@ public class PublisherAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        String insts = null;
-        Enumeration e = mProcessor.getPublisherInsts().keys();
+        Enumeration<String> e = mProcessor.getPublisherInsts().keys();
 
         for (; e.hasMoreElements();) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
             ILdapPublisher value = mProcessor.getPublisherInstance(name);
 
             if (value == null)
@@ -2613,8 +2612,8 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // first check if any instances from this publisher
         // DON'T remove publisher if any instance
-        for (Enumeration e = mProcessor.getPublisherInsts().keys(); e.hasMoreElements();) {
-            String name = (String) e.nextElement();
+        for (Enumeration<String> e = mProcessor.getPublisherInsts().keys(); e.hasMoreElements();) {
+            String name = e.nextElement();
             ILdapPublisher publisher =
                     mProcessor.getPublisherInstance(name);
 
@@ -2722,7 +2721,7 @@ public class PublisherAdminServlet extends AdminServlet {
             return;
         }
 
-        Vector configParams = mProcessor.getPublisherDefaultParams(implname);
+        Vector<String> configParams = mProcessor.getPublisherDefaultParams(implname);
         NameValuePairs params = new NameValuePairs();
 
         // implName is always required so always send it.
@@ -2769,7 +2768,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         ILdapPublisher publisherInst = (ILdapPublisher)
                 mProcessor.getPublisherInstance(id);
-        Vector configParams = publisherInst.getInstanceParams();
+        Vector<String> configParams = publisherInst.getInstanceParams();
         NameValuePairs params = new NameValuePairs();
 
         params.add(Constants.PR_PUBLISHER_IMPL_NAME,
@@ -2844,7 +2843,7 @@ public class PublisherAdminServlet extends AdminServlet {
         // save old instance substore params in case new one fails. 
 
         ILdapPublisher oldinst = mProcessor.getPublisherInstance(id);
-        Vector oldConfigParms = oldinst.getInstanceParams();
+        Vector<String> oldConfigParms = oldinst.getInstanceParams();
         NameValuePairs saveParams = new NameValuePairs();
         String pubType = "";
 
@@ -2886,7 +2885,7 @@ public class PublisherAdminServlet extends AdminServlet {
 
         // create new substore.
 
-        Vector configParams = mProcessor.getPublisherInstanceParams(id);
+        Vector<String> configParams = mProcessor.getPublisherInstanceParams(id);
 
         instancesConfig.removeSubStore(id);
 
@@ -3107,10 +3106,10 @@ public class PublisherAdminServlet 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 != null)
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
index cbabe1fd0caaf61f4236072a050bb13be24d152b..1adde0891bc1486fc9b81e9fe13206098c4d2bfe 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/RAAdminServlet.java
@@ -185,10 +185,11 @@ public class RAAdminServlet extends AdminServlet {
             HttpServletResponse resp, IConfigStore rc) 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.OP_TYPE))
                 continue;
@@ -250,10 +251,11 @@ public class RAAdminServlet extends AdminServlet {
 
         IConfigStore riq = nc.getSubStore(IRegistrationAuthority.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;
@@ -285,10 +287,11 @@ public class RAAdminServlet extends AdminServlet {
         IConfigStore riq = nc.getSubStore(IRegistrationAuthority.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;
@@ -322,10 +325,11 @@ public class RAAdminServlet extends AdminServlet {
             HttpServletResponse resp, IConfigStore rc, IRequestListener thisListener) throws ServletException,
             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;
@@ -404,12 +408,13 @@ public class RAAdminServlet extends AdminServlet {
          }
          */
 
-        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;
@@ -441,11 +446,12 @@ public class RAAdminServlet extends AdminServlet {
             caConnectorConfig = connectorConfig.getSubStore("KRA");
         }
 
-        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;
@@ -469,10 +475,11 @@ public class RAAdminServlet extends AdminServlet {
 
     private boolean isCAConnector(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);
@@ -488,10 +495,11 @@ public class RAAdminServlet extends AdminServlet {
 
     private boolean isRAConnector(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);
@@ -507,10 +515,11 @@ public class RAAdminServlet 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);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java
index 8481fffe132a13f875357433ecaeaee879898adc..6eaf004f9a1bdf75796996b0549d5181edfcff4a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java
@@ -90,8 +90,6 @@ public class UsrGrpAdminServlet extends AdminServlet {
 
     private IUGSubsystem mMgr = null;
 
-    private IAuthzSubsystem mAuthz = null;
-
     private static String[] mMultiRoleGroupEnforceList = null;
     private final static String MULTI_ROLE_ENABLE = "multiroles.enable";
     private final static String MULTI_ROLE_ENFORCE_GROUP_LIST = "multiroles.false.groupEnforceList";
@@ -345,7 +343,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
 
         NameValuePairs params = new NameValuePairs();
 
-        Enumeration e = null;
+        Enumeration<IUser> e = null;
 
         try {
             e = mMgr.listUsers("*");
@@ -359,7 +357,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
         int i = 0;
 
         while (e.hasMoreElements()) {
-            IUser user = (IUser) e.nextElement();
+            IUser user = e.nextElement();
 
             if (i > 0) {
                 sb.append(";");
@@ -424,7 +422,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
 
             // get list of groups, and get a list of those that this
             //			uid belongs to
-            Enumeration e = null;
+            Enumeration<IGroup> e = null;
 
             try {
                 e = mMgr.findGroups("*");
@@ -438,7 +436,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
             StringBuffer grpString = new StringBuffer();
 
             while (e.hasMoreElements()) {
-                IGroup group = (IGroup) e.nextElement();
+                IGroup group = e.nextElement();
 
                 if (group.isMember(id) == true) {
                     if (grpString.length() != 0) {
@@ -553,7 +551,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
 
-        Enumeration e = null;
+        Enumeration<IGroup> e = null;
 
         try {
             e = mMgr.listGroups("*");
@@ -564,7 +562,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
         }
 
         while (e.hasMoreElements()) {
-            IGroup group = (IGroup) e.nextElement();
+            IGroup group = e.nextElement();
             String desc = group.getDescription();
 
             if (desc != null) {
@@ -600,7 +598,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
             return;
         }
 
-        Enumeration e = null;
+        Enumeration<IGroup> e = null;
 
         try {
             e = mMgr.findGroups(id);
@@ -611,13 +609,13 @@ public class UsrGrpAdminServlet extends AdminServlet {
         }
 
         if (e.hasMoreElements()) {
-            IGroup group = (IGroup) e.nextElement();
+            IGroup group = e.nextElement();
 
             params.add(Constants.PR_GROUP_GROUP, group.getGroupID());
             params.add(Constants.PR_GROUP_DESC,
                     group.getDescription());
 
-            Enumeration members = group.getMemberNames();
+            Enumeration<String> members = group.getMemberNames();
             StringBuffer membersString = new StringBuffer();
 
             if (members != null) {
@@ -626,7 +624,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
                         membersString.append(", ");
                     }
 
-                    String mn = (String) members.nextElement();
+                    String mn = members.nextElement();
 
                     membersString.append(mn);
                 }
@@ -814,7 +812,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
                         Constants.PR_USER_GROUP);
 
                 if (groupName != null) {
-                    Enumeration e = null;
+                    Enumeration<IGroup> e = null;
 
                     try {
                         e = mMgr.findGroups(groupName);
@@ -836,7 +834,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
                     }
 
                     if (e.hasMoreElements()) {
-                        IGroup group = (IGroup) e.nextElement();
+                        IGroup group = e.nextElement();
 
                         group.addMemberName(id);
                         try {
@@ -902,8 +900,6 @@ public class UsrGrpAdminServlet extends AdminServlet {
                 }
                 return;
             } catch (LDAPException e) {
-                String errMsg = "addUser()" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_ADD_USER_FAIL", e.toString()));
 
                 // store a message in the signed audit log file
@@ -1530,7 +1526,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
                 return;
             }
             // get list of groups, and see if uid belongs to any
-            Enumeration e = null;
+            Enumeration<IGroup> e = null;
 
             try {
                 e = mMgr.findGroups("*");
@@ -2090,7 +2086,7 @@ public class UsrGrpAdminServlet extends AdminServlet {
     }
 
     private boolean isDuplicate(String groupName, String memberName) {
-        Enumeration groups = null;
+        Enumeration<IGroup> groups = null;
 
         // Let's not mess with users that are already a member of this group
         boolean isMember = false;
@@ -2105,15 +2101,15 @@ public class UsrGrpAdminServlet extends AdminServlet {
         try {
             groups = mMgr.listGroups("*");
             while (groups.hasMoreElements()) {
-                IGroup group = (IGroup) groups.nextElement();
+                IGroup group = groups.nextElement();
                 String name = group.getName();
-                Enumeration g = mMgr.findGroups(name);
-                IGroup g1 = (IGroup) g.nextElement();
+                Enumeration<IGroup> g = mMgr.findGroups(name);
+                IGroup g1 = g.nextElement();
                 if (!name.equals(groupName)) {
                     if (isGroupInMultiRoleEnforceList(name)) {
-                        Enumeration members = g1.getMemberNames();
+                        Enumeration<String> members = g1.getMemberNames();
                         while (members.hasMoreElements()) {
-                            String m1 = (String) members.nextElement();
+                            String m1 = members.nextElement();
                             if (m1.equals(memberName))
                                 return true;
                         }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
index e292e501a460a14ea60104579a4c811f3388c3fe..a48b8146c70eb1cebbc4ecd9975853c18c75f40c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
@@ -55,7 +55,6 @@ import netscape.security.x509.RevocationReason;
 import netscape.security.x509.RevokedCertImpl;
 import netscape.security.x509.X509CertImpl;
 
-import org.mozilla.jss.ssl.SSLSocket;
 import org.w3c.dom.Node;
 
 import com.netscape.certsrv.apps.CMS;
@@ -446,7 +445,6 @@ public abstract class CMSServlet extends HttpServlet {
             outputHttpParameters(httpReq);
         }
         CMS.debug("CMSServlet: " + mId + " start to service.");
-        String className = this.getClass().getName();
 
         // get a cms request 
         CMSRequest cmsRequest = newCMSRequest();
@@ -770,7 +768,6 @@ public abstract class CMSServlet extends HttpServlet {
      * Invalidates a SSL Session. So client auth will happen again.
      */
     protected static void invalidateSSLSession(HttpServletRequest httpReq) {
-        SSLSocket s = null;
 
         /*
          try {
@@ -1812,9 +1809,6 @@ public abstract class CMSServlet extends HttpServlet {
         String auditACLResource = resource;
         String auditOperation = "enroll";
 
-        SessionContext auditContext = SessionContext.getExistingContext();
-        String authManagerId = null;
-
         try {
             authzToken = mAuthz.authorize(authzMgrName, authToken, exp);
             if (authzToken != null) {
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 bdaa0df2942309a2a82780d08487b91b3a5875b7..c34cd2227bd62e5e45297e17105e1f61bc4b09d2 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
@@ -183,7 +183,7 @@ public class DisplayCRL extends CMSServlet {
         boolean isCRLCacheEnabled = false;
         String masterHost = null;
         String masterPort = null;
-        Vector ipNames = null;
+        Vector<String> ipNames = null;
         String ipId = crlIssuingPointId;
         ICRLRepository crlRepository = mCA.getCRLRepository();
 
@@ -203,7 +203,7 @@ public class DisplayCRL extends CMSServlet {
                 if (ipNames != null && ipNames.size() > 0) {
                     int i;
                     for (i = 0; i < ipNames.size(); i++) {
-                        String ipName = (String) ipNames.elementAt(i);
+                        String ipName = ipNames.elementAt(i);
                         if (crlIssuingPointId.equals(ipName)) {
                             break;
                         }
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 ce3b7ee69842da4f58f3ae4d2c91f5cb0c180c04..9db5cb892101874eee84c40c63b27880d17b6aee 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
@@ -213,9 +213,9 @@ public class GetInfo extends CMSServlet {
 
                 ICRLRepository crlRepository = mCA.getCRLRepository();
 
-                Vector ipNames = crlRepository.getIssuingPointsNames();
+                Vector<String> ipNames = crlRepository.getIssuingPointsNames();
                 for (int i = 0; i < ipNames.size(); i++) {
-                    String ipName = (String) ipNames.elementAt(i);
+                    String ipName = ipNames.elementAt(i);
                     ICRLIssuingPointRecord crlRecord = null;
                     try {
                         crlRecord = crlRepository.readCRLIssuingPointRecord(ipName);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ReasonToRevoke.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ReasonToRevoke.java
index 87882059777dfe790b76ad65786536bea16f50f7..b8e56b3e7755e1f30e972f74dde99824eab86375 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ReasonToRevoke.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ReasonToRevoke.java
@@ -249,7 +249,6 @@ public class ReasonToRevoke extends CMSServlet {
                     totalRecordCount, mTimeLimits);
 
             int count = 0;
-            String errorMsg = null;
 
             while (e != null && e.hasMoreElements()) {
                 ICertRecord rec = (ICertRecord) e.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/RemoteAuthConfig.java b/pki/base/common/src/com/netscape/cms/servlet/cert/RemoteAuthConfig.java
index 5a0a12662434770b523b4f03c9eb6b19d6d69b41..55d8bb04c18150c049cf2444bd9c88571b138bc8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/RemoteAuthConfig.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/RemoteAuthConfig.java
@@ -75,7 +75,7 @@ public class RemoteAuthConfig extends CMSServlet {
     private IAuthSubsystem mAuthSubsystem = null;
     private IConfigStore mAuthConfig = null;
     private IConfigStore mFileConfig = null;
-    private Vector mRemotelySetInstances = new Vector();
+    private Vector<String> mRemotelySetInstances = new Vector<String>();
     private boolean mEnableRemoteConfiguration = false;
 
     /**
@@ -302,10 +302,11 @@ public class RemoteAuthConfig extends CMSServlet {
                 LDAPAttribute attr = entry.getAttribute(MEMBER_OF);
 
                 if (attr != null) {
-                    Enumeration eVals = attr.getStringValues();
+                    @SuppressWarnings("unchecked")
+                    Enumeration<String> eVals = attr.getStringValues();
 
                     while (eVals.hasMoreElements()) {
-                        String nextValue = (String) eVals.nextElement();
+                        String nextValue = eVals.nextElement();
 
                         if (nextValue.indexOf("Administrator") > -1) {
                             LDAPEntry groupEntry = c.read(nextValue);
@@ -314,10 +315,11 @@ public class RemoteAuthConfig extends CMSServlet {
                                 LDAPAttribute gAttr = groupEntry.getAttribute(UNIQUE_MEMBER);
 
                                 if (gAttr != null) {
-                                    Enumeration eValues = gAttr.getStringValues();
+                                    @SuppressWarnings("unchecked")
+                                    Enumeration<String> eValues = gAttr.getStringValues();
 
                                     while (eValues.hasMoreElements()) {
-                                        String value = (String) eValues.nextElement();
+                                        String value = eValues.nextElement();
 
                                         if (value.equals(entry.getDN())) {
                                             c.disconnect();
@@ -409,10 +411,11 @@ public class RemoteAuthConfig extends CMSServlet {
 
                     if (attr != null) {
                         memberOf = true;
-                        Enumeration eVals = attr.getStringValues();
+                        @SuppressWarnings("unchecked")
+                        Enumeration<String> eVals = attr.getStringValues();
 
                         while (eVals.hasMoreElements()) {
-                            String nextValue = (String) eVals.nextElement();
+                            String nextValue = eVals.nextElement();
 
                             if (nextValue.indexOf("Administrator") > -1) {
                                 LDAPEntry groupEntry = c.read(nextValue);
@@ -421,10 +424,11 @@ public class RemoteAuthConfig extends CMSServlet {
                                     LDAPAttribute gAttr = groupEntry.getAttribute(UNIQUE_MEMBER);
 
                                     if (gAttr != null) {
-                                        Enumeration eValues = gAttr.getStringValues();
+                                        @SuppressWarnings("unchecked")
+                                        Enumeration<String> eValues = gAttr.getStringValues();
 
                                         while (eValues.hasMoreElements()) {
-                                            String value = (String) eValues.nextElement();
+                                            String value = eValues.nextElement();
 
                                             if (value.equals(entry.getDN())) {
                                                 c.disconnect();
@@ -516,7 +520,7 @@ public class RemoteAuthConfig extends CMSServlet {
         for (int i = 0; i < mRemotelySetInstances.size(); i++) {
             if (i > 0)
                 list.append(",");
-            list.append((String) mRemotelySetInstances.elementAt(i));
+            list.append(mRemotelySetInstances.elementAt(i));
         }
 
         mAuthConfig.putString(REMOTELY_SET_INSTANCES, list.toString());
@@ -543,7 +547,7 @@ public class RemoteAuthConfig extends CMSServlet {
             for (int i = 0; i < mRemotelySetInstances.size(); i++) {
                 if (i > 0)
                     list.append(",");
-                list.append((String) mRemotelySetInstances.elementAt(i));
+                list.append(mRemotelySetInstances.elementAt(i));
             }
 
             mAuthConfig.putString(REMOTELY_SET_INSTANCES, list.toString());
@@ -563,10 +567,10 @@ public class RemoteAuthConfig extends CMSServlet {
         boolean isListed = false;
 
         if (pluginName != null && pluginName.length() > 0) {
-            Enumeration e = mAuthSubsystem.getAuthManagerPlugins();
+            Enumeration<AuthMgrPlugin> e = mAuthSubsystem.getAuthManagerPlugins();
 
             while (e.hasMoreElements()) {
-                AuthMgrPlugin plugin = (AuthMgrPlugin) e.nextElement();
+                AuthMgrPlugin plugin = e.nextElement();
 
                 if (pluginName.equals(plugin.getId())) {
                     isListed = true;
@@ -582,10 +586,10 @@ public class RemoteAuthConfig extends CMSServlet {
         boolean isListed = false;
 
         if (instanceName != null && instanceName.length() > 0) {
-            Enumeration e = mAuthSubsystem.getAuthManagers();
+            Enumeration<IAuthManager> e = mAuthSubsystem.getAuthManagers();
 
             while (e.hasMoreElements()) {
-                IAuthManager authManager = (IAuthManager) e.nextElement();
+                IAuthManager authManager = e.nextElement();
 
                 if (instanceName.equals(authManager.getName())) {
                     isListed = true;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
index 2bc1d305164612bc28f67083179ebbea3f7b3d42..fd245421037626eee7960cfdd5ac8a49b3571312 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
@@ -278,10 +278,10 @@ public class RenewalServlet extends CMSServlet {
             cmsReq.setIRequestStatus();
             // audit log the status
             if (status == RequestStatus.REJECTED) {
-                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();
                     StringBuffer wholeMsg = new StringBuffer();
 
                     while (msgs.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
index 875f2ab67a99d77af8c14b60bf21bd1a66b259c9..a4d434bd4d22ae5f02f77f67c1ede8fb44ce277d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
@@ -239,10 +239,10 @@ public class RevocationServlet extends CMSServlet {
 
             if (status == RequestStatus.COMPLETE) {
                 header.addStringValue("request", req.getRequestId().toString());
-                Enumeration enum1 = req.getExtDataKeys();
+                Enumeration<String> enum1 = req.getExtDataKeys();
 
                 while (enum1.hasMoreElements()) {
-                    String name = (String) enum1.nextElement();
+                    String name = enum1.nextElement();
 
                     if (name.equals(IRequest.OLD_CERTS)) {
                         X509CertImpl[] certs = req.getExtDataInCertArray(IRequest.OLD_CERTS);
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 dc084bd94e963029e433748b4e37465a169ad4fe..0491ccef5eed37a8a8940437df225b215801f173 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
@@ -342,10 +342,10 @@ public class UpdateDir extends CMSServlet {
                 updateValue[UPDATE_CRL].equalsIgnoreCase("yes"))) {
             // check if received issuing point ID is known to the server
             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())) {
                         break;
@@ -357,19 +357,19 @@ public class UpdateDir extends CMSServlet {
             if (crlIssuingPointId == null) {
                 // publish all issuing points
                 if (mClonedCA && mCRLRepository != null) {
-                    Vector ipNames = mCRLRepository.getIssuingPointsNames();
+                    Vector<String> ipNames = mCRLRepository.getIssuingPointsNames();
                     if (ipNames != null && ipNames.size() > 0) {
                         for (int i = 0; i < ipNames.size(); i++) {
-                            String ipName = (String) ipNames.elementAt(i);
+                            String ipName = ipNames.elementAt(i);
 
                             updateCRLIssuingPoint(header, ipName, null, locale);
                         }
                     }
                 } else {
-                    Enumeration oips = mCA.getCRLIssuingPoints();
+                    Enumeration<ICRLIssuingPoint> oips = mCA.getCRLIssuingPoints();
 
                     while (oips.hasMoreElements()) {
-                        ICRLIssuingPoint oip = (ICRLIssuingPoint) oips.nextElement();
+                        ICRLIssuingPoint oip = oips.nextElement();
 
                         updateCRLIssuingPoint(header, oip.getId(), oip, locale);
                     }
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 d04e2fb22933c381c05e8ce0ca4a9e4b72429d4d..20743022a179ef2b86b2ad249547d9a85c840e0d 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
@@ -77,8 +77,9 @@ public class CMSGateway {
     public CMSGateway() {
     }
 
-    public static Hashtable toHashtable(HttpServletRequest req) {
-        Hashtable httpReqHash = new Hashtable();
+    public static Hashtable<String, String> toHashtable(HttpServletRequest req) {
+        Hashtable<String, String> httpReqHash = new Hashtable<String, String>();
+        @SuppressWarnings("unchecked")
         Enumeration<String> names = req.getParameterNames();
 
         while (names.hasMoreElements()) {
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 b1be4f7a57a58f4947f9020ad9d211665c5fce66..ecc5f45beeaebd92a2e99721d0212b1380ae2bc4 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
@@ -82,7 +82,7 @@ public class CMSRequest {
 
     // any request resulting data;
     Object mResult = null;
-    Hashtable mResults = new Hashtable();
+    Hashtable<String, Object> mResults = new Hashtable<String, Object>();
 
     /**
      * Constructor
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
index 8ca70bd4ac3f1d2d4edb9248da938d2451bd1f46..d1c2b6bfb7e60f4a088e7c3b6e7c6026e44817d7 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
@@ -252,13 +252,13 @@ public class RegisterUser extends CMSServlet {
         auditParams = "Scope;;groups+Operation;;OP_MODIFY+source;;RegisterUser" +
                       "+Resource;;" + mGroupName;
         try {
-            Enumeration groups = ugsys.findGroups(mGroupName);
-            IGroup group = (IGroup) groups.nextElement();
+            Enumeration<IGroup> groups = ugsys.findGroups(mGroupName);
+            IGroup group = groups.nextElement();
 
             auditParams += "+user;;";
-            Enumeration members = group.getMemberNames();
+            Enumeration<String> members = group.getMemberNames();
             while (members.hasMoreElements()) {
-                auditParams += (String) members.nextElement();
+                auditParams += members.nextElement();
                 if (members.hasMoreElements()) {
                     auditParams += ",";
                 }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SessionTimer.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SessionTimer.java
index 49cadb9c23cc18e8cdee0c280b646322eac2870d..2d8a188af882924808cd53431fbd57bf8fc6d2a0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SessionTimer.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SessionTimer.java
@@ -37,9 +37,9 @@ public class SessionTimer extends TimerTask {
     }
 
     public void run() {
-        Enumeration keys = m_sessiontable.getSessionIds();
+        Enumeration<String> keys = m_sessiontable.getSessionIds();
         while (keys.hasMoreElements()) {
-            String sessionId = (String) keys.nextElement();
+            String sessionId = keys.nextElement();
             long beginTime = m_sessiontable.getBeginTime(sessionId);
             Date nowDate = new Date();
             long nowTime = nowDate.getTime();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
index fcb88c917b90ffbc3cda3b1dd39f106a33e23001..c915d9e85945f3f9f97997fd1c8c36ffa128c8e0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
@@ -46,7 +46,7 @@ import com.netscape.cms.servlet.wizard.WizardServlet;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 
 public class SizePanel extends WizardPanelBase {
-    private Vector mCerts = null;
+    private Vector<Cert> mCerts = null;
     private WizardServlet mServlet = null;
 
     private String default_ecc_curve_name;
@@ -128,7 +128,7 @@ public class SizePanel extends WizardPanelBase {
 
         context.put("firsttime", "false");
         String errorString = "";
-        mCerts = new Vector();
+        mCerts = new Vector<Cert>();
 
         IConfigStore config = CMS.getConfigStore();
         try {
@@ -251,10 +251,10 @@ public class SizePanel extends WizardPanelBase {
         String token = "";
         try {
             token = config.getString(PRE_CONF_CA_TOKEN, "");
-            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)
@@ -411,10 +411,10 @@ public class SizePanel extends WizardPanelBase {
         }
 
         // generate key pair 
-        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 friendlyName = ct;
             boolean enable = true;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateConnector.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateConnector.java
index bba1f3782749953291d8593ea1a39774ed41f57b..f3df51bd1956fd259bfffe29084d11332919fa27 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateConnector.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateConnector.java
@@ -122,9 +122,10 @@ public class UpdateConnector extends CMSServlet {
 
         IConfigStore cs = CMS.getConfigStore();
 
-        Enumeration list = httpReq.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> list = httpReq.getParameterNames();
         while (list.hasMoreElements()) {
-            String name = (String) list.nextElement();
+            String name = list.nextElement();
             String val = httpReq.getParameter(name);
             if (name != null && name.startsWith("ca.connector")) {
                 CMS.debug("Adding connector update name=" + name + " val=" + val);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
index 83eaca45f33784471a218334502dbc0e8cb6f063..2d9daff95065ce924a3ec5986af1c6db81692e8b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
@@ -135,8 +135,7 @@ public class ListCAServlet extends CMSServlet {
                 Integer.toString(defStore.getStateCount()));
 
         while (recs.hasMoreElements()) {
-            ICRLIssuingPointRecord rec =
-                    (ICRLIssuingPointRecord) recs.nextElement();
+            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord) recs.nextElement();
             IArgBlock rarg = CMS.createArgBlock();
             String thisId = rec.getId();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
index 8ec82d0a42c0faa19ef551b4a9b172c57a4db6e8..e580cc9a453b40a93655fa48e0c16be239067c83 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
@@ -437,19 +437,19 @@ public class QueryReq extends CMSServlet {
 
             int numEntries = list.getSize() - list.getCurrentIndex();
 
-            Vector v = fetchRecords(list, maxCount);
+            Vector<IRequest> v = fetchRecords(list, maxCount);
             v = normalizeOrder(v);
             trim(v, id);
 
             int currentCount = 0;
             BigInteger curNum = BigInteger.ZERO;
             BigInteger firstNum = BigInteger.ONE.negate();
-            Enumeration requests = v.elements();
+            Enumeration<IRequest> requests = v.elements();
 
             while (requests.hasMoreElements()) {
                 IRequest request = null;
                 try {
-                    request = (IRequest) requests.nextElement();
+                    request = requests.nextElement();
                 } catch (Exception e) {
                     CMS.debug("Error displaying request:" + e.getMessage());
                     // handled below
@@ -493,9 +493,9 @@ public class QueryReq extends CMSServlet {
      * @param v The vector to trim
      * @param marker the marker to look for.
      */
-    private void trim(Vector v, RequestId marker) {
+    private void trim(Vector<IRequest> v, RequestId marker) {
         int i = v.size() - 1;
-        if (((IRequest) v.elementAt(i)).getRequestId().toString().equals(
+        if (v.elementAt(i).getRequestId().toString().equals(
                 marker.toString())) {
             v.remove(i);
         }
@@ -508,9 +508,9 @@ public class QueryReq extends CMSServlet {
      * @param list
      * @return
      */
-    private Vector fetchRecords(IRequestVirtualList list, int maxCount) {
+    private Vector<IRequest> fetchRecords(IRequestVirtualList list, int maxCount) {
 
-        Vector v = new Vector();
+        Vector<IRequest> v = new Vector<IRequest>();
         int count = list.getSize();
         int c = 0;
         for (int i = 0; i < count; i++) {
@@ -533,20 +533,20 @@ public class QueryReq extends CMSServlet {
      * @param list
      * @return
      */
-    private Vector normalizeOrder(Vector list) {
+    private Vector<IRequest> normalizeOrder(Vector<IRequest> list) {
 
-        BigInteger firstrequestnum = new BigInteger(((IRequest) list.elementAt(0))
+        BigInteger firstrequestnum = new BigInteger(list.elementAt(0)
                 .getRequestId().toString());
-        BigInteger lastrequestnum = new BigInteger(((IRequest) list.elementAt(list
-                .size() - 1)).getRequestId().toString());
+        BigInteger lastrequestnum = new BigInteger(list.elementAt(list
+                .size() - 1).getRequestId().toString());
         boolean reverse = false;
         if (firstrequestnum.compareTo(lastrequestnum) > 0) {
             reverse = true; // if the order is backwards, place items at the beginning
         }
-        Vector v = new Vector();
+        Vector<IRequest> v = new Vector<IRequest>();
         int count = list.size();
         for (int i = 0; i < count; i++) {
-            Object request = list.elementAt(i);
+            IRequest request = list.elementAt(i);
             if (request != null) {
                 if (reverse)
                     v.add(0, request);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java b/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
index bc4ab990b2824b0bcc94ca36e6d912fbc3e5c1ba..a71f26dcfa01f594cc40661a726e1e8286dd70e9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
@@ -52,7 +52,7 @@ public class WizardServlet extends VelocityServlet {
      */
     private static final long serialVersionUID = -4513510177445656799L;
     private String name = null;
-    private Vector mPanels = new Vector();
+    private Vector<IWizardPanel> mPanels = new Vector<IWizardPanel>();
 
     public void init(ServletConfig config) throws ServletException {
         super.init(config);
@@ -84,8 +84,8 @@ public class WizardServlet extends VelocityServlet {
     public void exposePanels(HttpServletRequest request,
                             HttpServletResponse response,
                             Context context) {
-        Enumeration e = mPanels.elements();
-        Vector panels = new Vector();
+        Enumeration<IWizardPanel> e = mPanels.elements();
+        Vector<IWizardPanel> panels = new Vector<IWizardPanel>();
         while (e.hasMoreElements()) {
             IWizardPanel p = (IWizardPanel) e.nextElement();
             panels.addElement(p);
@@ -106,7 +106,7 @@ public class WizardServlet extends VelocityServlet {
     }
 
     public IWizardPanel getPanelByNo(int p) {
-        IWizardPanel panel = (IWizardPanel) mPanels.elementAt(p);
+        IWizardPanel panel = mPanels.elementAt(p);
         if (panel.shouldSkip()) {
             panel = getPanelByNo(p + 1);
         }
@@ -153,8 +153,8 @@ public class WizardServlet extends VelocityServlet {
             ret += ((Integer) v).toString();
         } else if (v instanceof Vector) {
             ret += "<Vector>";
-            Vector v1 = (Vector) v;
-            Enumeration e = v1.elements();
+            Vector<?> v1 = (Vector<?>) v;
+            Enumeration<?> e = v1.elements();
             StringBuffer sb = new StringBuffer();
             while (e.hasMoreElements()) {
                 sb.append(xml_value_flatten(e.nextElement()));
@@ -227,7 +227,7 @@ public class WizardServlet extends VelocityServlet {
         if (request.getParameter("panelname") != null) {
             String name = request.getParameter("panelname");
             for (int i = 0; i < mPanels.size(); i++) {
-                IWizardPanel panel = (IWizardPanel) mPanels.elementAt(i);
+                IWizardPanel panel = mPanels.elementAt(i);
                 if (panel.getId().equals(name)) {
                     return i;
                 }
@@ -239,19 +239,18 @@ public class WizardServlet extends VelocityServlet {
     }
 
     public String getNameFromPanelNo(int p) {
-        IWizardPanel wp = (IWizardPanel) mPanels.elementAt(p);
+        IWizardPanel wp = mPanels.elementAt(p);
         return wp.getId();
     }
 
     public IWizardPanel getPreviousPanel(int p) {
         CMS.debug("getPreviousPanel input p=" + p);
-        IWizardPanel backpanel = (IWizardPanel) mPanels.elementAt(p - 1);
+        IWizardPanel backpanel = mPanels.elementAt(p - 1);
         if (backpanel.isSubPanel()) {
-            backpanel = (IWizardPanel) mPanels.elementAt(p - 1 - 1);
+            backpanel = mPanels.elementAt(p - 1 - 1);
         }
         while (backpanel.shouldSkip()) {
-            backpanel = (IWizardPanel)
-                         mPanels.elementAt(backpanel.getPanelNo() - 1);
+            backpanel = mPanels.elementAt(backpanel.getPanelNo() - 1);
         }
         CMS.debug("getPreviousPanel output p=" + backpanel.getPanelNo());
         return backpanel;
@@ -259,9 +258,9 @@ public class WizardServlet extends VelocityServlet {
 
     public IWizardPanel getNextPanel(int p) {
         CMS.debug("getNextPanel input p=" + p);
-        IWizardPanel panel = (IWizardPanel) mPanels.elementAt(p);
+        IWizardPanel panel = mPanels.elementAt(p);
         if (p == (mPanels.size() - 1)) {
-            p = p;
+            // p = p;
         } else if (panel.isSubPanel()) {
             if (panel.isLoopbackPanel()) {
                 p = p - 1; // Login Panel is a loop back panel
@@ -303,7 +302,7 @@ public class WizardServlet extends VelocityServlet {
         else
             CMS.debug("WizardServlet: in next " + p);
 
-        IWizardPanel panel = (IWizardPanel) mPanels.elementAt(p);
+        IWizardPanel panel = mPanels.elementAt(p);
         try {
             panel.validate(request, response, context);
             try {
@@ -419,9 +418,9 @@ public class WizardServlet extends VelocityServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("WizardServlet: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/cmscore/cert/X500NameSubsystem.java b/pki/base/common/src/com/netscape/cmscore/cert/X500NameSubsystem.java
index 4f6d6c63288dddd45d63357633779f5a6b5d2e6c..89a22921662cfe4e157f44ffacf346c53c0bf582 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/X500NameSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/X500NameSubsystem.java
@@ -154,7 +154,7 @@ public class X500NameSubsystem implements ISubsystem {
             throws EBaseException {
         X500NameAttrMap globalMap = X500NameAttrMap.getDefault();
         IConfigStore attrSubStore = mConfig.getSubStore(PROP_ATTR);
-        Enumeration attrNames = attrSubStore.getSubStoreNames();
+        Enumeration<String> attrNames = attrSubStore.getSubStoreNames();
 
         while (attrNames.hasMoreElements()) {
             String name = (String) attrNames.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/RequestTransfer.java b/pki/base/common/src/com/netscape/cmscore/connector/RequestTransfer.java
index c00d5c8b5debade7daaa4bc3802e6812b0d1356d..33a2d7d7138b37ae1786796d64bac37bb5930527 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/RequestTransfer.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/RequestTransfer.java
@@ -71,11 +71,11 @@ public class RequestTransfer {
             // copy everything in the request
             CMS.debug("RequestTransfer: profile request " +
                     r.getRequestId().toString());
-            Enumeration e = r.getExtDataKeys();
-            Vector v = new Vector();
+            Enumeration<String> e = r.getExtDataKeys();
+            Vector<String> v = new Vector<String>();
 
             while (e.hasMoreElements()) {
-                String k = (String) e.nextElement();
+                String k = e.nextElement();
 
                 if (k.equals("requestType"))
                     continue;
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/Resender.java b/pki/base/common/src/com/netscape/cmscore/connector/Resender.java
index edef41b8c6c10653930c7bb6a310b06b387534cd..783caa6710a13f29514513485cf9340a7275fdc7 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/Resender.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/Resender.java
@@ -50,7 +50,7 @@ public class Resender implements IResender {
     protected IRemoteAuthority mDest = null;
 
     /* Vector of Request Id *Strings* */
-    protected Vector mRequestIds = new Vector();
+    protected Vector<String> mRequestIds = new Vector<String>();
 
     protected HttpConnection mConn = null;
 
@@ -130,15 +130,16 @@ public class Resender implements IResender {
 
     private void resend() {
         // clone a seperate list so mRequestIds can be modified
-        Vector rids = (Vector) mRequestIds.clone();
-        Vector completedRids = new Vector();
+        @SuppressWarnings("unchecked")
+        Vector<String> rids = (Vector<String>) mRequestIds.clone();
+        Vector<RequestId> completedRids = new Vector<RequestId>();
 
         // resend each request to CA to ping for status.
-        Enumeration enum1 = rids.elements();
+        Enumeration<String> enum1 = rids.elements();
 
         while (enum1.hasMoreElements()) {
             // request ids are added as strings.
-            String ridString = (String) enum1.nextElement();
+            String ridString = enum1.nextElement();
             RequestId rid = new RequestId(ridString);
             IRequest r = null;
 
@@ -181,11 +182,11 @@ public class Resender implements IResender {
         }
 
         // remove completed ones from list so they won't be resent.
-        Enumeration en = completedRids.elements();
+        Enumeration<RequestId> en = completedRids.elements();
 
         synchronized (mRequestIds) {
             while (en.hasMoreElements()) {
-                RequestId id = (RequestId) en.nextElement();
+                RequestId id = en.nextElement();
 
                 CMS.debug(
                         "Connector: Removed request " + id + " from re-send queue");
@@ -200,7 +201,6 @@ public class Resender implements IResender {
     // this is almost the same as connector's send.
     private boolean send(IRequest r)
             throws IOException, EBaseException {
-        IRequest reply = null;
 
         try {
             HttpPKIMessage tomsg = new HttpPKIMessage();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
index 5cf7ecbc234cece70ed2bb4de801729e069e29c9..a54ff500f4808847dedc199d10bcf2b71ec381fa 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
@@ -120,13 +120,13 @@ public class CRLRepository extends Repository implements ICRLRepository {
     /**
      * Retrieves all issuing points' names
      */
-    public Vector getIssuingPointsNames() throws EBaseException {
+    public Vector<String> getIssuingPointsNames() throws EBaseException {
         IDBSSession s = mDBService.createSession();
         try {
             String[] attrs = { ICRLIssuingPointRecord.ATTR_ID, "objectclass" };
             String filter = "objectclass=" + CMS.getCRLIssuingPointRecordName();
             IDBSearchResults res = s.search(getDN(), filter, attrs);
-            Vector v = new Vector();
+            Vector<String> v = new Vector<String>();
             while (res.hasMoreElements()) {
                 ICRLIssuingPointRecord nextelement =
                         (ICRLIssuingPointRecord) res.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
index be26c036c1d48b87913ffeb2272f3defb592d3bf..4adb17dd868bf12a738f43d208e30722895d9869 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
@@ -74,7 +74,7 @@ public class DBSubsystem implements IDBSubsystem {
     private String mBaseDN = null;
     private ISubsystem mOwner = null;
 
-    private Hashtable[] mRepos = null;
+    private Hashtable<String, String>[] mRepos = null;
 
     private BigInteger mNextSerialConfig = null;
     private boolean mEnableSerialMgmt = false;
@@ -247,7 +247,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return min serial number
      */
     public String getMinSerialConfig(int repo) {
-        return (String) (mRepos[repo]).get(PROP_MIN);
+        return mRepos[repo].get(PROP_MIN);
     }
 
     /**
@@ -257,7 +257,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return max serial number
      */
     public String getMaxSerialConfig(int repo) {
-        return (String) (mRepos[repo]).get(PROP_MAX);
+        return mRepos[repo].get(PROP_MAX);
     }
 
     /**
@@ -267,7 +267,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return min serial number in next range
      */
     public String getNextMinSerialConfig(int repo) {
-        String ret = (String) (mRepos[repo]).get(PROP_NEXT_MIN);
+        String ret = mRepos[repo].get(PROP_NEXT_MIN);
         if (ret.equals("-1")) {
             return null;
         } else {
@@ -282,7 +282,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return max serial number in next range
      */
     public String getNextMaxSerialConfig(int repo) {
-        String ret = (String) (mRepos[repo]).get(PROP_NEXT_MAX);
+        String ret = mRepos[repo].get(PROP_NEXT_MAX);
         if (ret.equals("-1")) {
             return null;
         } else {
@@ -297,7 +297,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return low water mark
      */
     public String getLowWaterMarkConfig(int repo) {
-        return (String) (mRepos[repo]).get(PROP_LOW_WATER_MARK);
+        return mRepos[repo].get(PROP_LOW_WATER_MARK);
     }
 
     /**
@@ -307,7 +307,7 @@ public class DBSubsystem implements IDBSubsystem {
      * @return range increment
      */
     public String getIncrementConfig(int repo) {
-        return (String) (mRepos[repo]).get(PROP_INCREMENT);
+        return mRepos[repo].get(PROP_INCREMENT);
     }
 
     /**
@@ -319,7 +319,7 @@ public class DBSubsystem implements IDBSubsystem {
      */
     public void setMaxSerialConfig(int repo, String serial)
             throws EBaseException {
-        Hashtable h = mRepos[repo];
+        Hashtable<String, String> h = mRepos[repo];
         CMS.debug("DBSubsystem: Setting max serial number for " + h.get(NAME) + ": " + serial);
 
         //persist to file
@@ -340,7 +340,7 @@ public class DBSubsystem implements IDBSubsystem {
      */
     public void setMinSerialConfig(int repo, String serial)
             throws EBaseException {
-        Hashtable h = mRepos[repo];
+        Hashtable<String, String> h = mRepos[repo];
         CMS.debug("DBSubsystem: Setting min serial number for " + h.get(NAME) + ": " + serial);
 
         //persist to file
@@ -361,7 +361,7 @@ public class DBSubsystem implements IDBSubsystem {
      */
     public void setNextMaxSerialConfig(int repo, String serial)
             throws EBaseException {
-        Hashtable h = mRepos[repo];
+        Hashtable<String, String> h = mRepos[repo];
         if (serial == null) {
             CMS.debug("DBSubsystem: Removing next max " + h.get(NAME) + " number");
             mDBConfig.remove((String) h.get(PROP_NEXT_MAX_NAME));
@@ -372,7 +372,7 @@ public class DBSubsystem implements IDBSubsystem {
         IConfigStore rootStore = getOwner().getConfigStore();
         rootStore.commit(false);
         if (serial == null) {
-            Object o2 = h.remove(PROP_NEXT_MAX);
+            h.remove(PROP_NEXT_MAX);
         } else {
             h.put(PROP_NEXT_MAX, serial);
         }
@@ -388,7 +388,7 @@ public class DBSubsystem implements IDBSubsystem {
      */
     public void setNextMinSerialConfig(int repo, String serial)
             throws EBaseException {
-        Hashtable h = mRepos[repo];
+        Hashtable<String, String> h = mRepos[repo];
         if (serial == null) {
             CMS.debug("DBSubsystem: Removing next min " + h.get(NAME) + " number");
             mDBConfig.remove((String) h.get(PROP_NEXT_MIN_NAME));
@@ -399,7 +399,7 @@ public class DBSubsystem implements IDBSubsystem {
         IConfigStore rootStore = getOwner().getConfigStore();
         rootStore.commit(false);
         if (serial == null) {
-            Object o2 = h.remove(PROP_NEXT_MIN);
+            h.remove(PROP_NEXT_MIN);
         } else {
             h.put(PROP_NEXT_MIN, serial);
         }
@@ -418,7 +418,7 @@ public class DBSubsystem implements IDBSubsystem {
         LDAPConnection conn = null;
         String nextRange = null;
         try {
-            Hashtable h = mRepos[repo];
+            Hashtable<String, String> h = mRepos[repo];
             conn = mLdapConnFactory.getConn();
             String dn = (String) h.get(PROP_BASEDN) + "," + mBaseDN;
             String rangeDN = (String) h.get(PROP_RANGE_DN) + "," + mBaseDN;
@@ -484,7 +484,7 @@ public class DBSubsystem implements IDBSubsystem {
             if (nextRangeStart == null) {
                 return false;
             }
-            Hashtable h = mRepos[repo];
+            Hashtable<String, String> h = mRepos[repo];
             conn = mLdapConnFactory.getConn();
             String rangedn = (String) h.get(PROP_RANGE_DN) + "," + mBaseDN;
             String filter = "(&(nsds5ReplConflict=*)(objectClass=pkiRange)(host= " +
@@ -546,7 +546,7 @@ public class DBSubsystem implements IDBSubsystem {
             mEnableSerialMgmt = mDBConfig.getBoolean(PROP_ENABLE_SERIAL_MGMT, false);
 
             // populate the certs hash entry
-            Hashtable certs = new Hashtable();
+            Hashtable<String, String> certs = new Hashtable<String, String>();
             certs.put(NAME, "certs");
             certs.put(PROP_BASEDN, mDBConfig.getString(PROP_SERIAL_BASEDN, ""));
             certs.put(PROP_RANGE_DN, mDBConfig.getString(PROP_SERIAL_RANGE_DN, ""));
@@ -578,7 +578,7 @@ public class DBSubsystem implements IDBSubsystem {
             mRepos[CERTS] = certs;
 
             // populate the requests hash entry
-            Hashtable requests = new Hashtable();
+            Hashtable<String, String> requests = new Hashtable<String, String>();
             requests.put(NAME, "requests");
             requests.put(PROP_BASEDN, mDBConfig.getString(PROP_REQUEST_BASEDN, ""));
             requests.put(PROP_RANGE_DN, mDBConfig.getString(PROP_REQUEST_RANGE_DN, ""));
@@ -610,7 +610,7 @@ public class DBSubsystem implements IDBSubsystem {
             mRepos[REQUESTS] = requests;
 
             // populate replica ID hash entry
-            Hashtable replicaID = new Hashtable();
+            Hashtable<String, String> replicaID = new Hashtable<String, String>();
             replicaID.put(NAME, "requests");
             replicaID.put(PROP_BASEDN, mDBConfig.getString(PROP_REPLICA_BASEDN, ""));
             replicaID.put(PROP_RANGE_DN, mDBConfig.getString(PROP_REPLICA_RANGE_DN, ""));
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/RepositoryRecord.java b/pki/base/common/src/com/netscape/cmscore/dbs/RepositoryRecord.java
index 0a79b4b906562f7c748e96e9bca8c3c7a78bd2da..8f90723cd7704a121fd3fd5fec3ce167fd5d9a94 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/RepositoryRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/RepositoryRecord.java
@@ -41,7 +41,7 @@ public class RepositoryRecord implements IRepositoryRecord {
     private BigInteger mSerialNo = null;
     private String mPublishingStatus = null;
 
-    protected static Vector mNames = new Vector();
+    protected static Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(IRepositoryRecord.ATTR_SERIALNO);
         mNames.addElement(IRepositoryRecord.ATTR_PUB_STATUS);
@@ -90,11 +90,11 @@ public class RepositoryRecord implements IRepositoryRecord {
     /**
      * Retrieves a list of attribute names.
      */
-    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/StringMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
index 5edc72669bb11dacd40803e50f485a49a83ea5cd..710a1787573b687f81520a768ec0aaf62effc44c 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
@@ -39,7 +39,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class StringMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs string mapper.
@@ -52,7 +52,7 @@ public class StringMapper 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/StringVectorMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/StringVectorMapper.java
index 8fe1b74fac11772cd709f31f108ca312978248b4..7a465231ba9138172624c2369b586c4cda0ac000 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/StringVectorMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/StringVectorMapper.java
@@ -38,7 +38,7 @@ import com.netscape.certsrv.dbs.IDBObj;
 public class StringVectorMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     /**
      * Constructs string vector mapper.
@@ -51,7 +51,7 @@ public class StringVectorMapper implements IDBAttrMapper {
     /**
      * Retrieves a list of supported ldap attributes.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
@@ -61,7 +61,8 @@ public class StringVectorMapper implements IDBAttrMapper {
     public void mapObjectToLDAPAttributeSet(IDBObj parent,
             String name, Object obj, LDAPAttributeSet attrs)
             throws EBaseException {
-        Vector v = (Vector) obj;
+        @SuppressWarnings("unchecked")
+        Vector<String> v = (Vector<String>) obj;
         int s = v.size();
 
         if (s == 0) {
@@ -70,7 +71,7 @@ public class StringVectorMapper implements IDBAttrMapper {
         String m[] = new String[s];
 
         for (int i = 0; i < s; i++) {
-            m[i] = (String) v.elementAt(i);
+            m[i] = v.elementAt(i);
         }
         attrs.add(new LDAPAttribute(mLdapName, m));
     }
@@ -85,11 +86,12 @@ public class StringVectorMapper implements IDBAttrMapper {
 
         if (attr == null)
             return;
-        Enumeration e = attr.getStringValues();
-        Vector v = new Vector();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = attr.getStringValues();
+        Vector<String> v = new Vector<String>();
 
         while (e.hasMoreElements()) {
-            v.addElement((String) e.nextElement());
+            v.addElement(e.nextElement());
         }
         if (v.size() == 0)
             return;
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/X500NameMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/X500NameMapper.java
index 9d4da6e0f57b412c089858c79b2f27f64e8b02e5..0bf3bf7dafb428ed8af1a9df1e7313baa7f4d796 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/X500NameMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/X500NameMapper.java
@@ -43,7 +43,7 @@ import com.netscape.certsrv.logging.ILogger;
 public class X500NameMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     private ILogger mLogger = CMS.getLogger();
 
@@ -58,7 +58,7 @@ public class X500NameMapper implements IDBAttrMapper {
     /**
      * Retrieves a list of ldap attributes.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
index c1935cafc225b33105a59fd4f81e8db13d4131f8..0a1dde49f373b65f86321887fcb5d3d2157488a4 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
@@ -167,10 +167,10 @@ public class LdapSimpleExpression implements ILdapExpression {
         return result;
     }
 
-    private boolean matchVector(Vector value)
+    private boolean matchVector(Vector<Object> value)
             throws ELdapException {
         boolean result = false;
-        Enumeration e = (Enumeration) value.elements();
+        Enumeration<Object> e = (Enumeration<Object>) value.elements();
 
         for (; e.hasMoreElements();) {
             result = matchValue(e.nextElement());
@@ -185,13 +185,14 @@ public class LdapSimpleExpression implements ILdapExpression {
         boolean result = false;
 
         for (int i = 0; i < value.length; i++) {
-            result = matchValue((Object) value[i]);
+            result = matchValue(value[i]);
             if (result)
                 break;
         }
         return result;
     }
 
+    @SuppressWarnings("unchecked")
     private boolean matchValue(Object value)
             throws ELdapException {
         boolean result;
@@ -207,7 +208,7 @@ public class LdapSimpleExpression implements ILdapExpression {
         else if (value instanceof Boolean)
             result = matchBooleanValue((Boolean) value);
         else if (value instanceof Vector)
-            result = matchVector((Vector) value);
+            result = matchVector((Vector<Object>) value);
         else if (value instanceof String[])
             result = matchStringArray((String[]) value);
         else
diff --git a/pki/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java b/pki/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
index acb2c0d6b1b46c58e030562f8128ab312501b886..c844414680157e4cc4144578e810ab105db7cd09 100644
--- a/pki/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
+++ b/pki/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
@@ -127,10 +127,10 @@ public class SimpleExpression implements IExpression {
         return matchValue(givenVal);
     }
 
-    private boolean matchVector(Vector value)
+    private boolean matchVector(Vector<?> value)
             throws EPolicyException {
         boolean result = false;
-        Enumeration e = (Enumeration) value.elements();
+        Enumeration<?> e = (Enumeration<?>) value.elements();
 
         for (; e.hasMoreElements();) {
             result = matchValue(e.nextElement());
@@ -168,7 +168,7 @@ public class SimpleExpression implements IExpression {
         else if (value instanceof Boolean)
             result = matchBooleanValue((Boolean) value);
         else if (value instanceof Vector)
-            result = matchVector((Vector) value);
+            result = matchVector((Vector<?>) value);
         else if (value instanceof String[])
             result = matchStringArray((String[]) value);
         else
diff --git a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
index 82739debf8db57044bd70a8760520f02b2097742..6a5cb1abcd2625e8d0fe8da66f8bdf155912995c 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -928,6 +928,7 @@ class Request
         return (String) value;
     }
 
+    @SuppressWarnings("unchecked")
     public Hashtable<String, String> getExtDataInHashtable(String key) {
         Object value = mExtData.get(key);
         if (value == null) {
diff --git a/pki/base/common/src/com/netscape/cmscore/request/ARequestRecord.java b/pki/base/common/src/com/netscape/cmscore/request/ARequestRecord.java
index 002ffd7b37b962c3fb77540146aebe15c69f13bc..e23d4007cbd573bfbb451a2890897f6c4ebadb69 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestRecord.java
@@ -38,5 +38,5 @@ class ARequestRecord {
     String mSourceId;
     String mOwner;
     String mRequestType;
-    Hashtable mExtData;
+    Hashtable<String, Object> mExtData;
 };
diff --git a/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java b/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java
index b1b4fb04ff3687e685ee667d048a6d823327f0bd..e78ff0daf3f8d11affd97576ee32b62b1a04c1ed 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java
@@ -20,6 +20,7 @@ package com.netscape.cmscore.request;
 import java.math.BigInteger;
 import java.util.Date;
 import java.util.Enumeration;
+import java.util.Hashtable;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
@@ -329,7 +330,6 @@ public class RequestQueue
 
         // Need only the requestid in the result of the search
         // TODO: generic search returning RequestId
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
         String filter = "(" + IRequestRecord.ATTR_SOURCE_ID + "=" + id + ")";
 
         try {
@@ -357,7 +357,6 @@ public class RequestQueue
     protected Enumeration getRawList() {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
 
         try {
             dbs = mDB.createSession();
@@ -385,7 +384,6 @@ public class RequestQueue
     public IRequestList listRequestsByFilter(String f) {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
 
         try {
             dbs = mDB.createSession();
@@ -413,7 +411,6 @@ public class RequestQueue
     public IRequestList listRequestsByFilter(String f, int maxSize) {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
 
         try {
             dbs = mDB.createSession();
@@ -441,7 +438,6 @@ public class RequestQueue
     public IRequestList listRequestsByFilter(String f, int maxSize, int timeLimit) {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
 
         try {
             dbs = mDB.createSession();
@@ -467,7 +463,6 @@ public class RequestQueue
     public IRequestList listRequestsByStatus(RequestStatus s) {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
-        String attrs[] = { IRequestRecord.ATTR_REQUEST_ID };
 
         try {
             String f1;
@@ -588,12 +583,12 @@ public class RequestQueue
     /*
      * list record attributes (debugging output)
      */
-    static void listRecordAttrs(String s, java.util.Hashtable h) {
+    static void listRecordAttrs(String s, Hashtable<String, Object> h) {
         System.err.println(s);
-        java.util.Enumeration e = h.keys();
+        Enumeration<String> e = h.keys();
 
         while (e.hasMoreElements()) {
-            String name = (String) e.nextElement();
+            String name = e.nextElement();
 
             System.err.println("Attr: " + name + " Value: " + h.get(name));
         }
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 4c25d68136764ae6c88ba7a74b8e53ca31d9d49b..1d066f0ada3243d5746d83a4b63a0871f56e28eb 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
@@ -69,7 +69,7 @@ public class RequestRecord
         return mRequestId;
     }
 
-    public Enumeration getAttrNames() {
+    public Enumeration<String> getAttrNames() {
         return mAttrTable.keys();
     }
 
@@ -92,7 +92,7 @@ public class RequestRecord
         else if (name.equals(IRequestRecord.ATTR_EXT_DATA))
             return mExtData;
         else {
-            RequestAttr ra = (RequestAttr) mAttrTable.get(name);
+            RequestAttr ra = mAttrTable.get(name);
 
             if (ra != null)
                 return ra.get(this);
@@ -119,9 +119,9 @@ public class RequestRecord
         else if (name.equals(IRequestRecord.ATTR_REQUEST_OWNER))
             mOwner = (String) o;
         else if (name.equals(IRequestRecord.ATTR_EXT_DATA))
-            mExtData = (Hashtable) o;
+            mExtData = (Hashtable<String, Object>) o;
         else {
-            RequestAttr ra = (RequestAttr) mAttrTable.get(name);
+            RequestAttr ra = mAttrTable.get(name);
 
             if (ra != null)
                 ra.set(this, o);
@@ -135,12 +135,12 @@ public class RequestRecord
     }
 
     // IDBObj.getElements
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mAttrs.elements();
     }
 
     // IDBObj.getSerializableAttrNames
-    public Enumeration getSerializableAttrNames() {
+    public Enumeration<String> getSerializableAttrNames() {
         return mAttrs.elements();
     }
 
@@ -226,12 +226,12 @@ public class RequestRecord
     protected static final String mOC[] =
         { Schema.LDAP_OC_TOP, Schema.LDAP_OC_REQUEST, Schema.LDAP_OC_EXTENSIBLE };
 
-    protected static Hashtable loadExtDataFromRequest(IRequest r) throws EBaseException {
-        Hashtable h = new Hashtable();
+    protected static Hashtable<String, Object> loadExtDataFromRequest(IRequest r) throws EBaseException {
+        Hashtable<String, Object> h = new Hashtable<String, Object>();
 
-        Enumeration e = r.getExtDataKeys();
+        Enumeration<String> e = r.getExtDataKeys();
         while (e.hasMoreElements()) {
-            String key = (String) e.nextElement();
+            String key = e.nextElement();
             if (r.isSimpleExtDataValue(key)) {
                 h.put(key, r.getExtDataInString(key));
             } else {
@@ -242,10 +242,11 @@ public class RequestRecord
         return h;
     }
 
+    @SuppressWarnings("unchecked")
     protected void storeExtDataIntoRequest(IRequest r) throws EBaseException {
-        Enumeration e = mExtData.keys();
+        Enumeration<String> e = mExtData.keys();
         while (e.hasMoreElements()) {
-            String key = (String) e.nextElement();
+            String key = e.nextElement();
             Object value = mExtData.get(key);
             if (value instanceof String) {
                 r.setExtData(key, (String) value);
@@ -258,9 +259,9 @@ public class RequestRecord
         }
     }
 
-    protected static Vector mAttrs = new Vector();
+    protected static Vector<String> mAttrs = new Vector<String>();
 
-    static Hashtable mAttrTable = new Hashtable();
+    static Hashtable<String, RequestAttr> mAttrTable = new Hashtable<String, RequestAttr>();
 
     /*
      * This table contains attribute handlers for attributes
@@ -330,7 +331,7 @@ class RequestStateMapper
 
     //
     //
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return mAttrs.elements();
     }
 
@@ -360,7 +361,7 @@ class RequestStateMapper
         return Schema.LDAP_ATTR_REQUEST_STATE + op + value;
     }
 
-    protected final static Vector mAttrs = new Vector();
+    protected final static Vector<String> mAttrs = new Vector<String>();
 
     static {
         mAttrs.add(Schema.LDAP_ATTR_REQUEST_STATE);
@@ -381,7 +382,7 @@ class RequestIdMapper
 
     //
     //
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return mAttrs.elements();
     }
 
@@ -420,7 +421,7 @@ class RequestIdMapper
         return Schema.LDAP_ATTR_REQUEST_ID + op + v;
     }
 
-    protected final static Vector mAttrs = new Vector();
+    protected final static Vector<String> mAttrs = new Vector<String>();
 
     static {
         mAttrs.add(Schema.LDAP_ATTR_REQUEST_ID);
@@ -443,15 +444,16 @@ class RequestAttrsMapper
 
     //
     //
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return mAttrs.elements();
     }
 
     //
     public void mapObjectToLDAPAttributeSet(IDBObj parent,
             String name, Object obj, LDAPAttributeSet attrs) {
-        Hashtable ht = (Hashtable) obj;
-        Enumeration e = ht.keys();
+        @SuppressWarnings("unchecked")
+        Hashtable<String, Object> ht = (Hashtable<String, Object>) obj;
+        Enumeration<String> e = ht.keys();
 
         try {
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -461,7 +463,7 @@ class RequestAttrsMapper
             Object value = null;
 
             while (e.hasMoreElements()) {
-                key = (String) e.nextElement();
+                key = e.nextElement();
                 value = ht.get(key);
                 byte data[] = null;
 
@@ -517,9 +519,9 @@ class RequestAttrsMapper
         return is.readObject();
     }
 
-    private Hashtable decodeHashtable(byte[] data)
+    private Hashtable<String, Object> decodeHashtable(byte[] data)
             throws ObjectStreamException, IOException, ClassNotFoundException {
-        Hashtable ht = new Hashtable();
+        Hashtable<String, Object> ht = new Hashtable<String, Object>();
         ByteArrayInputStream bis = new ByteArrayInputStream(data);
         ObjectInputStream is = new ObjectInputStream(bis);
 
@@ -561,7 +563,7 @@ class RequestAttrsMapper
     public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
             String name, IDBObj parent)
             throws EBaseException {
-        Hashtable ht = null;
+        Hashtable<String, Object> ht = null;
 
         //
         // Data is stored in a (single valued) binary attribute
@@ -574,7 +576,8 @@ class RequestAttrsMapper
             attr = attrs.getAttribute(Schema.LDAP_ATTR_REQUEST_ATTRS);
 
             if (attr != null) {
-                Enumeration values = attr.getByteValues();
+                @SuppressWarnings("unchecked")
+                Enumeration<byte[]> values = attr.getByteValues();
 
                 value = (byte[]) values.nextElement();
 
@@ -596,7 +599,7 @@ class RequestAttrsMapper
         return Schema.LDAP_ATTR_REQUEST_ID + op + value;
     }
 
-    protected final static Vector mAttrs = new Vector();
+    protected final static Vector<String> mAttrs = new Vector<String>();
 
     static {
         mAttrs.add(Schema.LDAP_ATTR_REQUEST_ATTRS);
@@ -774,12 +777,13 @@ class ExtAttrDynMapper implements IDBDynAttrMapper {
     public void mapObjectToLDAPAttributeSet(IDBObj parent, String name,
                                             Object obj, LDAPAttributeSet attrs)
             throws EBaseException {
-        Hashtable ht = (Hashtable) obj;
-        Enumeration e = ht.keys();
+        @SuppressWarnings("unchecked")
+        Hashtable<String, Object> ht = (Hashtable<String, Object>) obj;
+        Enumeration<String> e = ht.keys();
 
         try {
             while (e.hasMoreElements()) {
-                String key = (String) e.nextElement();
+                String key = e.nextElement();
                 Object value = ht.get(key);
                 if (value instanceof String) {
                     String stringValue = (String) value;
@@ -787,11 +791,12 @@ class ExtAttrDynMapper implements IDBDynAttrMapper {
                             extAttrPrefix + encodeKey(key),
                             stringValue));
                 } else if (value instanceof Hashtable) {
-                    Hashtable innerHash = (Hashtable) value;
-                    Enumeration innerHashEnum = innerHash.keys();
+                    @SuppressWarnings("unchecked")
+                    Hashtable<String, String> innerHash = (Hashtable<String, String>) value;
+                    Enumeration<String> innerHashEnum = innerHash.keys();
                     while (innerHashEnum.hasMoreElements()) {
-                        String innerKey = (String) innerHashEnum.nextElement();
-                        String innerValue = (String) innerHash.get(innerKey);
+                        String innerKey = innerHashEnum.nextElement();
+                        String innerValue = innerHash.get(innerKey);
                         attrs.add(new LDAPAttribute(
                                 extAttrPrefix + encodeKey(key) + ";" + encodeKey(innerKey),
                                 innerValue));
@@ -807,15 +812,16 @@ class ExtAttrDynMapper implements IDBDynAttrMapper {
         }
     }
 
+    @SuppressWarnings("unchecked")
     public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs, String name,
                                             IDBObj parent)
             throws EBaseException {
-        Hashtable ht = new Hashtable();
-        Hashtable valueHashtable;
+        Hashtable<String, Object> ht = new Hashtable<String, Object>();
+        Hashtable<String, String> valueHashtable;
 
-        Enumeration attrEnum = attrs.getAttributes();
+        Enumeration<LDAPAttribute> attrEnum = attrs.getAttributes();
         while (attrEnum.hasMoreElements()) {
-            LDAPAttribute attr = (LDAPAttribute) attrEnum.nextElement();
+            LDAPAttribute attr = attrEnum.nextElement();
             String baseName = attr.getBaseName();
             if (baseName.toLowerCase().startsWith(extAttrPrefix)) {
                 String keyName = decodeKey(
@@ -848,9 +854,9 @@ class ExtAttrDynMapper implements IDBDynAttrMapper {
                         Debug.trace(message);
                         throw new EBaseException(message);
                     }
-                    valueHashtable = (Hashtable) value;
+                    valueHashtable = (Hashtable<String, String>) value;
                     if (valueHashtable == null) {
-                        valueHashtable = new Hashtable();
+                        valueHashtable = new Hashtable<String, String>();
                         ht.put(keyName, valueHashtable);
                     }
                     valueHashtable.put(decodeKey(subTypes[0]), values[0]);
diff --git a/pki/base/common/src/com/netscape/cmscore/usrgrp/User.java b/pki/base/common/src/com/netscape/cmscore/usrgrp/User.java
index e48b8fcb4d5bd201ee2da345a2728bb6cf53f05f..89ea3e589754563b9d1686d2cbfd8f7bd556990e 100644
--- a/pki/base/common/src/com/netscape/cmscore/usrgrp/User.java
+++ b/pki/base/common/src/com/netscape/cmscore/usrgrp/User.java
@@ -51,7 +51,7 @@ public class User implements IUser {
     private String mUserType = null;
     private X509Certificate mx509Certs[] = null;
 
-    private static final Vector mNames = new Vector();
+    private static final Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(ATTR_NAME);
         mNames.addElement(ATTR_ID);
@@ -212,7 +212,7 @@ public class User implements IUser {
         throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mNames.elements();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/util/Debug.java b/pki/base/common/src/com/netscape/cmscore/util/Debug.java
index 9d8b33d66946318b2b7e0805e5d7d54c55f089a4..66e316c11d9eefcafcb89765f0d573196251c93e 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/Debug.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/Debug.java
@@ -70,7 +70,7 @@ public class Debug
     private static int mDebugLevel = VERBOSE;
 
     private static PrintStream mOut = null;
-    private static Hashtable mHK = null;
+    private static Hashtable<String, String> mHK = null;
 
     static {
         if (TRACE_ON == true) {
@@ -348,7 +348,7 @@ public class Debug
                 if (hashkeytypes != null) {
                     StringTokenizer st = new StringTokenizer(hashkeytypes,
                             ",", false);
-                    mHK = new Hashtable();
+                    mHK = new Hashtable<String, String>();
                     while (st.hasMoreElements()) {
                         String hkr = st.nextToken();
                         mHK.put(hkr, "true");
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java b/pki/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
index d69ac6a5339a6f3e7416e9d8c78334ab62106012..a66326d0349e965382e24211ba6b77173ada9a79 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestQueueTest.java
@@ -44,7 +44,7 @@ public class RequestQueueTest extends CMSBaseTestCase {
         String[] keys = new String[] { "key1", "key2" };
         boolean getExtDataKeysCalled = false;
 
-        public Enumeration getExtDataKeys() {
+        public Enumeration<String> getExtDataKeys() {
             getExtDataKeysCalled = true;
             return Collections.enumeration(Arrays.asList(keys));
         }
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java b/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
index 457f91d9bd730c073c8ede6a4edef9c083396f40..06a4725716cdc35cc6bde14418e796fb0395f30e 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
@@ -40,7 +40,7 @@ public class RequestRecordTest extends CMSBaseTestCase {
     }
 
     public void testGetExtData() {
-        Hashtable hash = new Hashtable();
+        Hashtable<String, Object> hash = new Hashtable<String, Object>();
 
         assertNotSame(hash, requestRecord.get(IRequestRecord.ATTR_EXT_DATA));
         requestRecord.mExtData = hash;
@@ -48,7 +48,7 @@ public class RequestRecordTest extends CMSBaseTestCase {
     }
 
     public void testSetExtData() {
-        Hashtable hash = new Hashtable();
+        Hashtable<String, Object> hash = new Hashtable<String, Object>();
 
         assertNotSame(requestRecord.mExtData, hash);
         requestRecord.set(IRequestRecord.ATTR_EXT_DATA, hash);
diff --git a/pki/base/common/test/com/netscape/cmscore/test/TestHelper.java b/pki/base/common/test/com/netscape/cmscore/test/TestHelper.java
index cc19d8abaeac0d66ac5b9584bfd015d5d8024483..55d2ac7f7a6722556a741733cd9541358f7359ba 100644
--- a/pki/base/common/test/com/netscape/cmscore/test/TestHelper.java
+++ b/pki/base/common/test/com/netscape/cmscore/test/TestHelper.java
@@ -7,7 +7,7 @@ import java.util.Enumeration;
  */
 public class TestHelper {
 
-    public static boolean enumerationContains(Enumeration enumeration,
+    public static boolean enumerationContains(Enumeration<?> enumeration,
                                               Object element) {
         while (enumeration.hasMoreElements()) {
             if (enumeration.nextElement().equals(element)) {
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java b/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java
index d695dcfa7e3bc4eb39c4c7ac9a482bf529f97d91..fc3d13b42a947ee2d41587590dff801338ed21b0 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java
@@ -52,15 +52,17 @@ public class TokenInfo {
             CryptoManager.initialize(vals);
 
             CryptoManager cm = CryptoManager.getInstance();
-            Enumeration modules = cm.getModules();
+            @SuppressWarnings("unchecked")
+            Enumeration<PK11Module> modules = cm.getModules();
             while (modules.hasMoreElements()) {
-                PK11Module m = (PK11Module) modules.nextElement();
+                PK11Module m = modules.nextElement();
                 System.out.println("Found external module '" + m.getName() + "'");
             }
-            Enumeration tokens = cm.getExternalTokens();
+            @SuppressWarnings("unchecked")
+            Enumeration<CryptoToken> tokens = cm.getExternalTokens();
 
             while (tokens.hasMoreElements()) {
-                CryptoToken t = (CryptoToken) tokens.nextElement();
+                CryptoToken t = tokens.nextElement();
                 System.out.println("Found external token '" + t.getName() + "'");
             }
 
diff --git a/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java b/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java
index 87559163c9fdec4c152d448bfac9bd7de614bdec..3c61c293bef26484d40596171f0b293467e1ec2c 100644
--- a/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java
+++ b/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java
@@ -517,8 +517,8 @@ public class StorageKeyUnit extends EncryptionUnit implements
     /**
      * Returns a list of recovery agent identifiers.
      */
-    public Enumeration getAgentIdentifiers() {
-        Vector v = new Vector();
+    public Enumeration<String> getAgentIdentifiers() {
+        Vector<String> v = new Vector<String>();
 
         for (int i = 0;; i++) {
             try {
@@ -884,7 +884,7 @@ public class StorageKeyUnit extends EncryptionUnit implements
             throws EBaseException {
         // sort the credential according to the order in
         // configuration file
-        Hashtable v = new Hashtable();
+        Hashtable<String, byte[]> v = new Hashtable<String, byte[]>();
 
         for (int i = 0;; i++) {
             String uid = null;
@@ -938,10 +938,10 @@ public class StorageKeyUnit extends EncryptionUnit implements
             CMS.debug("Failed to initialize JoinShares");
             throw new EBaseException(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
         }
-        Enumeration e = v.keys();
+        Enumeration<String> e = v.keys();
 
         while (e.hasMoreElements()) {
-            String next = (String) e.nextElement();
+            String next = e.nextElement();
 
             j.addShare(Integer.parseInt(next) + 1,
                     (byte[]) v.get(next));
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
index c962e1c6eaa3a976cc2c263ef4791e3c9ed7e3b0..91a45ca3bce9fdedd62c803287a5bf5cd5c70b58 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
@@ -47,7 +47,7 @@ public class PlainPasswordFile implements IPasswordStore {
     }
 
     // return an array of String-based tag
-    public Enumeration getTags() {
+    public Enumeration<?> getTags() {
         return mPwdStore.propertyNames();
     }
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
index 4065fd72c109bbb00622d3e78494c7779e57e8d0..10f33350c615feda77520337fa51e19866c5075b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
@@ -46,7 +46,7 @@ public class PlainPasswordReader implements IPasswordReader {
     }
 
     // return an array of String-based tag
-    public Enumeration getTags() {
+    public Enumeration<?> getTags() {
         return mPwdStore.propertyNames();
     }
 }
diff --git a/pki/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java b/pki/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java
index a56839ac189648e9092e8592bd4ee3874920caaf..3e04792bf8b58fb23ba1381d6ef113ec51a557bd 100644
--- a/pki/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java
+++ b/pki/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java
@@ -49,7 +49,7 @@ import netscape.security.x509.AlgIdDSA;
 public class DSAKeyPairGenerator extends KeyPairGenerator
         implements java.security.interfaces.DSAKeyPairGenerator {
 
-    private static Hashtable precomputedParams;
+    private static Hashtable<Integer, AlgIdDSA> precomputedParams;
 
     static {
 
@@ -63,7 +63,7 @@ public class DSAKeyPairGenerator extends KeyPairGenerator
            hash.  
            */
 
-        precomputedParams = new Hashtable();
+        precomputedParams = new Hashtable<Integer, AlgIdDSA>();
 
         /*
          * L = 512
@@ -182,7 +182,7 @@ public class DSAKeyPairGenerator extends KeyPairGenerator
         /* Find the precomputed parameters, if any */
         if (!generateNewParameters) {
             Integer mod = Integer.valueOf(this.modlen);
-            params = (DSAParams) precomputedParams.get(mod);
+            params = precomputedParams.get(mod);
         }
         if (params != null) {
             setParams(params);
-- 
1.7.7.4

