From b12fa84b08f566fdc804d6e70e0e9ccefdda7614 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Mon, 6 Feb 2012 15:44:34 -0600
Subject: [PATCH] Added generics (part 4).

This patch brings down the warnings from 3500 to 2981.

Ticket #2
---
 pki/base/ca/src/com/netscape/ca/CAService.java     |   20 ++++----
 .../ca/src/com/netscape/ca/CMSCRLExtensions.java   |    6 +-
 .../ca/src/com/netscape/ca/CRLIssuingPoint.java    |    3 +-
 .../src/com/netscape/ca/CertificateAuthority.java  |   17 +++---
 .../src/com/netscape/certsrv/acls/ACLEntry.java    |    2 +-
 .../certsrv/base/IConfigStoreEventListener.java    |    4 +-
 .../certsrv/dbs/certdb/ICertificateRepository.java |   17 +++---
 .../netscape/certsrv/dbs/crldb/ICRLRepository.java |   16 ++++--
 .../netscape/certsrv/dbs/keydb/IKeyRepository.java |    4 +-
 .../src/com/netscape/certsrv/ocsp/IDefStore.java   |    4 +-
 .../netscape/certsrv/publish/IPublishRuleSet.java  |    2 +-
 .../com/netscape/certsrv/request/IRequestList.java |    2 +-
 .../netscape/certsrv/security/IStorageKeyUnit.java |    2 +-
 .../com/netscape/cms/authentication/CMCAuth.java   |    3 +-
 .../cms/authentication/HashAuthentication.java     |   12 ++--
 .../netscape/cms/jobs/RenewalNotificationJob.java  |    1 -
 .../netscape/cms/listeners/PinRemovalListener.java |    5 --
 .../netscape/cms/listeners/RequestInQListener.java |    2 +-
 .../common/src/com/netscape/cms/ocsp/DefStore.java |   57 ++++++++++---------
 .../src/com/netscape/cms/ocsp/LDAPStore.java       |   21 ++++----
 .../cms/profile/common/ProfileContext.java         |    4 +-
 .../cms/profile/common/RAEnrollProfile.java        |    4 +-
 .../cms/profile/input/SubjectNameInput.java        |    4 +-
 .../com/netscape/cms/publish/publishers/Utils.java |    2 +-
 .../cms/servlet/admin/CMSAdminServlet.java         |    1 -
 .../cms/servlet/admin/JobsAdminServlet.java        |    2 +-
 .../cms/servlet/base/DisplayHtmlServlet.java       |    3 +-
 .../com/netscape/cms/servlet/base/GetStats.java    |    3 -
 .../netscape/cms/servlet/base/ProxyServlet.java    |   41 +++++++-------
 .../cms/servlet/cert/DisplayHashUserEnroll.java    |    3 -
 .../netscape/cms/servlet/cert/GetEnableStatus.java |    3 -
 .../netscape/cms/servlet/cert/ReasonToRevoke.java  |    4 +-
 .../cms/servlet/cert/RemoteAuthConfig.java         |    4 +-
 .../com/netscape/cms/servlet/cert/SrchCerts.java   |    1 -
 .../netscape/cms/servlet/common/CMSTemplate.java   |    2 -
 .../cms/servlet/csadmin/CheckIdentity.java         |    6 +--
 .../netscape/cms/servlet/csadmin/GetTokenInfo.java |    5 --
 .../cms/servlet/key/ConfirmRecoverBySerial.java    |    3 +-
 .../netscape/cms/servlet/key/ExamineRecovery.java  |    2 +-
 .../src/com/netscape/cms/servlet/key/GetPk12.java  |    3 +-
 .../netscape/cms/servlet/key/GrantRecovery.java    |    2 +-
 .../netscape/cms/servlet/key/KeyRecordParser.java  |    1 -
 .../netscape/cms/servlet/key/RecoverBySerial.java  |   10 ++--
 .../src/com/netscape/cms/servlet/key/SrchKey.java  |    5 +-
 .../cms/servlet/key/SrchKeyForRecovery.java        |    5 +-
 .../com/netscape/cms/servlet/ocsp/GetOCSPInfo.java |    3 -
 .../netscape/cms/servlet/ocsp/ListCAServlet.java   |    4 +-
 .../cms/servlet/processors/CMCProcessor.java       |    2 +-
 .../cms/servlet/processors/CRMFProcessor.java      |    1 -
 .../servlet/profile/ProfileSubmitCMCServlet.java   |    3 -
 .../cms/servlet/profile/ProfileSubmitServlet.java  |    3 +-
 .../src/com/netscape/cms/shares/OldJoinShares.java |   18 +++---
 .../src/com/netscape/cms/shares/OldShare.java      |   11 ++--
 .../ChallengePhraseAuthentication.java             |    3 -
 .../com/netscape/cmscore/base/PropConfigStore.java |   14 ++---
 .../com/netscape/cmscore/cert/CertDateCompare.java |    8 ++--
 .../src/com/netscape/cmscore/cert/CertUtils.java   |    1 -
 .../netscape/cmscore/cert/X500NameSubsystem.java   |    4 +-
 .../netscape/cmscore/connector/LocalConnector.java |    4 +-
 .../cmscore/dbs/CRLIssuingPointRecord.java         |   47 ++++++++++-------
 .../com/netscape/cmscore/dbs/CRLRepository.java    |   19 ++++---
 .../cmscore/dbs/CertificateRepository.java         |   24 ++++-----
 .../com/netscape/cmscore/dbs/KeyRecordList.java    |    8 ++--
 .../com/netscape/cmscore/dbs/KeyRepository.java    |   27 ++++++----
 .../netscape/cmscore/dbs/LdapFilterConverter.java  |    4 +-
 .../com/netscape/cmscore/dbs/PublicKeyMapper.java  |    6 +-
 .../netscape/cmscore/dbs/X509CertImplMapper.java   |    2 -
 .../netscape/cmscore/ldap/LdapPublishModule.java   |   11 +---
 .../netscape/cmscore/ldap/LdapRequestListener.java |    4 +-
 .../netscape/cmscore/ldapconn/LdapAuthInfo.java    |    4 +-
 .../netscape/cmscore/listeners/ListenerPlugin.java |    2 +-
 .../src/com/netscape/cmscore/logging/Logger.java   |    7 +--
 .../netscape/cmscore/request/ARequestQueue.java    |    1 -
 .../com/netscape/cmscore/request/RequestQueue.java |   10 ++--
 .../cmscore/request/RequestRepository.java         |    8 ++--
 .../netscape/cmscore/security/JssSubsystem.java    |    1 -
 .../com/netscape/cmscore/security/PWsdrCache.java  |   10 +---
 .../cmscore/selftests/SelfTestSubsystem.java       |    6 +-
 .../com/netscape/cmscore/util/StatsSubsystem.java  |   12 ++--
 .../netscape/cmscore/dbs/CertRecordListTest.java   |    7 ++-
 .../cmscore/dbs/DBSSessionDefaultStub.java         |    6 +-
 .../cmscore/dbs/DBVirtualListDefaultStub.java      |    6 +-
 .../src/com/netscape/cmstools/CMCResponse.java     |    2 -
 .../src/com/netscape/cmstools/PasswordCache.java   |    1 -
 .../src/com/netscape/cmstools/TestCRLSigning.java  |    5 +-
 .../src/com/netscape/kra/EnrollmentService.java    |    4 +-
 pki/base/kra/src/com/netscape/kra/KRAService.java  |    5 +-
 .../kra/src/com/netscape/kra/RecoveryService.java  |   12 ++--
 .../com/netscape/kra/TokenKeyRecoveryService.java  |    4 +-
 .../ocsp/src/com/netscape/ocsp/OCSPAuthority.java  |    7 +--
 .../src/com/netscape/pkisilent/ConfigureDRM.java   |   32 +----------
 .../src/com/netscape/pkisilent/ConfigureOCSP.java  |   30 +----------
 .../src/com/netscape/pkisilent/ConfigureRA.java    |   25 +--------
 .../com/netscape/pkisilent/common/ComCrypto.java   |    4 +-
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |    1 -
 .../netscape/cmsutil/http/JssSSLSocketFactory.java |    2 +-
 .../netscape/cmsutil/password/IPasswordReader.java |    2 +-
 .../netscape/cmsutil/password/IPasswordStore.java  |    2 +-
 .../cmsutil/password/PlainPasswordFile.java        |   10 +++-
 .../cmsutil/password/PlainPasswordReader.java      |   10 +++-
 .../util/src/com/netscape/cmsutil/util/Utils.java  |    2 +-
 .../util/src/netscape/security/pkcs/PKCS7.java     |    3 -
 .../util/src/netscape/security/pkcs/PKCS8Key.java  |    2 +-
 .../netscape/security/pkcs/PKCS9Attributes.java    |   13 ++---
 .../util/src/netscape/security/provider/CMS.java   |    2 +-
 .../netscape/security/provider/DSAKeyFactory.java  |   19 ++++---
 .../netscape/security/provider/DSAParameters.java  |    7 ++-
 .../netscape/security/util/ASN1CharStrConvMap.java |    1 -
 .../netscape/security/util/ByteArrayLexOrder.java  |    7 +--
 .../netscape/security/util/ByteArrayTagOrder.java  |    7 +--
 .../netscape/security/util/DerOutputStream.java    |    2 +-
 .../netscape/security/util/ObjectIdentifier.java   |    5 +-
 .../security/x509/FreshestCRLExtension.java        |    1 -
 .../security/x509/LdapV3DNStrConverter.java        |    4 +-
 pki/base/util/src/netscape/security/x509/RDN.java  |    1 -
 .../util/src/netscape/security/x509/X509Cert.java  |    1 -
 116 files changed, 373 insertions(+), 496 deletions(-)

diff --git a/pki/base/ca/src/com/netscape/ca/CAService.java b/pki/base/ca/src/com/netscape/ca/CAService.java
index d086ee551ae25b9f893c63d2160471e6ecf2e51e..d8faa8b348c052099639344819c4d96455a95fed 100644
--- a/pki/base/ca/src/com/netscape/ca/CAService.java
+++ b/pki/base/ca/src/com/netscape/ca/CAService.java
@@ -410,7 +410,7 @@ public class CAService implements ICAService, IService {
         }
 
         String type = request.getRequestType();
-        IServant servant = (IServant) mServants.get(type);
+        IServant servant = mServants.get(type);
 
         if (servant == null) {
             mCA.log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_INVALID_REQUEST_TYPE", type));
@@ -923,7 +923,7 @@ public class CAService implements ICAService, IService {
                         Enumeration<String> n = oldMeta.getElements();
 
                         while (n.hasMoreElements()) {
-                            String name = (String) n.nextElement();
+                            String name = n.nextElement();
 
                             System.out.println("name " + name + " value " +
                                     oldMeta.get(name));
@@ -950,7 +950,7 @@ public class CAService implements ICAService, IService {
                     Enumeration<String> n = oldMeta.getElements();
 
                     while (n.hasMoreElements()) {
-                        String name = (String) n.nextElement();
+                        String name = n.nextElement();
 
                     }
                 }
@@ -1105,7 +1105,7 @@ public class CAService implements ICAService, IService {
                 Enumeration<ICRLIssuingPoint> eIPs = mCRLIssuingPoints.elements();
 
                 while (eIPs.hasMoreElements()) {
-                    ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
+                    ICRLIssuingPoint ip = eIPs.nextElement();
 
                     if (ip != null) {
                         boolean b = true;
@@ -1434,7 +1434,7 @@ class serviceRenewal implements IServant {
 
                     if (renewed != null) {
                         BigInteger serial = new BigInteger(renewed);
-                        X509CertImpl cert = (X509CertImpl)
+                        X509CertImpl cert =
                                 mCA.getCertificateRepository().getX509Certificate(serial);
 
                         if (cert == null) {
@@ -1898,7 +1898,7 @@ class serviceGetCRL implements IServant {
             throws EBaseException {
         try {
             ICRLIssuingPointRecord crlRec =
-                    (ICRLIssuingPointRecord) mCA.getCRLRepository().readCRLIssuingPointRecord(
+                    mCA.getCRLRepository().readCRLIssuingPointRecord(
                             ICertificateAuthority.PROP_MASTER_CRL);
             X509CRLImpl crl = new X509CRLImpl(crlRec.getCRL());
 
@@ -1936,7 +1936,7 @@ class serviceGetRevocationInfo implements IServant {
         Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
-            String name = (String) enum1.nextElement();
+            String name = enum1.nextElement();
 
             if (name.equals(IRequest.ISSUED_CERTS)) {
                 X509CertImpl certsToCheck[] =
@@ -1976,7 +1976,7 @@ class serviceGetCertificates implements IServant {
         Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
-            String name = (String) enum1.nextElement();
+            String name = enum1.nextElement();
 
             if (name.equals(IRequest.CERT_FILTER)) {
                 String filter = request.getExtDataInString(IRequest.CERT_FILTER);
@@ -2046,7 +2046,7 @@ class serviceCert4Crl implements IServant {
                 Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
-                    ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
+                    ICRLIssuingPoint ip = eIPs.nextElement();
                     // form RevokedCertImpl
                     RevokedCertImpl rci =
                             new RevokedCertImpl(revokedCertRecs[i].getSerialNumber(),
@@ -2108,7 +2108,7 @@ class serviceUnCert4Crl implements IServant {
                 Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
-                    ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
+                    ICRLIssuingPoint ip = eIPs.nextElement();
 
                     if (ip != null) {
                         ip.addUnrevokedCert(oldSerialNo[i]);
diff --git a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
index 0d98b96319539c896f5b7d7f88950baef4c96a1d..8c59d42d80c4c38633ba0e8d246410b2c7fbfb3d 100644
--- a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
+++ b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
@@ -200,7 +200,7 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
         IConfigStore mFileConfig =
                 SubsystemRegistry.getInstance().get("MAIN").getConfigStore();
 
-        IConfigStore crlExtConfig = (IConfigStore) mFileConfig;
+        IConfigStore crlExtConfig = mFileConfig;
         StringTokenizer st = new StringTokenizer(mCRLExtConfig.getName(), ".");
 
         while (st.hasMoreTokens()) {
@@ -471,11 +471,11 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
                     if (cmsCRLExt != null) {
                         if (ext != null) {
                             if (isCRLExtensionCritical(extName) ^ ext.isCritical()) {
-                                ext = (Extension) cmsCRLExt.setCRLExtensionCriticality(
+                                ext = cmsCRLExt.setCRLExtensionCriticality(
                                             ext, isCRLExtensionCritical(extName));
                             }
                         } else {
-                            ext = (Extension) cmsCRLExt.getCRLExtension(mCRLExtConfig.getSubStore(extName),
+                            ext = cmsCRLExt.getCRLExtension(mCRLExtConfig.getSubStore(extName),
                                         mCRLIssuingPoint,
                                         isCRLExtensionCritical(extName));
                         }
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index 46ddb544d08c1fc52cd597e88a63128e026e169e..1c89a29c8694847ee03ecb1f2964ad11578f04ff 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -635,7 +635,6 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
         Vector<String> listedProfiles = new Vector<String>();
 
         StringTokenizer elements = new StringTokenizer(list, ",", true);
-        int t0 = -1;
         int n = 0;
         while (elements.hasMoreTokens()) {
             String element = elements.nextToken().trim();
@@ -3151,7 +3150,7 @@ class CertRecProcessor implements IElementProcessor {
             boolean includeCert = checkRevokedCertExtensions(crlExts);
 
             if (includeCert == true) {
-                mCRLCerts.put(serialNumber, (RevokedCertificate) newRevokedCert);
+                mCRLCerts.put(serialNumber, newRevokedCert);
                 if (serialNumber != null) {
                     CMS.debug("Putting certificate serial: 0x" + serialNumber.toString(16) + " into CRL hashtable");
                 }
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index dab9c069db82eeb324e1fc6646faeed35b6f8dc1..df7de2c5eb6a9d2482c8e589b1ba967d9f48b651 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -93,7 +93,6 @@ import com.netscape.cmscore.dbs.CertRecord;
 import com.netscape.cmscore.dbs.CertificateRepository;
 import com.netscape.cmscore.dbs.DBSubsystem;
 import com.netscape.cmscore.dbs.ReplicaIDRepository;
-import com.netscape.cmscore.dbs.Repository;
 import com.netscape.cmscore.ldap.PublisherProcessor;
 import com.netscape.cmscore.listeners.ListenerPlugin;
 import com.netscape.cmscore.request.RequestSubsystem;
@@ -590,7 +589,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     public String getStartSerial() {
         try {
             BigInteger serial =
-                    ((Repository) mCertRepot).getTheSerialNumber();
+                    mCertRepot.getTheSerialNumber();
 
             if (serial == null)
                 return "";
@@ -603,11 +602,11 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     }
 
     public void setStartSerial(String serial) throws EBaseException {
-        ((Repository) mCertRepot).setTheSerialNumber(new BigInteger(serial));
+        mCertRepot.setTheSerialNumber(new BigInteger(serial));
     }
 
     public String getMaxSerial() {
-        String serial = ((Repository) mCertRepot).getMaxSerial();
+        String serial = mCertRepot.getMaxSerial();
 
         if (serial != null)
             return serial;
@@ -616,7 +615,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
     }
 
     public void setMaxSerial(String serial) throws EBaseException {
-        ((Repository) mCertRepot).setMaxSerial(serial);
+        mCertRepot.setMaxSerial(serial);
     }
 
     /**
@@ -658,7 +657,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
      * @return CRL issuing point
      */
     public ICRLIssuingPoint getCRLIssuingPoint(String id) {
-        return (CRLIssuingPoint) mCRLIssuePoints.get(id);
+        return mCRLIssuePoints.get(id);
     }
 
     /**
@@ -1491,7 +1490,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                 Enumeration<String> names = implc.getSubStoreNames();
 
                 while (names.hasMoreElements()) {
-                    String id = (String) names.nextElement();
+                    String id = names.nextElement();
 
                     if (Debug.ON)
                         Debug.trace("registering listener impl: " + id);
@@ -1698,7 +1697,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
         // a Master/full crl must exist.
 
         while (issuePointIdEnum.hasMoreElements()) {
-            String issuePointId = (String) issuePointIdEnum.nextElement();
+            String issuePointId = issuePointIdEnum.nextElement();
 
             CMS.debug(
                     "initializing crl issue point " + issuePointId);
@@ -1923,7 +1922,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
 
             DerOutputStream tmpChain = new DerOutputStream();
             DerOutputStream tmp1 = new DerOutputStream();
-            DerOutputStream outChain = new DerOutputStream();
+            //DerOutputStream outChain = new DerOutputStream();
             java.security.cert.X509Certificate chains[] =
                     mOCSPCertChain.getChain();
 
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
index 448b851e77316fbed5adc6d2ac416408dd37c117..2c1b7c3eadd929418ddbe66222b8ef7ffdfda97b 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
@@ -233,7 +233,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
         Enumeration<String> e = permissions();
 
         for (; e.hasMoreElements();) {
-            String p = (String) e.nextElement();
+            String p = e.nextElement();
 
             entry += p;
             if (e.hasMoreElements())
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
index 376b4e91a946b1cc9bf8153ede11d02bff199b15..06e7d522af0d4c6027c453cb68aab71faa8076a2 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
@@ -34,7 +34,7 @@ public interface IConfigStoreEventListener {
      * @exception EBaseException failed to validate
      */
     public void validateConfigParams(String action,
-            Hashtable params) throws EBaseException;
+            Hashtable<String, String> params) throws EBaseException;
 
     /**
      * Validates the config store parameters that changed
@@ -44,5 +44,5 @@ public interface IConfigStoreEventListener {
      * @exception EBaseException failed to validate
      */
     public void doConfigParams(String action,
-            Hashtable params) throws EBaseException;
+            Hashtable<String, String> params) throws EBaseException;
 }
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
index 60f8673682d800e4808790e3c7130d1fa7fabf7b..2e9e00f60e290b24c378a253bf0b293afaaf5f4a 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
@@ -30,6 +30,7 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.MetaInfo;
 import com.netscape.certsrv.dbs.ModificationSet;
 import com.netscape.certsrv.dbs.repository.IRepository;
+import com.netscape.cmscore.dbs.CertificateRepository.RenewableCertificateCollection;
 
 /**
  * An interface represents a CMS certificate repository.
@@ -205,7 +206,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration searchCertificates(String filter, int maxSize)
+    public Enumeration<Object> searchCertificates(String filter, int maxSize)
             throws EBaseException;
 
     /**
@@ -218,7 +219,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration searchCertificates(String filter, int maxSize,
+    public Enumeration<ICertRecord> searchCertificates(String filter, int maxSize,
             int timeLimit) throws EBaseException;
 
     /**
@@ -308,7 +309,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of revoked certificates
      * @exception EBaseException failed to retrieve
      */
-    public Enumeration getRevokedCertificates(Date asOfDate)
+    public Enumeration<ICertRecord> getRevokedCertificates(Date asOfDate)
             throws EBaseException;
 
     /**
@@ -318,7 +319,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of revoked certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration getAllRevokedCertificates()
+    public Enumeration<ICertRecord> getAllRevokedCertificates()
             throws EBaseException;
 
     /**
@@ -327,7 +328,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of revoked certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration getAllRevokedNonExpiredCertificates()
+    public Enumeration<ICertRecord> getAllRevokedNonExpiredCertificates()
             throws EBaseException;
 
     /**
@@ -337,7 +338,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration findCertificates(String filter)
+    public Enumeration<X509CertImpl> findCertificates(String filter)
             throws EBaseException;
 
     /**
@@ -347,7 +348,7 @@ public interface ICertificateRepository extends IRepository {
      * @return a list of certificates
      * @exception EBaseException failed to search
      */
-    public Enumeration findCertRecords(String filter)
+    public Enumeration<ICertRecord> findCertRecords(String filter)
             throws EBaseException;
 
     /**
@@ -414,7 +415,7 @@ public interface ICertificateRepository extends IRepository {
      * @return certificates
      * @exception EBaseException failed to retrieve
      */
-    public Hashtable getRenewableCertificates(String renewalTime)
+    public Hashtable<String, RenewableCertificateCollection> getRenewableCertificates(String renewalTime)
             throws EBaseException;
 
     /**
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 3fb40b26d413502a6b88580646bad4d387f7a93a..806a2cb19ef0dffdd4529de6ec989cb1981c1e48 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
@@ -22,6 +22,8 @@ import java.util.Date;
 import java.util.Hashtable;
 import java.util.Vector;
 
+import netscape.security.x509.RevokedCertificate;
+
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.ModificationSet;
 
@@ -109,7 +111,9 @@ public interface ICRLRepository {
      */
     public void updateCRLIssuingPointRecord(String id, byte[] newCRL,
             Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize,
-            Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts)
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException;
 
     /**
@@ -120,7 +124,7 @@ public interface ICRLRepository {
      * @param unrevokedCerts list of released from hold certificates
      * @exception EBaseException failed to update issuing point record
      */
-    public void updateRevokedCerts(String id, Hashtable revokedCerts, Hashtable unrevokedCerts)
+    public void updateRevokedCerts(String id, Hashtable<BigInteger, RevokedCertificate> revokedCerts, Hashtable<BigInteger, RevokedCertificate> unrevokedCerts)
             throws EBaseException;
 
     /**
@@ -130,7 +134,7 @@ public interface ICRLRepository {
      * @param expiredCerts list of expired certificates
      * @exception EBaseException failed to update issuing point record
      */
-    public void updateExpiredCerts(String id, Hashtable expiredCerts)
+    public void updateExpiredCerts(String id, Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException;
 
     /**
@@ -144,9 +148,9 @@ public interface ICRLRepository {
      * @exception EBaseException failed to update issuing point record
      */
     public void updateCRLCache(String id, Long crlSize,
-            Hashtable revokedCerts,
-            Hashtable unrevokedCerts,
-            Hashtable expiredCerts)
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException;
 
     /**
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
index ca1e2c8aa742a4c3577ed76fbde4e40ddf79f8d5..627844286b31364f3e9cbd0298608081ab7a8ce5 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
@@ -97,7 +97,7 @@ public interface IKeyRepository extends IRepository {
      * @return a list of private key records
      * @exception EBaseException failed to search keys
      */
-    public Enumeration searchKeys(String filter, int maxSize)
+    public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize)
             throws EBaseException;
 
     /**
@@ -109,7 +109,7 @@ public interface IKeyRepository extends IRepository {
      * @return a list of private key records
      * @exception EBaseException failed to search keys
      */
-    public Enumeration searchKeys(String filter, int maxSize, int timeLimt)
+    public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize, int timeLimt)
             throws EBaseException;
 
     /**
diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
index 7123de303ddfff3095e0e129e733c459f4f12517..ee4c76a08d3a00db4fee89f773bdce42be9fb745 100644
--- a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
+++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
@@ -110,7 +110,7 @@ public interface IDefStore extends IOCSPStore {
      * @return Enumeration a list of the CRL issuing points
      * @exception EBaseException occurs when no CRL issuing point exists
      */
-    public Enumeration<Object> searchAllCRLIssuingPointRecord(
+    public Enumeration<ICRLIssuingPointRecord> searchAllCRLIssuingPointRecord(
             int maxSize)
             throws EBaseException;
 
@@ -124,7 +124,7 @@ public interface IDefStore extends IOCSPStore {
      * @return Enumeration a list of the CRL issuing points
      * @exception EBaseException occurs when no CRL issuing point exists
      */
-    public Enumeration searchCRLIssuingPointRecord(String filter,
+    public Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(String filter,
             int maxSize)
             throws EBaseException;
 
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
index c1af492b89521981c71d2dfef583feab24c78c2f..911d4e132cb29acf224bbce982cf29b14fd9fbab 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
@@ -103,7 +103,7 @@ public interface IPublishRuleSet {
      * 
      * @return An enumeration of publishing rules.
      */
-    Enumeration getRules();
+    Enumeration<ILdapRule> getRules();
 
     /**
      * Apply publishing rules on a request.
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
index e207c0014c9a857ff338776a5506aa85be2e467e..5f265941ae81ec207f7d8d54968264f6f81d4879 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
@@ -27,7 +27,7 @@ import java.util.Enumeration;
  * @version $Revision$, $Date$
  */
 public interface IRequestList
-        extends Enumeration {
+        extends Enumeration<RequestId> {
 
     /**
      * Gets the next RequestId from this list. null is
diff --git a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
index 336bf57ad9c4c482513fe662a01efbc736fa8084..5f3b0ec487c1b84ac6d22ffc4eb985516c29cd05 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
@@ -59,7 +59,7 @@ public interface IStorageKeyUnit extends IEncryptionUnit {
      * 
      * @return a list of string-based agent identifiers
      */
-    public Enumeration getAgentIdentifiers();
+    public Enumeration<String> getAgentIdentifiers();
 
     /**
      * Changes agent password.
diff --git a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
index cf57098b651f8964e1ae9dd00bec682b1e23cf41..905efc42a2538738de40227d4c4398f5d3bc64ac 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
@@ -451,7 +451,6 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                                     // }
 
                                     INTEGER temp = revRequest.getSerialNumber();
-                                    int temp2 = temp.intValue();
 
                                     bigIntArray[j] = temp;
                                     authToken.set(TOKEN_CERT_SERIAL, bigIntArray);
@@ -783,7 +782,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
 
             SET dais = cmcFullReq.getDigestAlgorithmIdentifiers();
             int numDig = dais.size();
-            Hashtable digs = new Hashtable();
+            Hashtable<String, byte[]> digs = new Hashtable<String, byte[]>();
 
             //if request key is used for signing, there MUST be only one signerInfo
             //object in the signedData object.
diff --git a/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
index 4aae1f15954f31f7759a36e2b9734d872e7c5fe8..57b86157efa19524c6f279daf299882945ad39b0 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/HashAuthentication.java
@@ -62,19 +62,19 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
     private String mHost;
     private long mLastLogin = 0;
     private MessageDigest mSHADigest = null;
-    private Hashtable mData = null;
+    private Hashtable<String, IAuthToken> mData = null;
     private IConfigStore mConfig;
     private String mName = null;
     private String mImplName = null;
     private ILogger mLogger = CMS.getLogger();
-    private static Vector mExtendedPluginInfo = null;
+    private static Vector<String> mExtendedPluginInfo = null;
     private HashAuthData mHosts = null;
 
     static String[] mConfigParams =
             new String[] {};
 
     static {
-        mExtendedPluginInfo = new Vector();
+        mExtendedPluginInfo = new Vector<String>();
         mExtendedPluginInfo.add(IExtendedPluginInfo.HELP_TEXT +
                 ";Authenticate the username and password provided " +
                 "by the user against an LDAP directory. Works with the " +
@@ -94,7 +94,7 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
         mName = name;
         mImplName = implName;
         mConfig = config;
-        mData = new Hashtable();
+        mData = new Hashtable<String, IAuthToken>();
         mHosts = new HashAuthData();
 
         try {
@@ -106,7 +106,7 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
     }
 
     public IAuthToken getAuthToken(String key) {
-        return (IAuthToken) mData.remove(key);
+        return mData.remove(key);
     }
 
     public void addAuthToken(String pageID, IAuthToken token) {
@@ -114,7 +114,7 @@ public class HashAuthentication implements IAuthManager, IExtendedPluginInfo {
     }
 
     public void deleteToken(String pageID) {
-        IAuthToken token = (IAuthToken) mData.remove(pageID);
+        mData.remove(pageID);
     }
 
     public HashAuthData getData() {
diff --git a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
index 0c6178e99afa22390efd465bb17973c09c7e8afc..8abe027c4e924a34ae10f88f72be2d8ee6f1d181 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
@@ -19,7 +19,6 @@ package com.netscape.cms.jobs;
 
 import java.io.IOException;
 import java.text.DateFormat;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Locale;
diff --git a/pki/base/common/src/com/netscape/cms/listeners/PinRemovalListener.java b/pki/base/common/src/com/netscape/cms/listeners/PinRemovalListener.java
index c71b9c60365e84779b6bb78e227bfbf00df380a5..662e762b03a3f1629224ea6c630c81b460e102e9 100644
--- a/pki/base/common/src/com/netscape/cms/listeners/PinRemovalListener.java
+++ b/pki/base/common/src/com/netscape/cms/listeners/PinRemovalListener.java
@@ -17,8 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cms.listeners;
 
-import java.util.Hashtable;
-
 import netscape.ldap.LDAPAttribute;
 import netscape.ldap.LDAPConnection;
 import netscape.ldap.LDAPEntry;
@@ -28,7 +26,6 @@ import netscape.ldap.LDAPSearchResults;
 import netscape.ldap.LDAPv2;
 
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authority.ICertAuthority;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.ISubsystem;
@@ -56,9 +53,7 @@ public class PinRemovalListener implements IRequestListener {
 
     private boolean mEnabled = false;
     private ILogger mLogger = CMS.getLogger();
-    private Hashtable mContentParams = new Hashtable();
 
-    private ICertAuthority mSub = null;
     private IConfigStore mConfig = null;
     private IConfigStore mLdapConfig = null;
     private RequestId mReqId = null;
diff --git a/pki/base/common/src/com/netscape/cms/listeners/RequestInQListener.java b/pki/base/common/src/com/netscape/cms/listeners/RequestInQListener.java
index e5c075208933d27aefcfd1280583269381b8e568..7ff13db54de61ce232360a327113889f7df5ca72 100644
--- a/pki/base/common/src/com/netscape/cms/listeners/RequestInQListener.java
+++ b/pki/base/common/src/com/netscape/cms/listeners/RequestInQListener.java
@@ -71,7 +71,7 @@ public class RequestInQListener implements IRequestListener {
     private String mEmailSubject = null;
     private String mFormPath = null;
     private IConfigStore mConfig = null;
-    private Hashtable mContentParams = new Hashtable();
+    private Hashtable<String, Object> mContentParams = new Hashtable<String, Object>();
     private String mId = "RequestInQListener";
     private ICertAuthority mSubsystem = null;
     private String mHttpHost = null;
diff --git a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
index db61382c57ef8f127b264162ccacb2e530a65025..d3b5d545e8c859298947c7d2acbda119095baa0c 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
@@ -27,7 +27,6 @@ import java.util.Hashtable;
 import java.util.Locale;
 import java.util.Vector;
 
-import netscape.security.x509.CRLNumberExtension;
 import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X509CRLImpl;
 import netscape.security.x509.X509CertImpl;
@@ -48,6 +47,7 @@ import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
+import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
 import com.netscape.certsrv.dbs.Modification;
 import com.netscape.certsrv.dbs.ModificationSet;
@@ -111,8 +111,6 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
     private IConfigStore mConfig = null;
     private String mId = null;
     private IDBSubsystem mDBService = null;
-    private X509CRLImpl mCRLImpl = null;
-    private CRLNumberExtension mCRLNumberExt = null;
     private int mStateCount = 0;
 
     /**
@@ -226,15 +224,12 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
      * new one is totally committed.
      */
     public void deleteOldCRLs() throws EBaseException {
-        Enumeration<Object> recs = searchCRLIssuingPointRecord(
+        Enumeration<ICRLIssuingPointRecord> recs = searchCRLIssuingPointRecord(
                 "objectclass=" +
                         CMS.getCRLIssuingPointRecordName(),
                 100);
-        X509CertImpl theCert = null;
-        ICRLIssuingPointRecord theRec = null;
-
         while (recs.hasMoreElements()) {
-            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord) recs.nextElement();
+            ICRLIssuingPointRecord rec = recs.nextElement();
             deleteOldCRLsInCA(rec.getId());
         }
     }
@@ -252,14 +247,14 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 return; // nothing to do
             String thisUpdate = Long.toString(
                     cp.getThisUpdate().getTime());
-            Enumeration<Object> e = searchRepository(
+            Enumeration<IRepositoryRecord> e = searchRepository(
                     caName,
                     "(!" + IRepositoryRecord.ATTR_SERIALNO + "=" +
                             thisUpdate + ")");
 
             while (e != null && e.hasMoreElements()) {
-                IRepositoryRecord r = (IRepositoryRecord) e.nextElement();
-                Enumeration<Object> recs =
+                IRepositoryRecord r = e.nextElement();
+                Enumeration<ICertRecord> recs =
                         searchCertRecord(caName,
                                 r.getSerialNumber().toString(),
                                 ICertRecord.ATTR_ID + "=*");
@@ -437,14 +432,13 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                     mCacheCRLIssuingPoints.get(new String(keyhsh));
 
             if (matched == null) {
-                Enumeration<Object> recs = searchCRLIssuingPointRecord(
+                Enumeration<ICRLIssuingPointRecord> recs = searchCRLIssuingPointRecord(
                         "objectclass=" +
                                 CMS.getCRLIssuingPointRecordName(),
                         100);
 
                 while (recs.hasMoreElements()) {
-                    ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord)
-                            recs.nextElement();
+                    ICRLIssuingPointRecord rec = recs.nextElement();
                     byte certdata[] = rec.getCACert();
                     X509CertImpl cert = null;
 
@@ -579,7 +573,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         return mDBService.getBaseDN();
     }
 
-    public Enumeration<Object> searchAllCRLIssuingPointRecord(int maxSize)
+    public Enumeration<ICRLIssuingPointRecord> searchAllCRLIssuingPointRecord(int maxSize)
             throws EBaseException {
         return searchCRLIssuingPointRecord(
                 "objectclass=" +
@@ -587,19 +581,22 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 maxSize);
     }
 
-    public Enumeration<Object> searchCRLIssuingPointRecord(String filter,
+    public Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(String filter,
             int maxSize)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<ICRLIssuingPointRecord> v = new Vector<ICRLIssuingPointRecord>();
 
         try {
-            e = s.search(getBaseDN(), filter, maxSize);
+            IDBSearchResults sr = s.search(getBaseDN(), filter, maxSize);
+            while (sr.hasMoreElements()) {
+                v.add((ICRLIssuingPointRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
     public synchronized void modifyCRLIssuingPointRecord(String name,
@@ -685,19 +682,22 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration<Object> searchRepository(String name, String filter)
+    public Enumeration<IRepositoryRecord> searchRepository(String name, String filter)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<IRepositoryRecord> v = new Vector<IRepositoryRecord>();
 
         try {
-            e = s.search("cn=" + transformDN(name) + "," + getBaseDN(),
+            IDBSearchResults sr = s.search("cn=" + transformDN(name) + "," + getBaseDN(),
                         filter);
+            while (sr.hasMoreElements()) {
+                v.add((IRepositoryRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
     /**
@@ -736,20 +736,23 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration<Object> searchCertRecord(String name, String thisUpdate,
+    public Enumeration<ICertRecord> searchCertRecord(String name, String thisUpdate,
             String filter) throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<ICertRecord> v = new Vector<ICertRecord>();
 
         try {
-            e = s.search("ou=" + thisUpdate + ",cn=" +
+            IDBSearchResults sr = s.search("ou=" + thisUpdate + ",cn=" +
                         transformDN(name) + "," + getBaseDN(),
                         filter);
+            while (sr.hasMoreElements()) {
+                v.add((ICertRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
     public ICertRecord readCertRecord(String name, String thisUpdate,
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 765a7950459e634892ecd6c0fa6aa7a0c99d2c8a..697d1bb4029e9c9b302b5bc17f5e9f918ce1bdcf 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
@@ -33,6 +33,7 @@ import netscape.ldap.LDAPEntry;
 import netscape.ldap.LDAPException;
 import netscape.ldap.LDAPSearchResults;
 import netscape.ldap.LDAPv2;
+import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X509CRLImpl;
 import netscape.security.x509.X509CertImpl;
 import netscape.security.x509.X509Key;
@@ -395,9 +396,9 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
         throw new EBaseException("NOT SUPPORTED");
     }
 
-    public Enumeration<Object> searchAllCRLIssuingPointRecord(int maxSize)
+    public Enumeration<ICRLIssuingPointRecord> searchAllCRLIssuingPointRecord(int maxSize)
             throws EBaseException {
-        Vector<Object> recs = new Vector<Object>();
+        Vector<ICRLIssuingPointRecord> recs = new Vector<ICRLIssuingPointRecord>();
         Enumeration<X509CertImpl> keys = mCRLs.keys();
 
         while (keys.hasMoreElements()) {
@@ -409,7 +410,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
         return recs.elements();
     }
 
-    public Enumeration searchCRLIssuingPointRecord(String filter,
+    public Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(String filter,
             int maxSize)
             throws EBaseException {
         return null;
@@ -672,11 +673,11 @@ class TempCRLIssuingPointRecord implements ICRLIssuingPointRecord {
         return null;
     }
 
-    public Hashtable getCRLCacheNoClone() {
+    public Hashtable<BigInteger, RevokedCertificate> getCRLCacheNoClone() {
         return null;
     }
 
-    public Hashtable getCRLCache() {
+    public Hashtable<BigInteger, RevokedCertificate> getCRLCache() {
         return null;
     }
 
@@ -717,25 +718,25 @@ class TempCRLIssuingPointRecord implements ICRLIssuingPointRecord {
     /**
      * Retrieves cache info of revoked certificates.
      */
-    public Hashtable getRevokedCerts() {
+    public Hashtable<BigInteger, RevokedCertificate> getRevokedCerts() {
         return mCRL.getListOfRevokedCertificates();
     }
 
     /**
      * Retrieves cache info of unrevoked certificates.
      */
-    public Hashtable getUnrevokedCerts() {
+    public Hashtable<BigInteger, RevokedCertificate> getUnrevokedCerts() {
         return null;
     }
 
     /**
      * Retrieves cache info of expired certificates.
      */
-    public Hashtable getExpiredCerts() {
+    public Hashtable<BigInteger, RevokedCertificate> getExpiredCerts() {
         return null;
     }
 
-    public Enumeration getSerializableAttrNames() {
+    public Enumeration<String> getSerializableAttrNames() {
         return null;
     }
 
@@ -750,7 +751,7 @@ class TempCRLIssuingPointRecord implements ICRLIssuingPointRecord {
 
     }
 
-    public Enumeration getElements() {
+    public Enumeration<Object> getElements() {
         return null;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/ProfileContext.java b/pki/base/common/src/com/netscape/cms/profile/common/ProfileContext.java
index 7a275b1e6770a25a51722abf25ed0b86d35f26c5..7d068637899f3a79f27ea4d35b20f063d96013e8 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/ProfileContext.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/ProfileContext.java
@@ -27,13 +27,13 @@ import com.netscape.certsrv.profile.IProfileContext;
  * @version $Revision$, $Date$
  */
 public class ProfileContext implements IProfileContext {
-    private Hashtable m_Attrs = new Hashtable();
+    private Hashtable<String, String> m_Attrs = new Hashtable<String, String>();
 
     public void set(String name, String value) {
         m_Attrs.put(name, value);
     }
 
     public String get(String name) {
-        return (String) m_Attrs.get(name);
+        return m_Attrs.get(name);
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/RAEnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/RAEnrollProfile.java
index ed028ceeb64db9eecd25ea03e3e73ffcab88b8da..36bac1fa763fe9ec8cfac88abb248ddb7d1e18db 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/RAEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/RAEnrollProfile.java
@@ -110,11 +110,11 @@ public class RAEnrollProfile extends EnrollProfile {
         }
 
         // request handling
-        Enumeration names = ra.getRequestListenerNames();
+        Enumeration<String> names = ra.getRequestListenerNames();
 
         if (names != null) {
             while (names.hasMoreElements()) {
-                String name = (String) names.nextElement();
+                String name = names.nextElement();
 
                 CMS.debug("CAEnrollProfile: listener " + name);
                 IRequestListener listener = ra.getRequestListener(name);
diff --git a/pki/base/common/src/com/netscape/cms/profile/input/SubjectNameInput.java b/pki/base/common/src/com/netscape/cms/profile/input/SubjectNameInput.java
index 55ede138656da9b99791c4815885df57c8c6d51e..db70da6661b6a21ab332b0111183b35d0732a370 100644
--- a/pki/base/common/src/com/netscape/cms/profile/input/SubjectNameInput.java
+++ b/pki/base/common/src/com/netscape/cms/profile/input/SubjectNameInput.java
@@ -113,8 +113,8 @@ public class SubjectNameInput extends EnrollInput implements IProfileInput {
     /**
      * Returns selected value names based on the configuration.
      */
-    public Enumeration getValueNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getValueNames() {
+        Vector<String> v = new Vector<String>();
         String c_uid = getConfig(CONFIG_UID);
         if (c_uid == null || c_uid.equals("")) {
             v.addElement(VAL_UID); // default case
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/Utils.java b/pki/base/common/src/com/netscape/cms/publish/publishers/Utils.java
index 5bd342286c4c584a7576b46a64d60d27acca557e..03561ee786b6a85a354b16ba414a96cd35757665 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/Utils.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/Utils.java
@@ -35,7 +35,7 @@ import java.util.Vector;
  */
 public class Utils {
     public static void checkHost(String hostname) throws UnknownHostException {
-        InetAddress addr = InetAddress.getByName(hostname);
+        InetAddress.getByName(hostname);
     }
 
     public static void copyStream(InputStream in, OutputStream out) throws IOException {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
index 41f0c248f8a1f16e6b322254bc9486606f2aabe9..b77de59c68733f9279548dcd053b000caaec2000 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
@@ -799,7 +799,6 @@ public final class CMSAdminServlet extends AdminServlet {
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
         Enumeration<ISubsystem> e = CMS.getSubsystems();
-        StringBuffer buff = new StringBuffer();
 
         while (e.hasMoreElements()) {
             String type = "";
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
index b93e6eb0b6e5786fe638728534cf1103ca562562..bfd5004a2b52f72e05c3a9ee0a9e397f32612b1c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
@@ -311,7 +311,7 @@ public class JobsAdminServlet extends AdminServlet {
                 destStore.getSubStore(scope);
 
         // Does the class exist?
-        Class newImpl = null;
+        Class<?> newImpl = null;
 
         try {
             newImpl = Class.forName(classPath);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java
index ffd602b25a47bde3f68388bef43f9d8339e0de75..54e453f3073289a2f3d1d47938f3c453eab6af3b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java
@@ -26,7 +26,6 @@ import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.cms.servlet.common.CMSRequest;
@@ -63,7 +62,7 @@ public class DisplayHtmlServlet extends CMSServlet {
     public void process(CMSRequest cmsReq) throws EBaseException {
         CMS.debug("DisplayHtmlServlet about to service ");
 
-        IAuthToken authToken = authenticate(cmsReq);
+        authenticate(cmsReq);
 
         try {
             String realpath =
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java b/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
index e145ee4db54ad7f911862ddac84bc4907b1806f6..c21b5683565dc6145f9bf59a1bb71de3152d6855 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/GetStats.java
@@ -106,9 +106,6 @@ public class GetStats extends CMSServlet {
             return;
         }
 
-        // Construct an ArgBlock
-        IArgBlock args = cmsReq.getHttpParams();
-
         CMSTemplate form = null;
         Locale[] locale = new Locale[1];
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java
index 0784945abc502943e93488803f07a3e054a9fcb9..41666ab31ee32c0ddf12f2557efbb86cd5e7aaa7 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java
@@ -59,11 +59,11 @@ public class ProxyServlet extends HttpServlet {
     private String mDestContext = null;
     private String mSrcContext = null;
     private String mAppendPathInfo = null;
-    private Vector mMatchStrings = new Vector();
+    private Vector<String> mMatchStrings = new Vector<String>();
     private String mDestServletOnNoMatch = null;
     private String mAppendPathInfoOnNoMatch = null;
-    private Map mParamMap = new HashMap();
-    private Map mParamValue = new HashMap();
+    private Map<String, String> mParamMap = new HashMap<String, String>();
+    private Map<String, String[]> mParamValue = new HashMap<String, String[]>();
 
     public ProxyServlet() {
     }
@@ -130,7 +130,7 @@ public class ProxyServlet extends HttpServlet {
         if (mMatchStrings.size() != 0) {
             boolean matched = false;
             for (int i = 0; i < mMatchStrings.size(); i++) {
-                String t = (String) mMatchStrings.elementAt(i);
+                String t = mMatchStrings.elementAt(i);
                 if (uri.indexOf(t) != -1) {
                     matched = true;
                 }
@@ -171,21 +171,22 @@ public class ProxyServlet extends HttpServlet {
 }
 
 class ProxyWrapper extends HttpServletRequestWrapper {
-    private Map mMap = null;
-    private Map mValueMap = null;
+    private Map<String, String> mMap = null;
+    private Map<String, String[]> mValueMap = null;
 
     public ProxyWrapper(HttpServletRequest req) {
         super(req);
     }
 
-    public void setParameterMapAndValue(Map m, Map v) {
+    public void setParameterMapAndValue(Map<String, String> m, Map<String, String[]> v) {
         if (m != null)
             mMap = m;
         if (v != null)
             mValueMap = v;
     }
 
-    public Map getParameterMap() {
+    @SuppressWarnings("unchecked")
+    public Map<String, String[]> getParameterMap() {
         try {
             // If we haven't specified any parameter mapping, just
             // use the regular implementation
@@ -193,15 +194,15 @@ class ProxyWrapper extends HttpServletRequestWrapper {
                 return super.getParameterMap();
             else {
                 // Make a new Map for us to put stuff in
-                Map n = new HashMap();
+                Map<String, String[]> n = new HashMap<String, String[]>();
                 // get the HTTP parameters the user supplied.
-                Map m = super.getParameterMap();
-                Set s = m.entrySet();
-                Iterator i = s.iterator();
+                Map<String, String[]> m = super.getParameterMap();
+                Set<Map.Entry<String, String[]>> s = m.entrySet();
+                Iterator<Map.Entry<String, String[]>> i = s.iterator();
                 while (i.hasNext()) {
-                    Map.Entry me = (Map.Entry) i.next();
-                    String name = (String) me.getKey();
-                    String[] values = (String[]) (me.getValue());
+                    Map.Entry<String, String[]> me = i.next();
+                    String name = me.getKey();
+                    String[] values = me.getValue();
                     String newname = null;
                     if (name != null) {
                         newname = (String) mMap.get(name);
@@ -223,14 +224,14 @@ class ProxyWrapper extends HttpServletRequestWrapper {
                 }
                 // Now, deal with static values set in the config 
                 // which weren't set in the HTTP request
-                Set s2 = mValueMap.entrySet();
-                Iterator i2 = s2.iterator();
+                Set<Map.Entry<String, String[]>> s2 = mValueMap.entrySet();
+                Iterator<Map.Entry<String, String[]>> i2 = s2.iterator();
                 // Cycle through all the static values
                 while (i2.hasNext()) {
-                    Map.Entry me2 = (Map.Entry) i2.next();
-                    String name2 = (String) me2.getKey();
+                    Map.Entry<String, String[]> me2 = i2.next();
+                    String name2 = me2.getKey();
                     if (n.get(name2) == null) {
-                        String[] values2 = (String[]) me2.getValue();
+                        String[] values2 = me2.getValue();
                         // If the parameter is not set in the map
                         // Set it now
                         n.put(name2, values2);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
index 9815ff6872110a6175c5dcba7b1bd6ac50a28bd9..bf582a82e62f258933d4547df5b659ee48f7221c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
@@ -109,9 +109,6 @@ public class DisplayHashUserEnroll extends CMSServlet {
 
         String reqHost = httpReq.getRemoteHost();
 
-        // Construct an ArgBlock
-        IArgBlock args = cmsReq.getHttpParams();
-
         if (!(mAuthority instanceof IRegistrationAuthority)) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_ERR_GET_TEMPLATE"));
             cmsReq.setError(new ECMSGWException(
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
index 3297c585c0192609a503c29050ce13ff06f7f20d..d0dfb8f9a6649a53ec42f115d3c0ac7ec7635513 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetEnableStatus.java
@@ -108,9 +108,6 @@ public class GetEnableStatus extends CMSServlet {
 
         String reqHost = httpReq.getRemoteHost();
 
-        // Construct an ArgBlock
-        IArgBlock args = cmsReq.getHttpParams();
-
         if (!(mAuthority instanceof IRegistrationAuthority)) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_CA_FROM_RA_NOT_IMP"));
             cmsReq.setError(new ECMSGWException(
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 b8e56b3e7755e1f30e972f74dde99824eab86375..0f21e1921c5a7ff9ef796841b47720517938a3e9 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
@@ -245,13 +245,13 @@ public class ReasonToRevoke extends CMSServlet {
              * revokeAll, null, totalRecordCount);
              * Enumeration e = list.getCertRecords(0, totalRecordCount - 1);
              **/
-            Enumeration e = mCertDB.searchCertificates(revokeAll,
+            Enumeration<ICertRecord> e = mCertDB.searchCertificates(revokeAll,
                     totalRecordCount, mTimeLimits);
 
             int count = 0;
 
             while (e != null && e.hasMoreElements()) {
-                ICertRecord rec = (ICertRecord) e.nextElement();
+                ICertRecord rec = e.nextElement();
 
                 if (rec == null)
                     continue;
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 55d8bb04c18150c049cf2444bd9c88571b138bc8..478df161df546f798b50805bafdddf347b27dfe5 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
@@ -19,7 +19,6 @@ package com.netscape.cms.servlet.cert;
 
 import java.io.IOException;
 import java.util.Calendar;
-import java.util.Date;
 import java.util.Enumeration;
 import java.util.Locale;
 import java.util.StringTokenizer;
@@ -42,7 +41,6 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.AuthMgrPlugin;
 import com.netscape.certsrv.authentication.IAuthManager;
 import com.netscape.certsrv.authentication.IAuthSubsystem;
-import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.base.IConfigStore;
@@ -146,7 +144,7 @@ public class RemoteAuthConfig extends CMSServlet {
         HttpServletRequest req = cmsReq.getHttpReq();
         HttpServletResponse resp = cmsReq.getHttpResp();
 
-        IAuthToken authToken = authenticate(cmsReq);
+        authenticate(cmsReq);
 
         IArgBlock header = CMS.createArgBlock();
         IArgBlock ctx = CMS.createArgBlock();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
index 8e6d5821604a9d843577c438c0a9fcf4869b4b85..3602515c9fdef15a882a04175c62a1c33fba9910 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/SrchCerts.java
@@ -295,7 +295,6 @@ public class SrchCerts extends CMSServlet {
     private void buildDateFilter(HttpServletRequest req, String prefix,
                                    String outStr, long adjustment,
                                    StringBuffer filter) {
-        String queryCertFilter = null;
         long epoch = 0;
         try {
             epoch = Long.parseLong(req.getParameter(prefix));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
index 4625fb79e37b4d6d9a8f54d29e096a9aee308fa0..50feb08639db00f8e6281499b1597d15cc44187a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
@@ -111,8 +111,6 @@ public class CMSTemplate extends CMSFile {
      * @return true if successful
      */
     public boolean init(File template) throws EBaseException, IOException {
-        StringBuffer buf = new StringBuffer();
-
         /* load template */
         String content = loadFile(template);
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CheckIdentity.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CheckIdentity.java
index a28ae76b3486fc29e876528f30248c3986359df0..52a98d5400181a5548b38da38362a267c074769d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CheckIdentity.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CheckIdentity.java
@@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletResponse;
 import org.w3c.dom.Node;
 
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.cms.servlet.base.CMSServlet;
@@ -66,13 +65,10 @@ public class CheckIdentity extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
-        IAuthToken authToken = null;
-
         try {
-            authToken = authenticate(cmsReq);
+            authenticate(cmsReq);
         } catch (Exception e) {
             CMS.debug("CheckIdentity authentication failed");
             log(ILogger.LL_FAILURE,
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTokenInfo.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTokenInfo.java
index 4d11af8af42a5d599fa2e1f68e70140252260e06..f97d3e5e10ec7b483dc94627c0472350fb549d76 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTokenInfo.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTokenInfo.java
@@ -30,7 +30,6 @@ import org.w3c.dom.Node;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.cms.servlet.base.CMSServlet;
 import com.netscape.cms.servlet.base.UserInfo;
@@ -70,12 +69,8 @@ public class GetTokenInfo extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
-        // Construct an ArgBlock
-        IArgBlock args = cmsReq.getHttpParams();
-
         XMLObject xmlObj = null;
         try {
             xmlObj = new XMLObject();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
index 15e73179e94f171cfd14047649ab482d83145727..59b01f26a0734f8a3f6f76524b0b7aff1c30ef0e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
@@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.dbs.keydb.IKeyRecord;
@@ -112,7 +111,7 @@ public class ConfirmRecoverBySerial extends CMSServlet {
         HttpServletRequest req = cmsReq.getHttpReq();
         HttpServletResponse resp = cmsReq.getHttpResp();
 
-        IAuthToken authToken = authenticate(cmsReq);
+        authenticate(cmsReq);
 
         CMSTemplate form = null;
         Locale[] locale = new Locale[1];
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
index bc23e635baafddbd640025da7b8d919f953ac15c..81ced5290092b8266ed4c22e86ef14c6146ab70c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
@@ -217,7 +217,7 @@ public class ExamineRecovery extends CMSServlet {
                     req.getRequestURI());
             header.addStringValue("keySplitting",
                     CMS.getConfigStore().getString("kra.keySplitting"));
-            Hashtable params = mService.getRecoveryParams(
+            Hashtable<String, Object> params = mService.getRecoveryParams(
                     recoveryID);
 
             if (params == null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GetPk12.java b/pki/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
index f27e966d04a12680e6b197ed28f28a8ff20cf4db..96fe7c85ddeda04cba808a7f5a039f15ebee69e3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
@@ -154,7 +154,6 @@ public class GetPk12 extends CMSServlet {
         IArgBlock header = CMS.createArgBlock();
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
-        int seq = -1;
 
         // get status and populate argSet
         try {
@@ -162,7 +161,7 @@ public class GetPk12 extends CMSServlet {
 
             header.addStringValue("recoveryID", recoveryID);
 
-            Hashtable params = mService.getRecoveryParams(recoveryID);
+            Hashtable<String, Object> params = mService.getRecoveryParams(recoveryID);
 
             if (params == null) {
                 log(ILogger.LL_FAILURE,
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
index a7b256e83a386f280769a0bb89b2c827700c190a..9989fafad22e3d9903531108cb2d558897bdd1fd 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
@@ -244,7 +244,7 @@ public class GrantRecovery extends CMSServlet {
             header.addStringValue(OUT_SERVICE_URL,
                     req.getRequestURI());
 
-            Hashtable h = mService.getRecoveryParams(recoveryID);
+            Hashtable<String, Object> h = mService.getRecoveryParams(recoveryID);
 
             if (h == null) {
                 header.addStringValue(OUT_ERROR,
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java b/pki/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
index d6bc57fcf0233232e4d7e4e2ec1c4b94fc5c53a7..aeee624c068f2f8643e407ad2227d1a158de00ee 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
@@ -17,7 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cms.servlet.key;
 
-import java.math.BigInteger;
 import java.util.Date;
 
 import com.netscape.certsrv.apps.CMS;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
index 6bb013b1c8abaf0a81644ce15042580318ca43a7..803281df26fceab4c18ac22e42f3dae4ffc4fbc6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
@@ -175,12 +175,10 @@ public class RecoverBySerial extends CMSServlet {
         fixed.set(PORT, Integer.valueOf(port));
         fixed.set(SCHEME, scheme);
 
-        int seq = -1;
-
         SessionContext ctx = null;
 
         try {
-            String localAgents = req.getParameter("localAgents");
+            //String localAgents = req.getParameter("localAgents");
             String initAsyncRecovery = req.getParameter("initAsyncRecovery");
 
             // this information is needed within the server for
@@ -367,7 +365,7 @@ public class RecoverBySerial extends CMSServlet {
                         header.addStringValue(OUT_ERROR, "No recovery ID specified");
                         return null;
                     }
-                    Hashtable params = mService.createRecoveryParams(recoveryID);
+                    Hashtable<String, Object> params = mService.createRecoveryParams(recoveryID);
 
                     params.put("keyID", req.getParameter(IN_SERIALNO));
 
@@ -383,7 +381,7 @@ public class RecoverBySerial extends CMSServlet {
                     waitThread.start();
                     return null;
                 } else {
-                    Vector v = new Vector();
+                    Vector<Credential> v = new Vector<Credential>();
 
                     for (int i = 0; i < mService.getNoOfRequiredAgents(); i++) {
                         String uid = req.getParameter(IN_UID + i);
@@ -424,7 +422,7 @@ public class RecoverBySerial extends CMSServlet {
                     header.addStringValue(OUT_ERROR, "No recovery ID specified");
                     return null;
                 }
-                Hashtable params = mService.createRecoveryParams(recoveryID);
+                Hashtable<String, Object> params = mService.createRecoveryParams(recoveryID);
 
                 params.put("keyID", req.getParameter(IN_SERIALNO));
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKey.java b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
index b6693ee6b6627d0ccd22b828cb4f1b878f63b91a..bff14e9f2d7188071e5685e48c9401231da79656 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
@@ -263,7 +263,7 @@ public class SrchKey extends CMSServlet {
                 timeLimit = mTimeLimits;
             }
             CMS.debug("Start searching ... timelimit=" + timeLimit);
-            Enumeration e = mKeyDB.searchKeys(filter,
+            Enumeration<IKeyRecord> e = mKeyDB.searchKeys(filter,
                     maxResults, timeLimit);
             int count = 0;
 
@@ -272,8 +272,7 @@ public class SrchKey extends CMSServlet {
                         null);
             } else {
                 while (e.hasMoreElements()) {
-                    IKeyRecord rec = (IKeyRecord)
-                            e.nextElement();
+                    IKeyRecord rec = e.nextElement();
                     // rec is null when we specify maxResults
                     // DS will return an err=4, which triggers
                     // a LDAPException.SIZE_LIMIT_ExCEEDED
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
index 828ef0e6c2b9be5a828e8fcf2a41fb4c165bd78a..95c777701c186c98e2d952db94ef0c2f8782e64f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
@@ -284,7 +284,7 @@ public class SrchKeyForRecovery extends CMSServlet {
                 timeLimit = mTimeLimits;
             }
             CMS.debug("Start searching ... timelimit=" + timeLimit);
-            Enumeration e = mKeyDB.searchKeys(filter, maxResults, timeLimit);
+            Enumeration<IKeyRecord> e = mKeyDB.searchKeys(filter, maxResults, timeLimit);
             int count = 0;
 
             if (e == null) {
@@ -292,8 +292,7 @@ public class SrchKeyForRecovery extends CMSServlet {
                         null);
             } else {
                 while (e.hasMoreElements()) {
-                    IKeyRecord rec = (IKeyRecord)
-                            e.nextElement();
+                    IKeyRecord rec = e.nextElement();
                     // rec is null when we specify maxResults
                     // DS will return an err=4, which triggers
                     // a LDAPException.SIZE_LIMIT_ExCEEDED 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/GetOCSPInfo.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/GetOCSPInfo.java
index 1aaf1d6e5b61200773effdff8d44b6625aecc4d7..3dfc1d5f3c2131f16819ce23e96f3d7f5f53a709 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/GetOCSPInfo.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/GetOCSPInfo.java
@@ -106,9 +106,6 @@ public class GetOCSPInfo extends CMSServlet {
             return;
         }
 
-        // Construct an ArgBlock
-        IArgBlock args = cmsReq.getHttpParams();
-
         if (!(mAuthority instanceof IOCSPService)) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_CA_FROM_RA_NOT_IMP"));
             cmsReq.setError(new ECMSGWException(
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 2d9daff95065ce924a3ec5986af1c6db81692e8b..9ca7a8a189cd69ac9a3a64fca866f2ccf106bcbe 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
@@ -128,14 +128,14 @@ public class ListCAServlet extends CMSServlet {
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
         IDefStore defStore = mOCSPAuthority.getDefaultStore();
-        Enumeration<Object> recs = defStore.searchAllCRLIssuingPointRecord(100);
+        Enumeration<ICRLIssuingPointRecord> recs = defStore.searchAllCRLIssuingPointRecord(100);
 
         // show the current CRL number if present
         header.addStringValue("stateCount",
                 Integer.toString(defStore.getStateCount()));
 
         while (recs.hasMoreElements()) {
-            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord) recs.nextElement();
+            ICRLIssuingPointRecord rec = recs.nextElement();
             IArgBlock rarg = CMS.createArgBlock();
             String thisId = rec.getId();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/processors/CMCProcessor.java b/pki/base/common/src/com/netscape/cms/servlet/processors/CMCProcessor.java
index 51655f973c4b3d1885ea2547cd7069c7d275ac91..53c13510df7b3d33f38c11f3bd7e29b23715a925 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/processors/CMCProcessor.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/processors/CMCProcessor.java
@@ -203,7 +203,7 @@ public class CMCProcessor extends PKIProcessor {
             // verify the signerInfo
             SET dais = cmcFullReq.getDigestAlgorithmIdentifiers();
             int numDig = dais.size();
-            Hashtable digs = new Hashtable();
+            Hashtable<String, byte[]> digs = new Hashtable<String, byte[]>();
 
             for (int i = 0; i < numDig; i++) {
                 AlgorithmIdentifier dai =
diff --git a/pki/base/common/src/com/netscape/cms/servlet/processors/CRMFProcessor.java b/pki/base/common/src/com/netscape/cms/servlet/processors/CRMFProcessor.java
index 641017cc887d4e7e681c99792e2e0aee864a1201..2d2f1430efbab81114406bfc5ee3c604325f92fc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/processors/CRMFProcessor.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/processors/CRMFProcessor.java
@@ -177,7 +177,6 @@ public class CRMFProcessor extends PKIProcessor {
             verifyPOP(certReqMsg);
 
             CertRequest certReq = certReqMsg.getCertReq();
-            INTEGER certReqId = certReq.getCertReqId();
 
             CertTemplate certTemplate = certReq.getCertTemplate();
             X509CertInfo certInfo = CMS.getDefaultX509CertInfo();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
index d021ef3878ce3c786531f4a1b71bab2ea85a6001..2849e14f3019a9662a0e82b9f60f59fa11f90528 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java
@@ -59,7 +59,6 @@ import com.netscape.certsrv.profile.IProfileSubsystem;
 import com.netscape.certsrv.request.INotify;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.RequestStatus;
-import com.netscape.certsrv.template.ArgSet;
 import com.netscape.cms.servlet.common.AuthCredentials;
 import com.netscape.cms.servlet.common.CMCOutputTemplate;
 import com.netscape.cms.servlet.common.CMSRequest;
@@ -231,7 +230,6 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
         HttpServletResponse response = cmsReq.getHttpResp();
 
         Locale locale = getLocale(request);
-        ArgSet args = new ArgSet();
         String cert_request_type =
                 mServletConfig.getInitParameter("cert_request_type");
         String outputFormat = mServletConfig.getInitParameter("outputFormat");
@@ -645,7 +643,6 @@ public class ProfileSubmitCMCServlet extends ProfileServlet {
         String auditRequesterID = ILogger.UNIDENTIFIED;
         String auditInfoCertValue = ILogger.SIGNED_AUDIT_EMPTY_VALUE;
 
-        int responseType = 0;
         try {
             ///////////////////////////////////////////////
             // submit request
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
index 4a7d70cc0f574125b735f7d0a7aa5edfbeaf6a05..1d4cab76bf977c335f3f6ee1dcb656af9988905d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileSubmitServlet.java
@@ -39,7 +39,6 @@ import org.w3c.dom.Node;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.authority.IAuthority;
-import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.MetaInfo;
 import com.netscape.certsrv.base.SessionContext;
@@ -1071,7 +1070,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
             if (acl != null && acl.length() > 0) {
                 try {
                     String resource = profileId + ".authz.acl";
-                    AuthzToken authzToken = authorize(mAclMethod, resource, authToken, acl);
+                    authorize(mAclMethod, resource, authToken, acl);
                 } catch (Exception e) {
                     CMS.debug("ProfileSubmitServlet authorize: " + e.toString());
                     if (xmlOutput) {
diff --git a/pki/base/common/src/com/netscape/cms/shares/OldJoinShares.java b/pki/base/common/src/com/netscape/cms/shares/OldJoinShares.java
index 3fdcb0245cbc3b63c8d7cdfd25d0acd135116037..f01e1e1c37cb74a547fb176163dd5b6e2f1056c8 100644
--- a/pki/base/common/src/com/netscape/cms/shares/OldJoinShares.java
+++ b/pki/base/common/src/com/netscape/cms/shares/OldJoinShares.java
@@ -37,17 +37,17 @@ public class OldJoinShares implements IJoinShares {
     }
 
     public void initialize(int threshold) throws Exception {
-        Class c = Class.forName("com.netscape.cmscore.shares.JoinShares");
-        Class types[] = { int.class };
-        Constructor con = c.getConstructor(types);
+        Class<?> c = Class.forName("com.netscape.cmscore.shares.JoinShares");
+        Class<?> types[] = { int.class };
+        Constructor<?> con = c.getConstructor(types);
         Object params[] = { Integer.valueOf(threshold) };
         mOldImpl = con.newInstance(params);
     }
 
     public void addShare(int shareNum, byte[] share) {
         try {
-            Class types[] = { int.class, share.getClass() };
-            Class c = mOldImpl.getClass();
+            Class<?> types[] = { int.class, share.getClass() };
+            Class<?> c = mOldImpl.getClass();
             Method method = c.getMethod("addShare", types);
             Object params[] = { Integer.valueOf(shareNum), share };
             method.invoke(mOldImpl, params);
@@ -59,8 +59,8 @@ public class OldJoinShares implements IJoinShares {
         if (mOldImpl == null)
             return -1;
         try {
-            Class types[] = null;
-            Class c = mOldImpl.getClass();
+            Class<?> types[] = null;
+            Class<?> c = mOldImpl.getClass();
             Method method = c.getMethod("getShareCount", types);
             Object params[] = null;
             Integer result = (Integer) method.invoke(mOldImpl, params);
@@ -74,8 +74,8 @@ public class OldJoinShares implements IJoinShares {
         if (mOldImpl == null)
             return null;
         try {
-            Class types[] = null;
-            Class c = mOldImpl.getClass();
+            Class<?> types[] = null;
+            Class<?> c = mOldImpl.getClass();
             Method method = c.getMethod("recoverSecret", types);
             Object params[] = null;
             return (byte[]) method.invoke(mOldImpl, params);
diff --git a/pki/base/common/src/com/netscape/cms/shares/OldShare.java b/pki/base/common/src/com/netscape/cms/shares/OldShare.java
index a867fcbffd219ea933e28cc08ae9acb8f487e382..4020e759e09a5141646eb481417697887faecc9b 100644
--- a/pki/base/common/src/com/netscape/cms/shares/OldShare.java
+++ b/pki/base/common/src/com/netscape/cms/shares/OldShare.java
@@ -37,10 +37,9 @@ public class OldShare implements IShare {
 
     public void initialize(byte[] secret, int threshold) throws Exception {
         try {
-            Class c = Class.forName("com.netscape.cmscore.shares.Share");
-            Class types[] = { secret.getClass(), int.class };
-            Constructor cs[] = c.getConstructors();
-            Constructor con = c.getConstructor(types);
+            Class<?> c = Class.forName("com.netscape.cmscore.shares.Share");
+            Class<?> types[] = { secret.getClass(), int.class };
+            Constructor<?> con = c.getConstructor(types);
             Object params[] = { secret, Integer.valueOf(threshold) };
             mOldImpl = con.newInstance(params);
         } catch (Exception e) {
@@ -51,8 +50,8 @@ public class OldShare implements IShare {
         if (mOldImpl == null)
             return null;
         try {
-            Class types[] = { int.class };
-            Class c = mOldImpl.getClass();
+            Class<?> types[] = { int.class };
+            Class<?> c = mOldImpl.getClass();
             Method method = c.getMethod("createShare", types);
             Object params[] = { Integer.valueOf(sharenumber) };
             return (byte[]) method.invoke(mOldImpl, params);
diff --git a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
index 2f8a33faabb8a084378202cab349ff29b6517660..48f743ee35277534d50e91d2a984b4f454e15a5a 100644
--- a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
+++ b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
@@ -22,8 +22,6 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Vector;
 
-import netscape.security.x509.X509CertImpl;
-
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.AuthToken;
 import com.netscape.certsrv.authentication.EAuthException;
@@ -211,7 +209,6 @@ public class ChallengePhraseAuthentication implements IAuthManager {
          }
          */
 
-        X509CertImpl[] certsToRevoke = null;
         BigInteger[] bigIntArray = null;
 
         // check challenge phrase against request
diff --git a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
index 1f453a573babc06ff2cd4ebe0fc8a42ba8574bcf..1cc0330c7792721f7fce930d7e95655094d0b3a2 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
@@ -335,8 +335,6 @@ public class PropConfigStore implements IConfigStore, Cloneable {
             throws EBaseException {
         String str = (String) get(name);
 
-        byte returnval;
-
         if (str == null || str.length() == 0) {
             CMS.traceHashKey(mDebugType, getFullName(name),
                     "<notpresent>", "<bytearray>");
@@ -598,7 +596,6 @@ public class PropConfigStore implements IConfigStore, Cloneable {
         // without the current substore prefix.  This code works even
         // if mStoreName is null.
         String fullName = getFullName(name);
-        int kIndex = fullName.length();
 
         while (e.hasMoreElements()) {
             String key = e.nextElement();
@@ -756,13 +753,14 @@ public class PropConfigStore implements IConfigStore, Cloneable {
 
             mStoreName = getName();
             mSource = new SourceConfigStore();
-            Enumeration subs = getSubStoreNames();
+            Enumeration<String> subs = getSubStoreNames();
 
             while (subs.hasMoreElements()) {
-                IConfigStore sub = (IConfigStore)
-                        subs.nextElement();
-                IConfigStore newSub = that.makeSubStore(
-                        sub.getName());
+                String name = subs.nextElement();
+
+                IConfigStore sub = getSubStore(name);
+                IConfigStore newSub = that.makeSubStore(sub.getName());
+
                 Enumeration<String> props = sub.getPropertyNames();
 
                 while (props.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CertDateCompare.java b/pki/base/common/src/com/netscape/cmscore/cert/CertDateCompare.java
index d8b2981268cde7328ac450a61789c6eb9ab1beb7..7078c34406188fce614853a37a692d52c2597b88 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CertDateCompare.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CertDateCompare.java
@@ -28,17 +28,17 @@ import netscape.security.x509.X509CertImpl;
  * @author kanda
  * @version $Revision$, $Date$
  */
-public class CertDateCompare implements Comparator {
+public class CertDateCompare implements Comparator<X509CertImpl> {
     public CertDateCompare() {
     }
 
-    public int compare(Object cert1, Object cert2) {
+    public int compare(X509CertImpl cert1, X509CertImpl cert2) {
         Date d1 = null;
         Date d2 = null;
 
         try {
-            d1 = ((X509CertImpl) cert1).getNotAfter();
-            d2 = ((X509CertImpl) cert2).getNotAfter();
+            d1 = cert1.getNotAfter();
+            d2 = cert2.getNotAfter();
         } catch (Exception e) {
             e.printStackTrace();
         }
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java b/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
index 12965a52ed330735485ace641763be354179fbe2..a5c6fec904984602dc4d5f7ad8feb1ce1f3a8ae0 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
@@ -1001,7 +1001,6 @@ public class CertUtils {
     public static boolean verifySystemCerts() {
         String auditMessage = null;
         IConfigStore config = CMS.getConfigStore();
-        String certlsit = "";
         boolean verifyResult = true;
         boolean r = true; /* the final return value */
         try {
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 89a22921662cfe4e157f44ffacf346c53c0bf582..de5e233c90a24eb8245f9121f6bc672615c8c760 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/X500NameSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/X500NameSubsystem.java
@@ -227,7 +227,7 @@ public class X500NameSubsystem implements ISubsystem {
     private static String BMPSTRING = "BMPString";
     private static String UNIVERSALSTRING = "UniversalString";
     private static String UFT8STRING = "UTF8String";
-    private static Hashtable mDerStr2TagHash = new Hashtable();
+    private static Hashtable<String, Byte> mDerStr2TagHash = new Hashtable<String, Byte>();
 
     static {
         mDerStr2TagHash.put(
@@ -249,7 +249,7 @@ public class X500NameSubsystem implements ISubsystem {
     private byte derStr2Tag(String s) {
         if (s == null || s.length() == 0)
             throw new IllegalArgumentException();
-        Byte tag = (Byte) mDerStr2TagHash.get(s);
+        Byte tag = mDerStr2TagHash.get(s);
 
         if (tag == null)
             throw new IllegalArgumentException();
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java b/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java
index 5898e3228308f534c8b67c258a66031f44a423fb..42c6636ce5fd4d40c950a8cd9ecdfe9625e23e2b 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java
@@ -39,7 +39,7 @@ public class LocalConnector implements IConnector {
     ILogger mLogger = CMS.getLogger();
     ICertAuthority mSource = null;
     IAuthority mDest = null;
-    Hashtable mSourceReqs = new Hashtable();
+    Hashtable<String, IRequest> mSourceReqs = new Hashtable<String, IRequest>();
 
     public LocalConnector(ICertAuthority source, IAuthority dest) {
         mSource = source;
@@ -184,7 +184,7 @@ public class LocalConnector implements IConnector {
             // are persistent before the servicing.
             // Please see stateEngine() function in 
             // ARequestQueue.java for details.
-            r = (IRequest) mSourceReqs.get(rId);
+            r = mSourceReqs.get(rId);
             if (r != null) {
                 if (r.getRequestStatus() != RequestStatus.SVC_PENDING) {
                     mSource.log(ILogger.LL_FAILURE,
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java b/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
index 9f0797d40d97856cb67bd7758e5a7a3ec7cc2311..0a3a46f141827ade45762f6e923426fb920a1659 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLIssuingPointRecord.java
@@ -23,6 +23,8 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
 
+import netscape.security.x509.RevokedCertificate;
+
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.IDBObj;
@@ -51,10 +53,10 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
     protected String mFirstUnsaved = null;
     protected byte mCRL[] = null;
     protected byte mCACert[] = null;
-    protected Hashtable mCRLCache = null;
-    protected Hashtable mRevokedCerts = null;
-    protected Hashtable mUnrevokedCerts = null;
-    protected Hashtable mExpiredCerts = null;
+    protected Hashtable<BigInteger, RevokedCertificate> mCRLCache = null;
+    protected Hashtable<BigInteger, RevokedCertificate> mRevokedCerts = null;
+    protected Hashtable<BigInteger, RevokedCertificate> mUnrevokedCerts = null;
+    protected Hashtable<BigInteger, RevokedCertificate> mExpiredCerts = null;
     protected byte mDeltaCRL[] = null;
     protected static Vector<String> mNames = new Vector<String>();
     static {
@@ -106,7 +108,9 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
      */
     public CRLIssuingPointRecord(String id, BigInteger crlNumber, Long crlSize,
             Date thisUpdate, Date nextUpdate, BigInteger deltaCRLNumber, Long deltaCRLSize,
-            Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts) {
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> expiredCerts) {
         mId = id;
         mCRLNumber = crlNumber;
         mCRLSize = crlSize;
@@ -121,6 +125,7 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
         mExpiredCerts = expiredCerts;
     }
 
+    @SuppressWarnings({ "unchecked" })
     public void set(String name, Object obj) throws EBaseException {
         if (name.equalsIgnoreCase(ATTR_ID)) {
             mId = (String) obj;
@@ -143,13 +148,13 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
         } else if (name.equalsIgnoreCase(ATTR_CA_CERT)) {
             mCACert = (byte[]) obj;
         } else if (name.equalsIgnoreCase(ATTR_CRL_CACHE)) {
-            mCRLCache = (Hashtable) obj;
+            mCRLCache = (Hashtable<BigInteger, RevokedCertificate>) obj;
         } else if (name.equalsIgnoreCase(ATTR_REVOKED_CERTS)) {
-            mRevokedCerts = (Hashtable) obj;
+            mRevokedCerts = (Hashtable<BigInteger, RevokedCertificate>) obj;
         } else if (name.equalsIgnoreCase(ATTR_UNREVOKED_CERTS)) {
-            mUnrevokedCerts = (Hashtable) obj;
+            mUnrevokedCerts = (Hashtable<BigInteger, RevokedCertificate>) obj;
         } else if (name.equalsIgnoreCase(ATTR_EXPIRED_CERTS)) {
-            mExpiredCerts = (Hashtable) obj;
+            mExpiredCerts = (Hashtable<BigInteger, RevokedCertificate>) obj;
         } else if (name.equalsIgnoreCase(ATTR_DELTA_CRL)) {
             mDeltaCRL = (byte[]) obj;
         } else {
@@ -279,47 +284,51 @@ public class CRLIssuingPointRecord implements ICRLIssuingPointRecord, IDBObj {
         return mCACert;
     }
 
-    public Hashtable getCRLCacheNoClone() {
+    public Hashtable<BigInteger, RevokedCertificate> getCRLCacheNoClone() {
         if (mCRLCache == null)
             return null;
         else
-            return (Hashtable) mCRLCache;
+            return mCRLCache;
     }
 
-    public Hashtable getCRLCache() {
+    @SuppressWarnings("unchecked")
+    public Hashtable<BigInteger, RevokedCertificate> getCRLCache() {
         if (mCRLCache == null)
             return null;
         else
-            return (Hashtable) mCRLCache.clone();
+            return (Hashtable<BigInteger, RevokedCertificate>) mCRLCache.clone();
     }
 
     /**
      * Retrieves cache info of revoked certificates.
      */
-    public Hashtable getRevokedCerts() {
+    @SuppressWarnings("unchecked")
+    public Hashtable<BigInteger, RevokedCertificate> getRevokedCerts() {
         if (mRevokedCerts == null)
             return null;
         else
-            return (Hashtable) mRevokedCerts.clone();
+            return (Hashtable<BigInteger, RevokedCertificate>) mRevokedCerts.clone();
     }
 
     /**
      * Retrieves cache info of unrevoked certificates.
      */
-    public Hashtable getUnrevokedCerts() {
+    @SuppressWarnings("unchecked")
+    public Hashtable<BigInteger, RevokedCertificate> getUnrevokedCerts() {
         if (mUnrevokedCerts == null)
             return null;
         else
-            return (Hashtable) mUnrevokedCerts.clone();
+            return (Hashtable<BigInteger, RevokedCertificate>) mUnrevokedCerts.clone();
     }
 
     /**
      * Retrieves cache info of expired certificates.
      */
-    public Hashtable getExpiredCerts() {
+    @SuppressWarnings("unchecked")
+    public Hashtable<BigInteger, RevokedCertificate> getExpiredCerts() {
         if (mExpiredCerts == null)
             return null;
         else
-            return (Hashtable) mExpiredCerts.clone();
+            return (Hashtable<BigInteger, RevokedCertificate>) mExpiredCerts.clone();
     }
 }
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 a54ff500f4808847dedc199d10bcf2b71ec381fa..f9c4369a29236168f053304cb74fcbfe1f28f0cb 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
@@ -22,6 +22,8 @@ import java.util.Date;
 import java.util.Hashtable;
 import java.util.Vector;
 
+import netscape.security.x509.RevokedCertificate;
+
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.EDBException;
@@ -230,7 +232,9 @@ public class CRLRepository extends Repository implements ICRLRepository {
      */
     public void updateCRLIssuingPointRecord(String id, byte[] newCRL,
             Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize,
-            Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts)
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException {
         ModificationSet mods = new ModificationSet();
 
@@ -270,8 +274,9 @@ public class CRLRepository extends Repository implements ICRLRepository {
     /**
      * Updates CRL issuing point record with recently revoked certificates info.
      */
-    public void updateRevokedCerts(String id, Hashtable revokedCerts,
-            Hashtable unrevokedCerts)
+    public void updateRevokedCerts(String id,
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts)
             throws EBaseException {
         ModificationSet mods = new ModificationSet();
 
@@ -287,7 +292,7 @@ public class CRLRepository extends Repository implements ICRLRepository {
     /**
      * Updates CRL issuing point record with recently expired certificates info.
      */
-    public void updateExpiredCerts(String id, Hashtable expiredCerts)
+    public void updateExpiredCerts(String id, Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException {
         ModificationSet mods = new ModificationSet();
 
@@ -300,9 +305,9 @@ public class CRLRepository extends Repository implements ICRLRepository {
      * Updates CRL issuing point record with CRL cache info.
      */
     public void updateCRLCache(String id, Long crlSize,
-            Hashtable revokedCerts,
-            Hashtable unrevokedCerts,
-            Hashtable expiredCerts)
+            Hashtable<BigInteger, RevokedCertificate> revokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> unrevokedCerts,
+            Hashtable<BigInteger, RevokedCertificate> expiredCerts)
             throws EBaseException {
         ModificationSet mods = new ModificationSet();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
index 8b29dec532e5d7bd1e6e91c2c6dbe1e1f6d76180..6ae37984057f41123f81fb49a2e6cd6fd8f4e8a2 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -45,6 +45,7 @@ import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.dbs.EDBException;
 import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
+import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
 import com.netscape.certsrv.dbs.IDBVirtualList;
 import com.netscape.certsrv.dbs.Modification;
@@ -450,9 +451,6 @@ public class CertificateRepository extends Repository
             }
         }
 
-        CertRecord cRec = null;
-        BigInteger serial = null;
-
         transitCertList(cList, CertRecord.STATUS_EXPIRED);
     }
 
@@ -622,7 +620,6 @@ public class CertificateRepository extends Repository
      */
     public X509CertImpl getX509Certificate(BigInteger serialNo)
             throws EBaseException {
-        X509CertImpl cert = null;
         ICertRecord cr = readCertificateRecord(serialNo);
 
         return (cr.getCertificate());
@@ -767,19 +764,22 @@ public class CertificateRepository extends Repository
         return e;
     }
 
-    public Enumeration<Object> searchCertificates(String filter, int maxSize, int timeLimit)
+    public Enumeration<ICertRecord> searchCertificates(String filter, int maxSize, int timeLimit)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<ICertRecord> v = new Vector<ICertRecord>();
 
         CMS.debug("searchCertificateswith time limit filter " + filter);
         try {
-            e = s.search(getDN(), filter, maxSize, timeLimit);
+            IDBSearchResults sr = s.search(getDN(), filter, maxSize, timeLimit);
+            while (sr.hasMoreElements()) {
+                v.add((ICertRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
     /**
@@ -894,7 +894,7 @@ public class CertificateRepository extends Repository
         CertRecordList list = null;
 
         try {
-            IDBVirtualList<ICertRecord> vlist = s.createVirtualList(getDN(), filter, attrs,
+            IDBVirtualList<ICertRecord> vlist = s.<ICertRecord>createVirtualList(getDN(), filter, attrs,
                     sortKey, pageSize);
 
             list = new CertRecordList(vlist);
@@ -1212,7 +1212,7 @@ public class CertificateRepository extends Repository
             String fromVal = "0";
             try {
                 if (from != null) {
-                    int fv = Integer.parseInt(from);
+                    Integer.parseInt(from);
                     fromVal = from;
                 }
             } catch (Exception e1) {
@@ -1515,8 +1515,6 @@ public class CertificateRepository extends Repository
     public ICertRecordList getInvalidCertsByNotBeforeDate(Date date, int pageSize)
             throws EBaseException {
 
-        String now = null;
-
         Date rightNow = CMS.getCurrentDate();
 
         ICertRecordList list = null;
@@ -1555,8 +1553,6 @@ public class CertificateRepository extends Repository
     public ICertRecordList getValidCertsByNotAfterDate(Date date, int pageSize)
             throws EBaseException {
 
-        String now = null;
-
         ICertRecordList list = null;
         IDBSSession s = mDBService.createSession();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
index 34e50c711636c64da6910dccae0aba0a824e3fe4..941b0552d9de19796f679662117146a2cadd3b0f 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
@@ -34,12 +34,12 @@ import com.netscape.certsrv.dbs.keydb.IKeyRecordList;
  */
 public class KeyRecordList implements IKeyRecordList {
 
-    private IDBVirtualList<Object> mVlist = null;
+    private IDBVirtualList<IKeyRecord> mVlist = null;
 
     /**
      * Constructs a key list.
      */
-    public KeyRecordList(IDBVirtualList<Object> vlist) {
+    public KeyRecordList(IDBVirtualList<IKeyRecord> vlist) {
         mVlist = vlist;
     }
 
@@ -62,7 +62,7 @@ public class KeyRecordList implements IKeyRecordList {
     }
 
     public IKeyRecord getKeyRecord(int i) {
-        IKeyRecord record = (IKeyRecord) mVlist.getElementAt(i);
+        IKeyRecord record = mVlist.getElementAt(i);
 
         if (record == null)
             return null;
@@ -78,7 +78,7 @@ public class KeyRecordList implements IKeyRecordList {
         Vector<IKeyRecord> entries = new Vector<IKeyRecord>();
 
         for (int i = startidx; i <= endidx; i++) {
-            IKeyRecord element = (IKeyRecord) mVlist.getElementAt(i);
+            IKeyRecord element = mVlist.getElementAt(i);
 
             if (element != null) {
                 entries.addElement(element);
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
index 269a94c9d312e3e4831a74224d8dc0cea5f4b760..a5b9c48f8bdbf147a0e4969add2848a673e35702 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
@@ -21,6 +21,7 @@ import java.math.BigInteger;
 import java.security.PublicKey;
 import java.util.Date;
 import java.util.Enumeration;
+import java.util.Vector;
 
 import netscape.security.x509.X500Name;
 
@@ -359,32 +360,38 @@ public class KeyRepository extends Repository implements IKeyRepository {
         return result;
     }
 
-    public Enumeration<Object> searchKeys(String filter, int maxSize)
+    public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<IKeyRecord> v = new Vector<IKeyRecord>();
 
         try {
-            e = s.search(getDN(), filter, maxSize);
+            IDBSearchResults sr = s.search(getDN(), filter, maxSize);
+            while (sr.hasMoreElements()) {
+                v.add((IKeyRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
-    public Enumeration<Object> searchKeys(String filter, int maxSize, int timeLimit)
+    public Enumeration<IKeyRecord> searchKeys(String filter, int maxSize, int timeLimit)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration<Object> e = null;
+        Vector<IKeyRecord> v = new Vector<IKeyRecord>();
 
         try {
-            e = s.search(getDN(), filter, maxSize, timeLimit);
+            IDBSearchResults sr = s.search(getDN(), filter, maxSize, timeLimit);
+            while (sr.hasMoreElements()) {
+                v.add((IKeyRecord) sr.nextElement());
+            }
         } finally {
             if (s != null)
                 s.close();
         }
-        return e;
+        return v.elements();
     }
 
     /**
@@ -405,7 +412,7 @@ public class KeyRepository extends Repository implements IKeyRepository {
         try {
             if (s != null) {
                 list = new KeyRecordList(
-                        s.createVirtualList(getDN(), "(&(objectclass=" +
+                        s.<IKeyRecord>createVirtualList(getDN(), "(&(objectclass=" +
                                 KeyRecord.class.getName() + ")" + filter + ")",
                                 attrs, sortKey, pageSize));
             }
@@ -435,7 +442,7 @@ public class KeyRepository extends Repository implements IKeyRepository {
         try {
             if (s != null) {
                 list = new KeyRecordList(
-                        s.createVirtualList(getDN(), "(&(objectclass=" +
+                        s.<IKeyRecord>createVirtualList(getDN(), "(&(objectclass=" +
                                 KeyRecord.class.getName() + ")" + filter + ")",
                                 attrs, jumpToVal, sortKey, pageSize));
             }
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/LdapFilterConverter.java b/pki/base/common/src/com/netscape/cmscore/dbs/LdapFilterConverter.java
index 74ac7ca9673ee024937425f8d061fbee23554f0a..ff867bf52edbff986fa65695bead89f826f2f4fe 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/LdapFilterConverter.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/LdapFilterConverter.java
@@ -34,12 +34,12 @@ import com.netscape.certsrv.dbs.IFilterConverter;
  */
 public class LdapFilterConverter implements IFilterConverter {
 
-    private Hashtable mReg = null;
+    private Hashtable<String, IDBAttrMapper> mReg = null;
 
     /**
      * Constructs filter convertor.
      */
-    public LdapFilterConverter(Hashtable reg) {
+    public LdapFilterConverter(Hashtable<String, IDBAttrMapper> reg) {
         mReg = reg;
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java
index f4d8cabeba043eaca86c3972781454a749118ff1..8b66d02cabd0e75597ac7db2bf6ab44499f604f9 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java
@@ -44,7 +44,7 @@ import com.netscape.cmscore.cert.CertUtils;
 public class PublicKeyMapper implements IDBAttrMapper {
 
     private String mLdapName = null;
-    private Vector v = new Vector();
+    private Vector<String> v = new Vector<String>();
 
     private ILogger mLogger = CMS.getLogger();
 
@@ -59,7 +59,7 @@ public class PublicKeyMapper implements IDBAttrMapper {
     /**
      * Lists a list of supported ldap attribute names.
      */
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return v.elements();
     }
 
@@ -95,7 +95,7 @@ public class PublicKeyMapper implements IDBAttrMapper {
         int i = value.indexOf("#");
 
         if (i != -1) {
-            String tag = value.substring(0, i);
+            //String tag = value.substring(0, i);
             String val = value.substring(i + 1);
 
             try {
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
index 856a8c59193740db53d61aa1ada8e8246a51183b..18f0c8e3d2388174baf02ea1cf42e478f998d007 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
@@ -31,7 +31,6 @@ import netscape.security.extensions.NSCertTypeExtension;
 import netscape.security.x509.BasicConstraintsExtension;
 import netscape.security.x509.Extension;
 import netscape.security.x509.X509CertImpl;
-import netscape.security.x509.X509CertInfo;
 import netscape.security.x509.X509Key;
 
 import com.netscape.certsrv.apps.CMS;
@@ -250,7 +249,6 @@ public class X509CertImplMapper implements IDBAttrMapper {
             //      LDAPAttribute attr = attrs.getAttribute(
             //  	  Schema.LDAP_ATTR_SIGNED_CERT);
 
-            X509CertInfo certinfo = new X509CertInfo();
             LDAPAttribute attr = attrs.getAttribute(
                     CertDBSchema.LDAP_ATTR_SIGNED_CERT);
 
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
index 97297de48f554b83f6a89d80e36c869f4b952aed..bbe86e8a535dfb03bcb93321a404b94925ab29b2 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPublishModule.java
@@ -43,7 +43,6 @@ import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
 import com.netscape.certsrv.ldap.ELdapException;
 import com.netscape.certsrv.ldap.ILdapConnFactory;
 import com.netscape.certsrv.logging.ILogger;
-import com.netscape.certsrv.publish.ILdapCrlMapper;
 import com.netscape.certsrv.publish.ILdapMapper;
 import com.netscape.certsrv.publish.ILdapPlugin;
 import com.netscape.certsrv.publish.ILdapPublishModule;
@@ -74,13 +73,13 @@ public class LdapPublishModule implements ILdapPublishModule {
      * to publish the crl.
      * When publishers are null, the certs are not published.
      */
-    protected Hashtable mMappers = new Hashtable();
+    protected Hashtable<String, LdapMappers> mMappers = new Hashtable<String, LdapMappers>();
 
     /**
      * handlers for request types (events)
      * values implement IRequestListener
      */
-    protected Hashtable mEventHandlers = new Hashtable();
+    protected Hashtable<String, IRequestListener> mEventHandlers = new Hashtable<String, IRequestListener>();
 
     /**
      * instantiate connection factory.
@@ -274,9 +273,8 @@ public class LdapPublishModule implements ILdapPublishModule {
 
     public void accept(IRequest r) {
         String type = r.getRequestType();
-        boolean error = false;
 
-        IRequestListener handler = (IRequestListener) mEventHandlers.get(type);
+        IRequestListener handler = mEventHandlers.get(type);
 
         if (handler == null) {
             CMS.debug(
@@ -432,8 +430,6 @@ public class LdapPublishModule implements ILdapPublishModule {
      */
     public void publish(X509CRLImpl crl)
             throws ELdapException {
-        ILdapCrlMapper mapper = null;
-        ILdapPublisher publisher = null;
 
         LdapMappers mappers = getMappers(PROP_TYPE_CRL);
 
@@ -575,7 +571,6 @@ class HandleEnrollment implements IRequestListener {
 
         // publish
         Integer results[] = new Integer[certs.length];
-        X509CertImpl cert;
 
         for (int i = 0; i < certs.length; i++) {
             try {
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapRequestListener.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapRequestListener.java
index 2f6cadf68de8067a665859fe08c53afaa568adf2..cbeeed2df9e199316bfb9f59238a90b984df96ed 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapRequestListener.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapRequestListener.java
@@ -48,7 +48,7 @@ public class LdapRequestListener implements IRequestListener {
      * handlers for request types (events)
      * each handler implement IRequestListener
      */
-    private Hashtable mRequestListeners = new Hashtable();
+    private Hashtable<String, IRequestListener> mRequestListeners = new Hashtable<String, IRequestListener>();
 
     private IPublisherProcessor mPublisherProcessor = null;
 
@@ -151,7 +151,7 @@ public class LdapRequestListener implements IRequestListener {
     public void accept(IRequest r) {
         String type = r.getRequestType();
 
-        IRequestListener handler = (IRequestListener) mRequestListeners.get(type);
+        IRequestListener handler = mRequestListeners.get(type);
 
         if (handler == null) {
             CMS.debug(
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
index d2761e791214fd5116d132be56e450d8a215d942..b1af367b9d8ff20e06380b50927f6f753ca0019d 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
@@ -38,7 +38,7 @@ public class LdapAuthInfo implements ILdapAuthInfo {
 
     private boolean mInited = false;
 
-    private static Hashtable passwords = new Hashtable();
+    private static Hashtable<String, String> passwords = new Hashtable<String, String>();
 
     /**
      * must call init(config) after this constructor.
@@ -148,7 +148,7 @@ public class LdapAuthInfo implements ILdapAuthInfo {
 
             if (mParms[1] == null) {
                 CMS.debug("LdapAuthInfo: init: try getting from memory cache");
-                mParms[1] = (String) passwords.get(prompt);
+                mParms[1] = passwords.get(prompt);
                 if (mParms[1] != null) {
                     inMem = true;
                     CMS.debug("LdapAuthInfo: init: got password from memory");
diff --git a/pki/base/common/src/com/netscape/cmscore/listeners/ListenerPlugin.java b/pki/base/common/src/com/netscape/cmscore/listeners/ListenerPlugin.java
index 720af4939352047c08661eac84fb822800a0043e..baedb98de137406dc69f029aa00170a0097c533f 100644
--- a/pki/base/common/src/com/netscape/cmscore/listeners/ListenerPlugin.java
+++ b/pki/base/common/src/com/netscape/cmscore/listeners/ListenerPlugin.java
@@ -27,7 +27,7 @@ package com.netscape.cmscore.listeners;
 public class ListenerPlugin {
     protected String mId = null;
     protected String mClassPath = null;
-    protected Class mClass = null;
+    protected Class<?> mClass = null;
 
     /**
      * Constructs a Listener plugin.
diff --git a/pki/base/common/src/com/netscape/cmscore/logging/Logger.java b/pki/base/common/src/com/netscape/cmscore/logging/Logger.java
index 9c814e70cac3f9ac6137f094e0f8dd6138f5d703..79895e263c1df4617277d5a0c4aa0b5706fc62ea 100644
--- a/pki/base/common/src/com/netscape/cmscore/logging/Logger.java
+++ b/pki/base/common/src/com/netscape/cmscore/logging/Logger.java
@@ -38,7 +38,7 @@ public class Logger implements ILogger {
 
     protected static Logger mLogger = new Logger();
     protected ILogQueue mLogQueue = null;
-    protected Hashtable mFactories = new Hashtable();
+    protected Hashtable<Integer, ILogEventFactory> mFactories = new Hashtable<Integer, ILogEventFactory>();
 
     /**
      * Constructs a generic logger, and registers a list
@@ -74,7 +74,7 @@ public class Logger implements ILogger {
      * @param f the event factory name
      */
     public void register(int evtClass, ILogEventFactory f) {
-        mFactories.put(Integer.toString(evtClass), f);
+        mFactories.put(evtClass, f);
     }
 
     //************** default level ****************
@@ -354,8 +354,7 @@ public class Logger implements ILogger {
     //XXXXXXXXXXX prop is out dated!!!! XXXXXXXXXXXXXXX
     public ILogEvent create(int evtClass, Properties prop, int source, int level,
             String msg, Object params[], boolean multiline) {
-        ILogEventFactory f = (ILogEventFactory) mFactories.get(
-                Integer.toString(evtClass));
+        ILogEventFactory f = mFactories.get(evtClass);
 
         if (f == null)
             return null;
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 6a5cb1abcd2625e8d0fe8da66f8bdf155912995c..0e252f523ab1d5f96e114fb9f02cd803a090f607 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -30,7 +30,6 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Locale;
-import java.util.Map;
 import java.util.Set;
 import java.util.Vector;
 
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 e78ff0daf3f8d11affd97576ee32b62b1a04c1ed..b23e6fff4205ac2ab48678fff339ca9d57bc10ba 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestQueue.java
@@ -354,7 +354,7 @@ public class RequestQueue
 
     }
 
-    protected Enumeration getRawList() {
+    protected Enumeration<RequestId> getRawList() {
         IDBSearchResults results = null;
         IDBSSession dbs = null;
 
@@ -517,7 +517,7 @@ public class RequestQueue
     public IRequestVirtualList
             getPagedRequestsByFilter(RequestId from, boolean jumpToEnd, String filter, int pageSize,
                     String sortKey) {
-        IDBVirtualList results = null;
+        IDBVirtualList<Object> results = null;
         IDBSSession dbs = null;
 
         try {
@@ -633,7 +633,7 @@ class SearchEnumeration
         return mResults.hasMoreElements();
     }
 
-    public Object nextElement() {
+    public RequestId nextElement() {
         return nextRequestId();
     }
 
@@ -699,11 +699,11 @@ class ListEnumeration
 
     }
 
-    ListEnumeration(RequestQueue queue, IDBVirtualList list) {
+    ListEnumeration(RequestQueue queue, IDBVirtualList<Object> list) {
         mQueue = queue;
         mList = list;
     }
 
     protected RequestQueue mQueue;
-    protected IDBVirtualList mList;
+    protected IDBVirtualList<Object> mList;
 }
diff --git a/pki/base/common/src/com/netscape/cmscore/request/RequestRepository.java b/pki/base/common/src/com/netscape/cmscore/request/RequestRepository.java
index 92c162ca8a701d9b33117cb0e32700f740a569cc..0a4a4ebf9064350e532ed074b25677b94aac352a 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestRepository.java
@@ -18,12 +18,12 @@
 package com.netscape.cmscore.request;
 
 import java.math.BigInteger;
-import java.util.Enumeration;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.EDBException;
 import com.netscape.certsrv.dbs.IDBSSession;
+import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
 import com.netscape.certsrv.dbs.Modification;
 import com.netscape.certsrv.dbs.ModificationSet;
@@ -109,10 +109,10 @@ class RequestRepository
     public void removeAllObjects() throws EBaseException {
         IDBSSession s = mDB.createSession();
         try {
-            Enumeration e = s.search(getBaseDN(),
+            IDBSearchResults sr = s.search(getBaseDN(),
                                "(" + RequestRecord.ATTR_REQUEST_ID + "=*)");
-            while (e.hasMoreElements()) {
-                RequestRecord r = (RequestRecord) e.nextElement();
+            while (sr.hasMoreElements()) {
+                RequestRecord r = (RequestRecord) sr.nextElement();
                 String name = "cn" + "=" +
                         r.getRequestId().toString() + "," + getBaseDN();
                 s.delete(name);
diff --git a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
index a4f6ee9a02cb0e6f1054dab2ccf40d3435872f68..b6aaa02cc7308f80940397d149cc076d2bb85c38 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
@@ -1692,7 +1692,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
                 for (int i = 0; i < allcerts.length; i++) {
                     try {
                         X509CertImpl certImpl = new X509CertImpl(allcerts[i].getEncoded());
-                        String certIssuerName = certImpl.getSubjectDN().getName();
                         Principal certPrincipal = certImpl.getSubjectDN();
                         DN certdn = new DN(certPrincipal.getName());
                         BigInteger certSerialNo = certImpl.getSerialNumber();
diff --git a/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java b/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
index e0fe0252d9911b5cade6403a4e848f0216cae88a..4142f6abe02db0193111f37ba99f3608a59d1be9 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
@@ -17,7 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmscore.security;
 
-import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -258,7 +257,7 @@ public class PWsdrCache {
         if (dcrypts != null) {
             // converts to Hashtable, replace if tag exists, add
             //                if tag doesn't exist
-            Hashtable ht = string2Hashtable(dcrypts);
+            Hashtable<String, String> ht = string2Hashtable(dcrypts);
 
             if (ht.containsKey(tag) == false) {
                 debug("adding new tag: " + tag);
@@ -288,7 +287,7 @@ public class PWsdrCache {
         if (dcrypts != null) {
             // converts to Hashtable, replace if tag exists, add
             //                if tag doesn't exist
-            Hashtable ht = string2Hashtable(dcrypts);
+            Hashtable<String, String> ht = string2Hashtable(dcrypts);
 
             if (ht.containsKey(tag) == false) {
                 debug("tag: " + tag + " does not exist");
@@ -489,7 +488,7 @@ public class PWsdrCache {
      * if tag not found, return null, which will cause it to give up
      */
     public Password getEntry(String tag) {
-        Hashtable pwTable = null;
+        Hashtable<String, String> pwTable = null;
         String pw = null;
 
         debug("in getEntry, tag=" + tag);
@@ -555,8 +554,6 @@ public class PWsdrCache {
             Process process = Runtime.getRuntime().exec(cmds);
 
             process.waitFor();
-            BufferedReader pOut = null;
-            String l = null;
 
             if (process.exitValue() == 0) {
 
@@ -604,7 +601,6 @@ public class PWsdrCache {
      * list passwds in pwcache.
      */
     public boolean pprint() {
-        String bufs = null;
         String dcrypts = null;
 
         try {
diff --git a/pki/base/common/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java b/pki/base/common/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
index 9167cbf11f05ea26eeb9528c70462b05adafd0b9..6fac3d9d7a0c7153baa8a93177fb284705075f1e 100644
--- a/pki/base/common/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
@@ -82,9 +82,9 @@ public class SelfTestSubsystem
     private String mRootPrefix = null;
     private String mPrefix = null;
 
-    public Hashtable mSelfTestInstances = new Hashtable();
-    public Vector mOnDemandOrder = new Vector();
-    public Vector mStartupOrder = new Vector();
+    public Hashtable<String, ISelfTest> mSelfTestInstances = new Hashtable<String, ISelfTest>();
+    public Vector<SelfTestOrderedInstance> mOnDemandOrder = new Vector<SelfTestOrderedInstance>();
+    public Vector<SelfTestOrderedInstance> mStartupOrder = new Vector<SelfTestOrderedInstance>();
 
     ///////////////////////////
     // ISubsystem parameters //
diff --git a/pki/base/common/src/com/netscape/cmscore/util/StatsSubsystem.java b/pki/base/common/src/com/netscape/cmscore/util/StatsSubsystem.java
index 57eb53f2e4bab97de2fc2aae0fefca62f86c6362..222964261a9d1c90be7f0eb88785646ab13c887d 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/StatsSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/StatsSubsystem.java
@@ -41,7 +41,7 @@ public class StatsSubsystem implements IStatsSubsystem {
     private String mId = null;
     private StatsEvent mAllTrans = new StatsEvent(null);
     private Date mStartTime = new Date();
-    private Hashtable mHashtable = new Hashtable();
+    private Hashtable<String, Vector<StatsMilestone>> mHashtable = new Hashtable<String, Vector<StatsMilestone>>();
 
     /**
      * Constructs a certificate server.
@@ -90,11 +90,11 @@ public class StatsSubsystem implements IStatsSubsystem {
 
     public void startTiming(String id, boolean mainAction) {
         Thread t = Thread.currentThread();
-        Vector milestones = null;
+        Vector<StatsMilestone> milestones = null;
         if (mHashtable.containsKey(t.toString())) {
-            milestones = (Vector) mHashtable.get(t.toString());
+            milestones = mHashtable.get(t.toString());
         } else {
-            milestones = new Vector();
+            milestones = new Vector<StatsMilestone>();
             mHashtable.put(t.toString(), milestones);
         }
         long startTime = CMS.getCurrentDate().getTime();
@@ -128,11 +128,11 @@ public class StatsSubsystem implements IStatsSubsystem {
         if (!mHashtable.containsKey(t.toString())) {
             return; /* error */
         }
-        Vector milestones = (Vector) mHashtable.get(t.toString());
+        Vector<StatsMilestone> milestones = mHashtable.get(t.toString());
         if (milestones.size() == 0) {
             return; /* error */
         }
-        StatsMilestone last = (StatsMilestone) milestones.remove(milestones.size() - 1);
+        StatsMilestone last = milestones.remove(milestones.size() - 1);
         StatsEvent st = last.getStatsEvent();
         st.incNoOfOperations(1);
         st.incTimeTaken(endTime - last.getStartTime());
diff --git a/pki/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java b/pki/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
index 699a924d0c3a083108ac23ef45ffff5d280aacfa..d3177f62c3d7002a0e0dac85ce1780d042761440 100644
--- a/pki/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/dbs/CertRecordListTest.java
@@ -22,6 +22,7 @@ import junit.framework.TestSuite;
 
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.IElementProcessor;
+import com.netscape.certsrv.dbs.certdb.ICertRecord;
 import com.netscape.cmscore.test.CMSBaseTestCase;
 
 public class CertRecordListTest extends CMSBaseTestCase {
@@ -41,7 +42,7 @@ public class CertRecordListTest extends CMSBaseTestCase {
     }
 
     public void testProcessCertRecordsUsesSize() throws EBaseException {
-        DBVirtualListStub dbList = new DBVirtualListStub();
+        DBVirtualListStub<ICertRecord> dbList = new DBVirtualListStub<ICertRecord>();
         dbList.size = 5;
 
         CertRecordList certList = new CertRecordList(dbList);
@@ -57,12 +58,12 @@ public class CertRecordListTest extends CMSBaseTestCase {
         assertEquals(7, dbList.lastIndexGetElementAtCalledWith);
     }
 
-    public class DBVirtualListStub extends DBVirtualListDefaultStub {
+    public class DBVirtualListStub<T> extends DBVirtualListDefaultStub<T> {
         public int size = 0;
         public int getElementAtCallCount = 0;
         public int lastIndexGetElementAtCalledWith = 0;
 
-        public Object getElementAt(int index) {
+        public T getElementAt(int index) {
             getElementAtCallCount++;
             lastIndexGetElementAtCalledWith = index;
 
diff --git a/pki/base/common/test/com/netscape/cmscore/dbs/DBSSessionDefaultStub.java b/pki/base/common/test/com/netscape/cmscore/dbs/DBSSessionDefaultStub.java
index 9ce03b55eb2093c93a290faadd0367186e8e59ec..c00be1f4537ba3d13cdcdf6e47e656634c810d64 100644
--- a/pki/base/common/test/com/netscape/cmscore/dbs/DBSSessionDefaultStub.java
+++ b/pki/base/common/test/com/netscape/cmscore/dbs/DBSSessionDefaultStub.java
@@ -56,7 +56,7 @@ public class DBSSessionDefaultStub implements IDBSSession {
         return null;
     }
 
-    public IDBVirtualList createVirtualList(String base, String filter, String attrs[]) throws EBaseException {
+    public <T> IDBVirtualList<T> createVirtualList(String base, String filter, String attrs[]) throws EBaseException {
         return null;
     }
 
@@ -64,12 +64,12 @@ public class DBSSessionDefaultStub implements IDBSSession {
         return null;
     }
 
-    public IDBVirtualList createVirtualList(String base, String filter, String attrs[], String sortKey, int pageSize)
+    public <T> IDBVirtualList<T> createVirtualList(String base, String filter, String attrs[], String sortKey, int pageSize)
             throws EBaseException {
         return null;
     }
 
-    public IDBVirtualList createVirtualList(String base, String filter, String attrs[], String startFrom,
+    public <T> IDBVirtualList<T> createVirtualList(String base, String filter, String attrs[], String startFrom,
             String sortKey, int pageSize) throws EBaseException {
         return null;
     }
diff --git a/pki/base/common/test/com/netscape/cmscore/dbs/DBVirtualListDefaultStub.java b/pki/base/common/test/com/netscape/cmscore/dbs/DBVirtualListDefaultStub.java
index a750ad5045aa95ebbef2d43089526997bfe39275..d674bd6a65b31f296f085fd94d4c2e364aa4e126 100644
--- a/pki/base/common/test/com/netscape/cmscore/dbs/DBVirtualListDefaultStub.java
+++ b/pki/base/common/test/com/netscape/cmscore/dbs/DBVirtualListDefaultStub.java
@@ -29,7 +29,7 @@ import com.netscape.certsrv.dbs.IElementProcessor;
  * 
  * Do not put any behaviour in this class.
  */
-public class DBVirtualListDefaultStub implements IDBVirtualList {
+public class DBVirtualListDefaultStub<T> implements IDBVirtualList<T> {
 
     public void setPageSize(int size) {
     }
@@ -64,11 +64,11 @@ public class DBVirtualListDefaultStub implements IDBVirtualList {
         return false;
     }
 
-    public Object getElementAt(int index) {
+    public T getElementAt(int index) {
         return null;
     }
 
-    public Object getJumpToElementAt(int i) {
+    public T getJumpToElementAt(int i) {
         return null;
     }
 
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
index e2b1a3633203e1c322cf7c5b4e481eabf73289d5..21e3b418700a1581ab20af9449e8cadbee818f8c 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
@@ -106,8 +106,6 @@ public class CMCResponse {
 
             int numControls = controlSequence.size();
             System.out.println("Number of controls is " + numControls);
-            INTEGER bodyPartId = null;
-            String error = "";
 
             for (int i = 0; i < numControls; i++) {
                 TaggedAttribute taggedAttr = (TaggedAttribute) controlSequence.elementAt(i);
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
index 470e06cf900d56df37ddf5065700091b981780f8..e4d8106f7381c96cd94dae4bdf706659bc6e6754 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
@@ -835,7 +835,6 @@ class PWsdrCache {
      * list passwds in pwcache.
      */
     public boolean pprint() {
-        String bufs = null;
         String dcrypts = null;
 
         try {
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java b/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java
index 10956748dfade18a054305f6e0e2e114eb2f10ff..369010abf345275e7edca12dd71fbb26903fe9a3 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java
@@ -23,6 +23,7 @@ import java.util.Date;
 import java.util.Hashtable;
 
 import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X500Name;
 import netscape.security.x509.X509CRLImpl;
 
@@ -76,10 +77,10 @@ public class TestCRLSigning {
         // generate revoked certificates
         long startPutting = System.currentTimeMillis();
         Date curDate = new Date();
-        Hashtable badCerts = new Hashtable();
+        Hashtable<BigInteger, RevokedCertificate> badCerts = new Hashtable<BigInteger, RevokedCertificate>();
         int n = Integer.parseInt(num);
         for (int i = 0; i < n; i++) {
-            badCerts.put(Integer.toString(i),
+            badCerts.put(new BigInteger(Integer.toString(i)),
                     new RevokedCertImpl(new BigInteger(Integer.toString(i)), curDate));
         }
         long endPutting = System.currentTimeMillis();
diff --git a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
index b9df360b09b6db332228bccb157af9fe4b6f9c3f..e32009c034972cf30c1079692800eba8971bb171 100644
--- a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
+++ b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
@@ -517,7 +517,7 @@ public class EnrollmentService implements IService {
             privateKeyIn.getSequence(0);
             DerValue privateKeyDer = new DerValue(privateKeyIn.getOctetString());
             DerInputStream privateKeyDerIn = privateKeyDer.data;
-            BigInt privateKeyVersion = privateKeyDerIn.getInteger();
+            //BigInt privateKeyVersion = privateKeyDerIn.getInteger();
             BigInt privateKeyModulus = privateKeyDerIn.getInteger();
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
@@ -553,7 +553,7 @@ public class EnrollmentService implements IService {
      */
     public static PKIArchiveOptionsContainer[] getPKIArchiveOptions(String crmfBlob)
             throws EBaseException {
-        Vector options = new Vector();
+        Vector<PKIArchiveOptionsContainer> options = new Vector<PKIArchiveOptionsContainer>();
 
         if (CMS.debugOn())
             CMS.debug("EnrollmentService::getPKIArchiveOptions> crmfBlob=" + crmfBlob);
diff --git a/pki/base/kra/src/com/netscape/kra/KRAService.java b/pki/base/kra/src/com/netscape/kra/KRAService.java
index 916ebe3bb23b7e059009eaa333aa20c8b34db175..03986671ec6914a23c6b4d3ad8f1e7dad5f756da 100644
--- a/pki/base/kra/src/com/netscape/kra/KRAService.java
+++ b/pki/base/kra/src/com/netscape/kra/KRAService.java
@@ -49,7 +49,7 @@ public class KRAService implements IService {
 
     // private variables
     private IKeyRecoveryAuthority mKRA = null;
-    private Hashtable mServices = new Hashtable();
+    private Hashtable<String, IService> mServices = new Hashtable<String, IService>();
 
     /**
      * Constructs KRA service.
@@ -75,8 +75,7 @@ public class KRAService implements IService {
                     r.getRequestId().toString());
         mKRA.log(ILogger.LL_INFO, "KRA services request " +
                 r.getRequestId().toString());
-        IService s = (IService) mServices.get(
-                r.getRequestType());
+        IService s = mServices.get(r.getRequestType());
 
         if (s == null) {
             r.setExtData(IRequest.RESULT, IRequest.RES_ERROR);
diff --git a/pki/base/kra/src/com/netscape/kra/RecoveryService.java b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
index 8958695c1c9fabbb335ec05fe9ea68b8e3ee4a27..0e9c7d2bc6f231c62724a14c017abeae3fbe2262 100644
--- a/pki/base/kra/src/com/netscape/kra/RecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
@@ -168,7 +168,7 @@ public class RecoveryService implements IService {
         // byte publicKey[] = (byte[])request.get(ATTR_PUBLIC_KEY_DATA);
         // X500Name owner = (X500Name)request.get(ATTR_OWNER_NAME);
 
-        Hashtable params = mKRA.getVolatileRequest(
+        Hashtable<String, Object> params = mKRA.getVolatileRequest(
                 request.getRequestId());
 
         if (params == null) {
@@ -345,7 +345,7 @@ public class RecoveryService implements IService {
             privateKeyIn.getSequence(0);
             DerValue privateKeyDer = new DerValue(privateKeyIn.getOctetString());
             DerInputStream privateKeyDerIn = privateKeyDer.data;
-            BigInt privateKeyVersion = privateKeyDerIn.getInteger();
+            //BigInt privateKeyVersion = privateKeyDerIn.getInteger();
             BigInt privateKeyModulus = privateKeyDerIn.getInteger();
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
@@ -372,7 +372,7 @@ public class RecoveryService implements IService {
      * Recovers key. (using unwrapping/wrapping on token)
      * - used when allowEncDecrypt_recovery is false
      */
-    public synchronized PrivateKey recoverKey(Hashtable request, KeyRecord keyRecord, boolean isRSA)
+    public synchronized PrivateKey recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord, boolean isRSA)
             throws EBaseException {
 
         if (!isRSA) {
@@ -437,7 +437,7 @@ public class RecoveryService implements IService {
      * @param priKey private key handle
      * @exception EBaseException failed to create P12 file
      */
-    public void createPFX(IRequest request, Hashtable params,
+    public void createPFX(IRequest request, Hashtable<String, Object> params,
             PrivateKey priKey, CryptoToken ct) throws EBaseException {
         CMS.debug("RecoverService: createPFX() allowEncDecrypt_recovery=false");
         try {
@@ -531,7 +531,7 @@ public class RecoveryService implements IService {
      * Recovers key.
      * - used when allowEncDecrypt_recovery is true
      */
-    public synchronized byte[] recoverKey(Hashtable request, KeyRecord keyRecord)
+    public synchronized byte[] recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord)
             throws EBaseException {
         if (CMS.getConfigStore().getBoolean("kra.keySplitting")) {
             Credential creds[] = (Credential[])
@@ -562,7 +562,7 @@ public class RecoveryService implements IService {
      * @param priData decrypted private key (PrivateKeyInfo)
      * @exception EBaseException failed to create P12 file
      */
-    public void createPFX(IRequest request, Hashtable params,
+    public void createPFX(IRequest request, Hashtable<String, Object> params,
             byte priData[]) throws EBaseException {
         CMS.debug("RecoverService: createPFX() allowEncDecrypt_recovery=true");
         try {
diff --git a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
index 0b84926d1d895532ae656730d9b65abc8025cebb..3a860f447c1d5ff1688e3e00e97e56b2dd10ca5b 100644
--- a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
@@ -225,7 +225,7 @@ public class TokenKeyRecoveryService implements IService {
                     (String) sContext.get(SessionContext.USER_ID);
         }
 
-        Hashtable params = mKRA.getVolatileRequest(
+        Hashtable<String, Object> params = mKRA.getVolatileRequest(
                  request.getRequestId());
 
         if (params == null) {
@@ -579,7 +579,7 @@ public class TokenKeyRecoveryService implements IService {
     /**
      * Recovers key.
      */
-    public synchronized byte[] recoverKey(Hashtable request, KeyRecord keyRecord)
+    public synchronized byte[] recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord)
             throws EBaseException {
         /*
             Credential creds[] = (Credential[])
diff --git a/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java b/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
index 91763ed83f023b8345f38e145914b53d981ae94b..466a59b57c899f77e23cdabbe3c16230858ce31d 100644
--- a/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
+++ b/pki/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
@@ -81,13 +81,13 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
 
     public final static OBJECT_IDENTIFIER OCSP_NONCE = new OBJECT_IDENTIFIER("1.3.6.1.5.5.7.48.1.2");
 
-    private Hashtable mStores = new Hashtable();
+    private Hashtable<String, IOCSPStore> mStores = new Hashtable<String, IOCSPStore>();
     private String mId = "ocsp";
     private IConfigStore mConfig = null;
     private SigningUnit mSigningUnit;
     private CertificateChain mCertChain = null;
     private X509CertImpl mCert = null;
-    private String[] mSigningAlgorithms = null;
+    //private String[] mSigningAlgorithms = null;
     private X500Name mName = null;
     private String mNickname = null;
     private String[] mOCSPSigningAlgorithms = null;
@@ -172,7 +172,7 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
      * Retrieves the specificed OCSP store.
      */
     public IOCSPStore getOCSPStore(String id) {
-        return (IOCSPStore) mStores.get(id);
+        return mStores.get(id);
     }
 
     public IConfigStore getOCSPStoreConfig(String id) {
@@ -452,7 +452,6 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
 
             DerOutputStream tmpChain = new DerOutputStream();
             DerOutputStream tmp1 = new DerOutputStream();
-            DerOutputStream outChain = new DerOutputStream();
             java.security.cert.X509Certificate chains[] =
                     mCertChain.getChain();
 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
index 3dd708a3a22877f3fb643d7d5e82aaa0f1f769ed..caf393ad9b416c6fd95771efabde7592e4864fa3 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java
@@ -225,7 +225,6 @@ public class ConfigureDRM {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -273,7 +272,6 @@ public class ConfigureDRM {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -299,14 +297,8 @@ public class ConfigureDRM {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-        String query_string = null;
-
-        query_string = "p=4" + "&op=next" + "&xml=true";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        String query_string = "p=4" + "&op=next" + "&xml=true";
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
 
         return true;
 
@@ -314,10 +306,7 @@ public class ConfigureDRM {
 
     public boolean SecurityDomainLoginPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
-            ByteArrayInputStream bais = null;
-            ParseXML px = new ParseXML();
 
             String kra_url = "https://" + cs_hostname + ":" + cs_port +
                             "/kra/admin/console/config/wizard" +
@@ -374,7 +363,6 @@ public class ConfigureDRM {
     }
 
     public boolean SubsystemPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -424,7 +412,6 @@ public class ConfigureDRM {
     }
 
     public boolean LdapConnectionPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -452,7 +439,6 @@ public class ConfigureDRM {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -540,7 +526,6 @@ public class ConfigureDRM {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -611,14 +596,9 @@ public class ConfigureDRM {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> pp_list = null;
 
         String query_string = "p=10" + "&op=next" + "&xml=true" +
                             "&subsystem=" +
@@ -648,7 +628,6 @@ public class ConfigureDRM {
     }
 
     public boolean BackupPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -669,7 +648,6 @@ public class ConfigureDRM {
     }
 
     public boolean SavePKCS12Panel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -692,7 +670,7 @@ public class ConfigureDRM {
             String line = null;
             while ((line = br.readLine()) != null)
                 System.out.println("Error: " + line);
-            int exitVal = proc.waitFor();
+            proc.waitFor();
 
             // verify p12 file
 
@@ -729,7 +707,6 @@ public class ConfigureDRM {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -788,8 +765,6 @@ public class ConfigureDRM {
     public boolean AdminCertImportPanel() {
         boolean st = false;
         HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String query_string = "serialNumber=" + admin_serial_number +
                             "&importCert=" + "true";
@@ -826,7 +801,6 @@ public class ConfigureDRM {
     }
 
     public boolean UpdateDomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
index 7e481c79159eacb78212c04e1ba579181937fa01..bf599ed4c0a8446d4ccd4125ed11368eba79071a 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
@@ -207,7 +207,6 @@ public class ConfigureOCSP {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -257,7 +256,6 @@ public class ConfigureOCSP {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -283,14 +281,10 @@ public class ConfigureOCSP {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
         String query_string = null;
 
         query_string = "p=4" + "&op=next" + "&xml=true";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
         // parse xml
         // bais = new ByteArrayInputStream(hr.getHTML().getBytes());
         // px.parse(bais);
@@ -301,10 +295,7 @@ public class ConfigureOCSP {
     }
 
     public boolean SecurityDomainLoginPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String ocsp_url = "https://" + cs_hostname + ":" + cs_port +
                             "/ocsp/admin/console/config/wizard" +
@@ -349,7 +340,6 @@ public class ConfigureOCSP {
     }
 
     public boolean SubsystemPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -369,7 +359,6 @@ public class ConfigureOCSP {
     }
 
     public boolean LdapConnectionPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -397,7 +386,6 @@ public class ConfigureOCSP {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -460,7 +448,6 @@ public class ConfigureOCSP {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -518,14 +505,9 @@ public class ConfigureOCSP {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> pp_list = null;
 
         String query_string = "p=10" + "&op=next" + "&xml=true" +
                             "&subsystem=" +
@@ -556,7 +538,6 @@ public class ConfigureOCSP {
     }
 
     public boolean BackupPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -577,10 +558,7 @@ public class ConfigureOCSP {
     }
 
     public boolean SavePKCS12Panel() {
-        boolean st = false;
         HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String query_string = "";
 
@@ -601,7 +579,7 @@ public class ConfigureOCSP {
             String line = null;
             while ((line = br.readLine()) != null)
                 System.out.println("Error: " + line);
-            int exitVal = proc.waitFor();
+            proc.waitFor();
 
             // verify p12 file
 
@@ -628,7 +606,6 @@ public class ConfigureOCSP {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -690,8 +667,6 @@ public class ConfigureOCSP {
     public boolean AdminCertImportPanel() {
         boolean st = false;
         HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String query_string = "serialNumber=" + admin_serial_number +
                             "&importCert=" + "true" +
@@ -729,7 +704,6 @@ public class ConfigureOCSP {
     }
 
     public boolean UpdateDomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
index a9345cc5f01c51ba81abb10c6dba84a5b32bf739..d8a6c7feb9226f86409527e26c9923e7ce41b7bd 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
@@ -20,7 +20,6 @@ package com.netscape.pkisilent;
 
 import java.io.ByteArrayInputStream;
 import java.net.URLEncoder;
-import java.util.ArrayList;
 
 import com.netscape.osutil.OSUtil;
 import com.netscape.pkisilent.argparser.ArgParser;
@@ -160,7 +159,6 @@ public class ConfigureRA {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -186,24 +184,15 @@ public class ConfigureRA {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-        String query_string = null;
-
-        query_string = "p=2" + "&op=next" + "&xml=true";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        String query_string = "p=2" + "&op=next" + "&xml=true";
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
 
         return true;
 
     }
 
     public boolean SecurityDomainLoginPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String ra_url = "https://" + cs_hostname + ":" + cs_port +
                             "/ra/admin/console/config/wizard" +
@@ -247,7 +236,6 @@ public class ConfigureRA {
     }
 
     public boolean SubsystemPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -285,7 +273,6 @@ public class ConfigureRA {
     }
 
     public boolean DBPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -305,7 +292,6 @@ public class ConfigureRA {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -363,7 +349,6 @@ public class ConfigureRA {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -392,13 +377,9 @@ public class ConfigureRA {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
 
         String ca_url = "https://" + ca_hostname + ":" + ca_ssl_port;
 
@@ -426,7 +407,6 @@ public class ConfigureRA {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -450,7 +430,6 @@ public class ConfigureRA {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java b/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
index 1c308e2c25d41abca4ffe950746618340ca1c776..d619afcc26075f9f692509a1bc4afc61de6063c1 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
@@ -248,7 +248,7 @@ public class ComCrypto {
                 System.out.println("Manager object is null");
             }
 
-            X509Certificate cert = manager.importCertPackage(tmp.getBytes(), cn);
+            manager.importCertPackage(tmp.getBytes(), cn);
 
             return true;
 
@@ -277,7 +277,7 @@ public class ComCrypto {
                 System.out.println("Manager object is null");
             }
 
-            X509Certificate cert = manager.importCACertPackage(tmp.getBytes());
+            manager.importCACertPackage(tmp.getBytes());
 
             return true;
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
index cad7d0ae3452617dea6ce7b84c62d838e5154a01..0a10f9ccb6af8bb1d3313467b97247a621457789 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -1016,7 +1016,6 @@ public class CryptoUtil {
      */
     public static void deletePrivateKey(PrivateKey prikey)
             throws CryptoManager.NotInitializedException, TokenException {
-        CryptoManager cm = CryptoManager.getInstance();
 
         try {
             CryptoToken token = prikey.getOwningToken();
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
index 791549812d90dc9e3150027b53863ef15850c443..d0bef4b2a2b7371824d03d4e748bf40f4f62df71 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
@@ -132,7 +132,7 @@ public class JssSSLSocketFactory implements ISocketFactory {
                 // report error if the nickName is invalid.
                 // So we check this ourself using
                 // findCertByNickname
-                X509Certificate cert = CryptoManager.getInstance().findCertByNickname(mClientAuthCertNickname);
+                CryptoManager.getInstance().findCertByNickname(mClientAuthCertNickname);
 
                 s.setClientCertNickname(mClientAuthCertNickname);
             }
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
index 357ae0a6cc50c9ed7682c2344a0729c1466562fd..759e9e7777e0856a9a4057d5c562e9ab367c2f8d 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordReader.java
@@ -25,5 +25,5 @@ public interface IPasswordReader {
 
     public String getPassword(String tag);
 
-    public Enumeration getTags();
+    public Enumeration<String> getTags();
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
index f2e9293d33004c2fa6893382a460bcb9f8ced57c..49b2610fa8a47cb6e9b712a05d887d22cb491c29 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/IPasswordStore.java
@@ -25,7 +25,7 @@ public interface IPasswordStore {
 
     public String getPassword(String tag);
 
-    public Enumeration getTags();
+    public Enumeration<String> getTags();
 
     public Object putPassword(String tag, String password);
 
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 91a45ca3bce9fdedd62c803287a5bf5cd5c70b58..eb43607f0fdbe1d7017886f742b5a29d64bdb587 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
@@ -22,6 +22,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Properties;
+import java.util.Vector;
 
 public class PlainPasswordFile implements IPasswordStore {
     private String mPwdPath = "";
@@ -47,8 +48,13 @@ public class PlainPasswordFile implements IPasswordStore {
     }
 
     // return an array of String-based tag
-    public Enumeration<?> getTags() {
-        return mPwdStore.propertyNames();
+    public Enumeration<String> getTags() {
+        Enumeration<?> e = mPwdStore.propertyNames();
+        Vector<String> v = new Vector<String>();
+        while (e.hasMoreElements()) {
+            v.add((String) e.nextElement());
+        }
+        return v.elements();
     }
 
     public Object putPassword(String tag, String password) {
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 10f33350c615feda77520337fa51e19866c5075b..68724a9f661a1c031edbae4a060052005fb56b90 100644
--- a/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
+++ b/pki/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
@@ -21,6 +21,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Properties;
+import java.util.Vector;
 
 public class PlainPasswordReader implements IPasswordReader {
     private String mPwdPath = "";
@@ -46,7 +47,12 @@ public class PlainPasswordReader implements IPasswordReader {
     }
 
     // return an array of String-based tag
-    public Enumeration<?> getTags() {
-        return mPwdStore.propertyNames();
+    public Enumeration<String> getTags() {
+        Enumeration<?> e = mPwdStore.propertyNames();
+        Vector<String> v = new Vector<String>();
+        while (e.hasMoreElements()) {
+            v.add((String) e.nextElement());
+        }
+        return v.elements();
     }
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
index 6f4ba4976593b17d439beca8eac02b9a38bf3816..07916fb6af0ce0ce17ba4523b834bd571b3c8edc 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
@@ -145,7 +145,7 @@ public class Utils {
     }
 
     public static void checkHost(String hostname) throws UnknownHostException {
-        InetAddress addr = InetAddress.getByName(hostname);
+        InetAddress.getByName(hostname);
     }
 
     public static void copy(String orig, String dest) {
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS7.java b/pki/base/util/src/netscape/security/pkcs/PKCS7.java
index b28c570c3f4307174ad677f76284e344dd843b9b..4de75a4e1a812eee6650257523f1d91ccc785f55 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS7.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS7.java
@@ -272,9 +272,6 @@ public class PKCS7 {
         // contentInfo
         contentInfo.encode(signedData);
 
-        // certificates
-        DerOutputStream certs = new DerOutputStream();
-
         // cast to X509CertImpl[] since X509CertImpl implements DerEncoder
         X509CertImpl implCerts[] = new X509CertImpl[certificates.length];
         try {
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
index b3ec0790677d0391ac131200dac04df2429b89f6..6fc89610a1366f9e11e059565d383e159d07c7e2 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
@@ -184,7 +184,7 @@ public class PKCS8Key implements PrivateKey {
                 throw new InstantiationException();
             }
 
-            Class keyClass = Class.forName(classname);
+            Class<?> keyClass = Class.forName(classname);
             Object inst;
             PKCS8Key result;
 
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS9Attributes.java b/pki/base/util/src/netscape/security/pkcs/PKCS9Attributes.java
index 6f7ce6abbcd3e675b088efae9ed59efc2efff2c2..485cdded1e2aaa767e3899293675fdb96cda1514 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS9Attributes.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS9Attributes.java
@@ -38,12 +38,12 @@ public class PKCS9Attributes {
     /**
      * Attributes in this set indexed by OID.
      */
-    private final Hashtable attributes = new Hashtable(3);
+    private final Hashtable<ObjectIdentifier, PKCS9Attribute> attributes = new Hashtable<ObjectIdentifier, PKCS9Attribute>(3);
 
     /**
      * The keys of this hashtable are the OIDs of permitted attributes.
      */
-    private final Hashtable permittedAttributes;
+    private final Hashtable<ObjectIdentifier, ObjectIdentifier> permittedAttributes;
 
     /**
      * The DER encoding of this attribute set. The tag byte must be
@@ -73,7 +73,7 @@ public class PKCS9Attributes {
                DerInputStream in) throws IOException {
         if (permittedAttributes != null) {
             this.permittedAttributes =
-                    new Hashtable(permittedAttributes.length);
+                    new Hashtable<ObjectIdentifier, ObjectIdentifier>(permittedAttributes.length);
 
             for (int i = 0; i < permittedAttributes.length; i++)
                 this.permittedAttributes.put(permittedAttributes[i],
@@ -157,7 +157,6 @@ public class PKCS9Attributes {
 
         PKCS9Attribute attrib;
         ObjectIdentifier oid;
-        int index;
 
         for (int i = 0; i < derVals.length; i++) {
             attrib = new PKCS9Attribute(derVals[i]);
@@ -213,14 +212,14 @@ public class PKCS9Attributes {
      * Get an attribute from this set.
      */
     public PKCS9Attribute getAttribute(ObjectIdentifier oid) {
-        return (PKCS9Attribute) attributes.get(oid);
+        return attributes.get(oid);
     }
 
     /**
      * Get an attribute from this set.
      */
     public PKCS9Attribute getAttribute(String name) {
-        return (PKCS9Attribute) attributes.get(PKCS9Attribute.getOID(name));
+        return attributes.get(PKCS9Attribute.getOID(name));
     }
 
     /**
@@ -228,7 +227,6 @@ public class PKCS9Attributes {
      */
     public PKCS9Attribute[] getAttributes() {
         PKCS9Attribute[] attribs = new PKCS9Attribute[attributes.size()];
-        ObjectIdentifier oid;
 
         int j = 0;
         for (int i = 1; i < PKCS9Attribute.PKCS9_OIDS.length &&
@@ -275,7 +273,6 @@ public class PKCS9Attributes {
         StringBuffer buf = new StringBuffer(200);
         buf.append("PKCS9 Attributes: [\n\t");
 
-        ObjectIdentifier oid;
         PKCS9Attribute value;
 
         boolean first = true;
diff --git a/pki/base/util/src/netscape/security/provider/CMS.java b/pki/base/util/src/netscape/security/provider/CMS.java
index fffa00dea22850f36c195308b237bfb4f59738ed..4a4f150abb8ddc41c450617645d81761067ade51 100644
--- a/pki/base/util/src/netscape/security/provider/CMS.java
+++ b/pki/base/util/src/netscape/security/provider/CMS.java
@@ -38,7 +38,7 @@ public final class CMS extends Provider {
         /* We are the SUN provider */
         super("CMS", 1.0, INFO);
 
-        AccessController.doPrivileged(new java.security.PrivilegedAction() {
+        AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
             public Object run() {
                 /*
                 * Certificates
diff --git a/pki/base/util/src/netscape/security/provider/DSAKeyFactory.java b/pki/base/util/src/netscape/security/provider/DSAKeyFactory.java
index 1d77a7283c7a5105cfe91ff84e383576a18f87eb..7de0f516e32d633b4ed2f553a1b0d9c615c144be 100755
--- a/pki/base/util/src/netscape/security/provider/DSAKeyFactory.java
+++ b/pki/base/util/src/netscape/security/provider/DSAKeyFactory.java
@@ -122,7 +122,8 @@ public class DSAKeyFactory extends KeyFactorySpi {
      *                inappropriate for the given key, or the given key cannot be processed
      *                (e.g., the given key has an unrecognized algorithm or format).
      */
-    protected KeySpec engineGetKeySpec(Key key, Class keySpec)
+    @SuppressWarnings("unchecked")
+    protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec)
             throws InvalidKeySpecException {
 
         DSAParams params;
@@ -132,21 +133,21 @@ public class DSAKeyFactory extends KeyFactorySpi {
             if (key instanceof java.security.interfaces.DSAPublicKey) {
 
                 // Determine valid key specs
-                Class dsaPubKeySpec = Class.forName
+                Class<?> dsaPubKeySpec = Class.forName
                         ("java.security.spec.DSAPublicKeySpec");
-                Class x509KeySpec = Class.forName
+                Class<?> x509KeySpec = Class.forName
                         ("java.security.spec.X509EncodedKeySpec");
 
                 if (dsaPubKeySpec.isAssignableFrom(keySpec)) {
                     java.security.interfaces.DSAPublicKey dsaPubKey = (java.security.interfaces.DSAPublicKey) key;
                     params = dsaPubKey.getParams();
-                    return new DSAPublicKeySpec(dsaPubKey.getY(),
+                    return (T) new DSAPublicKeySpec(dsaPubKey.getY(),
                             params.getP(),
                             params.getQ(),
                             params.getG());
 
                 } else if (x509KeySpec.isAssignableFrom(keySpec)) {
-                    return new X509EncodedKeySpec(key.getEncoded());
+                    return (T) new X509EncodedKeySpec(key.getEncoded());
 
                 } else {
                     throw new InvalidKeySpecException("Inappropriate key specification");
@@ -155,21 +156,21 @@ public class DSAKeyFactory extends KeyFactorySpi {
             } else if (key instanceof java.security.interfaces.DSAPrivateKey) {
 
                 // Determine valid key specs
-                Class dsaPrivKeySpec = Class.forName
+                Class<?> dsaPrivKeySpec = Class.forName
                         ("java.security.spec.DSAPrivateKeySpec");
-                Class pkcs8KeySpec = Class.forName
+                Class<?> pkcs8KeySpec = Class.forName
                         ("java.security.spec.PKCS8EncodedKeySpec");
 
                 if (dsaPrivKeySpec.isAssignableFrom(keySpec)) {
                     java.security.interfaces.DSAPrivateKey dsaPrivKey = (java.security.interfaces.DSAPrivateKey) key;
                     params = dsaPrivKey.getParams();
-                    return new DSAPrivateKeySpec(dsaPrivKey.getX(),
+                    return (T) new DSAPrivateKeySpec(dsaPrivKey.getX(),
                             params.getP(),
                             params.getQ(),
                             params.getG());
 
                 } else if (pkcs8KeySpec.isAssignableFrom(keySpec)) {
-                    return new PKCS8EncodedKeySpec(key.getEncoded());
+                    return (T) new PKCS8EncodedKeySpec(key.getEncoded());
 
                 } else {
                     throw new InvalidKeySpecException("Inappropriate key specification");
diff --git a/pki/base/util/src/netscape/security/provider/DSAParameters.java b/pki/base/util/src/netscape/security/provider/DSAParameters.java
index cc3012f754c9257c516a43df690a00aa9e20e957..e2a5dd128f229700117e73b0d015522fbc65f3db 100755
--- a/pki/base/util/src/netscape/security/provider/DSAParameters.java
+++ b/pki/base/util/src/netscape/security/provider/DSAParameters.java
@@ -86,13 +86,14 @@ public class DSAParameters extends AlgorithmParametersSpi {
         engineInit(params);
     }
 
-    protected AlgorithmParameterSpec engineGetParameterSpec(Class paramSpec)
+    @SuppressWarnings("unchecked")
+    protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec)
             throws InvalidParameterSpecException {
         try {
-            Class dsaParamSpec = Class.forName
+            Class<?> dsaParamSpec = Class.forName
                     ("java.security.spec.DSAParameterSpec");
             if (dsaParamSpec.isAssignableFrom(paramSpec)) {
-                return new DSAParameterSpec(this.p, this.q, this.g);
+                return (T) new DSAParameterSpec(this.p, this.q, this.g);
             } else {
                 throw new InvalidParameterSpecException("Inappropriate parameter Specification");
             }
diff --git a/pki/base/util/src/netscape/security/util/ASN1CharStrConvMap.java b/pki/base/util/src/netscape/security/util/ASN1CharStrConvMap.java
index 972c5784699a569e726fbe4258c46cc9cf49cba0..c9c364f4f7fefa60c12dfe982b9ac352b98f83c0 100644
--- a/pki/base/util/src/netscape/security/util/ASN1CharStrConvMap.java
+++ b/pki/base/util/src/netscape/security/util/ASN1CharStrConvMap.java
@@ -20,7 +20,6 @@ package netscape.security.util;
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
-import java.nio.charset.CodingErrorAction;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
diff --git a/pki/base/util/src/netscape/security/util/ByteArrayLexOrder.java b/pki/base/util/src/netscape/security/util/ByteArrayLexOrder.java
index ded4522d970e9ac10e6f213951729e651e2681de..2ee2f740e3af807918711900e5d3a31d4a518809 100644
--- a/pki/base/util/src/netscape/security/util/ByteArrayLexOrder.java
+++ b/pki/base/util/src/netscape/security/util/ByteArrayLexOrder.java
@@ -25,7 +25,7 @@ import java.util.Comparator;
  * @version 1.4 97/12/10
  * @author D. N. Hoover
  */
-public class ByteArrayLexOrder implements Comparator {
+public class ByteArrayLexOrder implements Comparator<byte[]> {
 
     /**
      * Perform lexicographical comparison of two byte arrays,
@@ -41,10 +41,7 @@ public class ByteArrayLexOrder implements Comparator {
      * 
      * @exception <code>ClassCastException</code> if either argument is not a byte array.
      */
-    public final int compare(Object obj1, Object obj2) {
-
-        byte[] bytes1 = (byte[]) obj1;
-        byte[] bytes2 = (byte[]) obj2;
+    public final int compare(byte[] bytes1, byte[] bytes2) {
 
         int diff;
         for (int i = 0; i < bytes1.length && i < bytes2.length; i++) {
diff --git a/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java b/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
index 1367ee043c65159530dc647224ffbe92f9493f42..e57a3b5f11409ae43041277cc05f0580394006ee 100644
--- a/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
+++ b/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
@@ -19,7 +19,7 @@ package netscape.security.util;
 
 import java.util.Comparator;
 
-public class ByteArrayTagOrder implements Comparator {
+public class ByteArrayTagOrder implements Comparator<byte[]> {
 
     /**
      * Compare two byte arrays, by the order of their tags,
@@ -34,10 +34,7 @@ public class ByteArrayTagOrder implements Comparator {
      * @exception <code>ClassCastException</code> if either argument is not a byte array.
      */
 
-    public final int compare(Object obj1, Object obj2) {
-
-        byte[] bytes1 = (byte[]) obj1;
-        byte[] bytes2 = (byte[]) obj2;
+    public final int compare(byte[] bytes1, byte[] bytes2) {
 
         // tag order is same as byte order ignoring any difference in 
         // the constructivity bit (0x02)
diff --git a/pki/base/util/src/netscape/security/util/DerOutputStream.java b/pki/base/util/src/netscape/security/util/DerOutputStream.java
index 44a4df8f05f4a72e13dc57a13400c87416c7596a..62290d604901f6df7ea2f752abec740c619c4379 100644
--- a/pki/base/util/src/netscape/security/util/DerOutputStream.java
+++ b/pki/base/util/src/netscape/security/util/DerOutputStream.java
@@ -460,7 +460,7 @@ public class DerOutputStream
      * @param order the order to use when sorting encodings of components.
      */
     private void putOrderedSet(byte tag, DerEncoder[] set,
-                   Comparator order) throws IOException {
+                   Comparator<byte[]> order) throws IOException {
         DerOutputStream[] streams = new DerOutputStream[set.length];
 
         for (int i = 0; i < set.length; i++) {
diff --git a/pki/base/util/src/netscape/security/util/ObjectIdentifier.java b/pki/base/util/src/netscape/security/util/ObjectIdentifier.java
index 8dd547760aa8153c7c2c3cd99825622505f5254b..6ff02d1b08ab10c9b4bb8905ef14c9e33e720c5b 100644
--- a/pki/base/util/src/netscape/security/util/ObjectIdentifier.java
+++ b/pki/base/util/src/netscape/security/util/ObjectIdentifier.java
@@ -19,6 +19,7 @@ package netscape.security.util;
 
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.Hashtable;
 import java.util.StringTokenizer;
 
 /**
@@ -376,7 +377,7 @@ final public class ObjectIdentifier implements Serializable {
      * This function never returns null. IOException is raised
      * in error conditions.
      */
-    public static java.util.Hashtable mOIDs = new java.util.Hashtable();
+    public static Hashtable<String, ObjectIdentifier> mOIDs = new Hashtable<String, ObjectIdentifier>();
 
     public static ObjectIdentifier getObjectIdentifier(String oid)
             throws IOException {
@@ -387,7 +388,7 @@ final public class ObjectIdentifier implements Serializable {
 
         oid = oid.trim();
 
-        ObjectIdentifier thisOID = (ObjectIdentifier) mOIDs.get(oid);
+        ObjectIdentifier thisOID = mOIDs.get(oid);
         if (thisOID != null)
             return thisOID;
 
diff --git a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
index 320bbf3df24df42461626b833fc820091ec9baa7..c749ae04eb9c4316cd0aa0ebccacffdcfe39916f 100644
--- a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
+++ b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
@@ -29,7 +29,6 @@ import java.util.Vector;
 
 import netscape.security.util.BitArray;
 import netscape.security.util.DerOutputStream;
-import netscape.security.x509.FreshestCRLExtension.Reason;
 
 import org.mozilla.jss.asn1.ASN1Util;
 import org.mozilla.jss.asn1.InvalidBERException;
diff --git a/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java b/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
index fd6e15bfb95c55469076af7c305ddf6bcdfcbcc4..52ff67017e7661e4a8e966e10234d1c48a5a30eb 100644
--- a/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
+++ b/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
@@ -134,8 +134,6 @@ public class LdapV3DNStrConverter extends LdapDNStrConverter {
             throws IOException {
         StringReader rdn_reader = new StringReader(rdn);
         PushbackReader in = new PushbackReader(rdn_reader, 5);
-        Vector<AVA> avaVector = new Vector<AVA>();
-        AVA[] assertion;
 
         return parseRDN(in, null);
     }
@@ -649,7 +647,7 @@ public class LdapV3DNStrConverter extends LdapDNStrConverter {
          * production as practical.
          */
         StringBuffer retval = new StringBuffer(30);
-        int i, j;
+        int i;
         String temp = null;
         AVAValueConverter valueConverter;
 
diff --git a/pki/base/util/src/netscape/security/x509/RDN.java b/pki/base/util/src/netscape/security/x509/RDN.java
index 79e494638e72937736b7ad2eb9b7c6260cae06c5..c5e8765a06e8d81e9c5e6f4a91f3ebf980d32b3c 100644
--- a/pki/base/util/src/netscape/security/x509/RDN.java
+++ b/pki/base/util/src/netscape/security/x509/RDN.java
@@ -193,7 +193,6 @@ public class RDN {
         }
 
         public AVA nextElement() {
-            AVA ava = null;
             if (index >= assertion.length)
                 return null;
             return assertion[index++];
diff --git a/pki/base/util/src/netscape/security/x509/X509Cert.java b/pki/base/util/src/netscape/security/x509/X509Cert.java
index b524f779bd68be10e18b1928e61ea689a45674c7..9ab7ba75431446f8607f7106a3610806acc60bb9 100644
--- a/pki/base/util/src/netscape/security/x509/X509Cert.java
+++ b/pki/base/util/src/netscape/security/x509/X509Cert.java
@@ -444,7 +444,6 @@ public class X509Cert implements Certificate, Serializable {
      */
     public Signature getVerifier(String algorithm)
             throws NoSuchAlgorithmException, InvalidKeyException {
-        String algName;
         Signature sig;
 
         sig = Signature.getInstance(algorithm);
-- 
1.7.7.4

