From 9d88496c04a3bcbd4c6df8bd0e69cd612fa6e886 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Thu, 12 Jan 2012 18:53:36 -0600
Subject: [PATCH] Added generics (part 1).

This patch is based on Adam's patch. It brings down the warnings
from 6139 to 4648.

Ticket #2
---
 pki/base/ca/src/com/netscape/ca/CAService.java     |   44 ++++----
 .../ca/src/com/netscape/ca/CMSCRLExtensions.java   |    4 +-
 .../ca/src/com/netscape/ca/CRLIssuingPoint.java    |   50 ++++----
 .../src/com/netscape/ca/CertificateAuthority.java  |   24 ++--
 .../netscape/certsrv/base/MetaAttributeDef.java    |    3 +-
 .../src/com/netscape/certsrv/ocsp/IDefStore.java   |    2 +-
 .../netscape/certsrv/policy/IGeneralNameUtil.java  |    3 +-
 .../netscape/certsrv/request/ARequestNotifier.java |    4 +-
 .../src/com/netscape/certsrv/request/IRequest.java |    8 +-
 .../src/com/netscape/certsrv/util/HttpInput.java   |   12 +-
 .../cms/authentication/DirBasedAuthentication.java |   14 ++-
 .../netscape/cms/authentication/FlatFileAuth.java  |    4 +-
 .../SSLclientCertAuthentication.java               |    2 +-
 .../crl/CMSAuthorityKeyIdentifierExtension.java    |    7 +-
 .../src/com/netscape/cms/jobs/PublishCertsJob.java |    4 +-
 .../common/src/com/netscape/cms/ocsp/DefStore.java |   53 ++++-----
 .../src/com/netscape/cms/ocsp/LDAPStore.java       |   20 ++--
 .../cms/policy/constraints/IssuerConstraints.java  |    2 +-
 .../cms/policy/constraints/RenewalConstraints.java |    2 +-
 .../constraints/RenewalValidityConstraints.java    |    8 +-
 .../constraints/SigningAlgorithmConstraints.java   |    9 +-
 .../constraints/UniqueSubjectNameConstraints.java  |   17 ++--
 .../cms/policy/extensions/AuthInfoAccessExt.java   |   32 +++---
 .../extensions/AuthorityKeyIdentifierExt.java      |    8 +-
 .../cms/policy/extensions/BasicConstraintsExt.java |   10 +-
 .../extensions/CRLDistributionPointsExt.java       |   14 +-
 .../policy/extensions/CertificatePoliciesExt.java  |   18 ++--
 .../extensions/CertificateRenewalWindowExt.java    |   10 +-
 .../extensions/CertificateScopeOfUseExt.java       |   24 ++--
 .../cms/policy/extensions/ExtendedKeyUsageExt.java |   14 +-
 .../cms/policy/extensions/GenericASN1Ext.java      |   14 +-
 .../cms/policy/extensions/IssuerAltNameExt.java    |   10 +-
 .../cms/policy/extensions/KeyUsageExt.java         |    8 +-
 .../cms/policy/extensions/NSCCommentExt.java       |    8 +-
 .../cms/policy/extensions/NSCertTypeExt.java       |    8 +-
 .../cms/policy/extensions/NameConstraintsExt.java  |   20 ++--
 .../cms/policy/extensions/OCSPNoCheckExt.java      |    8 +-
 .../policy/extensions/PolicyConstraintsExt.java    |   10 +-
 .../cms/policy/extensions/PolicyMappingsExt.java   |   14 +-
 .../cms/policy/extensions/PresenceExt.java         |    8 +-
 .../extensions/PrivateKeyUsagePeriodExt.java       |   12 +-
 .../extensions/RemoveBasicConstraintsExt.java      |    8 +-
 .../cms/policy/extensions/SubjAltNameExt.java      |   24 ++--
 .../cms/policy/extensions/SubjectAltNameExt.java   |   16 ++--
 .../extensions/SubjectDirectoryAttributesExt.java  |   22 ++--
 .../policy/extensions/SubjectKeyIdentifierExt.java |    8 +-
 .../netscape/cms/profile/common/BasicProfile.java  |   12 +-
 .../netscape/cms/profile/common/EnrollProfile.java |    7 +-
 .../cms/profile/constraint/EnrollConstraint.java   |    8 +-
 .../cms/profile/constraint/KeyConstraint.java      |    4 +-
 .../constraint/RenewGracePeriodConstraint.java     |    4 +-
 .../constraint/UniqueSubjectNameConstraint.java    |    8 +-
 .../cms/profile/constraint/ValidityConstraint.java |    4 +-
 .../def/CRLDistributionPointsExtDefault.java       |    8 +-
 .../profile/def/CertificatePoliciesExtDefault.java |   85 ++++++++------
 .../netscape/cms/profile/def/EnrollDefault.java    |   22 ++--
 .../cms/profile/def/FreshestCRLExtDefault.java     |    8 +-
 .../cms/profile/def/IssuerAltNameExtDefault.java   |    2 +-
 .../cms/profile/def/NameConstraintsExtDefault.java |   22 ++--
 .../cms/profile/def/PolicyMappingsExtDefault.java  |   14 +-
 .../cms/profile/def/SubjectAltNameExtDefault.java  |   10 +-
 .../def/SubjectDirAttributesExtDefault.java        |   26 ++--
 .../cms/profile/def/nsNKeySubjectNameDefault.java  |    4 +-
 .../def/nsTokenUserKeySubjectNameDefault.java      |    4 +-
 .../cms/publish/mappers/LdapEnhancedMap.java       |   10 +-
 .../cms/publish/mappers/LdapSimpleMap.java         |    8 +-
 .../cms/publish/mappers/MapAVAPattern.java         |    8 +-
 .../netscape/cms/publish/mappers/MapDNPattern.java |    6 +-
 .../cms/publish/mappers/MapRDNPattern.java         |    6 +-
 .../cms/publish/publishers/FileBasedPublisher.java |    8 +-
 .../publishers/LdapEncryptCertPublisher.java       |   21 ++--
 .../cms/servlet/admin/CMSAdminServlet.java         |   83 ++++++++-----
 .../cms/servlet/admin/ProfileAdminServlet.java     |    8 +-
 .../cms/servlet/admin/PublisherAdminServlet.java   |   30 +++--
 .../cms/servlet/admin/RegistryAdminServlet.java    |   10 +-
 .../com/netscape/cms/servlet/base/CMSServlet.java  |    4 +-
 .../cms/servlet/cert/CMCRevReqServlet.java         |   21 ++--
 .../servlet/cert/ChallengeRevocationServlet1.java  |   17 ++--
 .../netscape/cms/servlet/cert/DisplayBySerial.java |    6 +-
 .../com/netscape/cms/servlet/cert/DoRevoke.java    |   18 ++--
 .../com/netscape/cms/servlet/cert/DoRevokeTPS.java |   14 +-
 .../netscape/cms/servlet/cert/EnrollServlet.java   |    9 +-
 .../cms/servlet/cert/HashEnrollServlet.java        |   15 ++-
 .../com/netscape/cms/servlet/cert/ListCerts.java   |   25 ++--
 .../com/netscape/cms/servlet/cert/SrchCerts.java   |   12 +-
 .../com/netscape/cms/servlet/cert/UpdateCRL.java   |   19 ++--
 .../cms/servlet/cert/scep/CRSEnrollment.java       |   97 ++++++++-------
 .../cms/servlet/cert/scep/ChallengePassword.java   |    6 +-
 .../cms/servlet/cert/scep/ExtensionsRequested.java |    9 +-
 .../cms/servlet/common/CMCOutputTemplate.java      |   38 +++---
 .../cms/servlet/connector/ConnectorServlet.java    |    4 +-
 .../servlet/csadmin/AdminAuthenticatePanel.java    |   13 +-
 .../netscape/cms/servlet/csadmin/AdminPanel.java   |    9 +-
 .../cms/servlet/csadmin/CertRequestPanel.java      |   12 +-
 .../com/netscape/cms/servlet/csadmin/CertUtil.java |    4 +-
 .../cms/servlet/csadmin/DatabasePanel.java         |   22 ++--
 .../cms/servlet/csadmin/DisplayCertChainPanel.java |   11 +-
 .../netscape/cms/servlet/csadmin/DonePanel.java    |   23 ++--
 .../netscape/cms/servlet/csadmin/NamePanel.java    |   20 ++--
 .../cms/servlet/csadmin/RestoreKeyCertPanel.java   |   17 ++-
 .../netscape/cms/servlet/csadmin/SizePanel.java    |   16 ++-
 .../cms/servlet/csadmin/WizardPanelBase.java       |    6 +-
 .../cms/servlet/ocsp/CheckCertServlet.java         |    4 +-
 .../netscape/cms/servlet/ocsp/ListCAServlet.java   |    2 +-
 .../cms/servlet/processors/CMCProcessor.java       |    5 +-
 .../cms/servlet/processors/CRMFProcessor.java      |    4 +-
 .../cms/servlet/profile/ProfileSubmitServlet.java  |   51 ++++----
 .../cms/servlet/request/CertReqParser.java         |   57 +++++-----
 .../netscape/cms/servlet/request/CheckRequest.java |   13 ++-
 .../cms/servlet/request/ProcessCertReq.java        |   22 ++--
 .../com/netscape/cms/servlet/tks/TokenServlet.java |   32 +++--
 .../src/com/netscape/cmscore/apps/CMSEngine.java   |   19 ++--
 .../src/com/netscape/cmscore/apps/Setup.java       |   16 ++-
 .../src/com/netscape/cmscore/cert/CertUtils.java   |   12 +-
 .../netscape/cmscore/cert/CrlCachePrettyPrint.java |    9 +-
 .../netscape/cmscore/cert/OidLoaderSubsystem.java  |    2 +-
 .../netscape/cmscore/connector/HttpPKIMessage.java |    6 +-
 .../netscape/cmscore/connector/LocalConnector.java |    5 +-
 .../cmscore/dbs/CertificateRepository.java         |   12 +-
 .../com/netscape/cmscore/dbs/KeyRepository.java    |   13 +-
 .../netscape/cmscore/dbs/ReplicaIDRepository.java  |    8 +-
 .../netscape/cmscore/dbs/RevocationInfoMapper.java |    8 +-
 .../netscape/cmscore/dbs/X509CertImplMapper.java   |   16 ++--
 .../cmscore/extensions/CMSExtensionsMap.java       |    6 +-
 .../src/com/netscape/cmscore/jobs/JobCron.java     |    8 +-
 .../src/com/netscape/cmscore/ldap/LdapRule.java    |   27 ++--
 .../com/netscape/cmscore/logging/LogSubsystem.java |    4 +-
 .../notification/ReqCertSANameEmailResolver.java   |   10 +-
 .../netscape/cmscore/registry/PluginRegistry.java  |    3 +-
 .../netscape/cmscore/request/ARequestQueue.java    |   77 +++++++------
 .../netscape/cmscore/request/ExtDataHashtable.java |   18 ++--
 .../netscape/cmscore/request/RequestRecord.java    |    2 +-
 .../netscape/cmscore/security/JssSubsystem.java    |   52 +++++----
 .../com/netscape/cmscore/security/KeyCertUtil.java |    5 +-
 .../com/netscape/cmscore/util/UtilResources.java   |    2 +-
 .../netscape/certsrv/app/CMSEngineDefaultStub.java |   85 +++++++++-----
 .../cmscore/request/ExtDataHashtableTest.java      |   10 +-
 .../cmscore/request/RequestDefaultStub.java        |   12 +-
 .../cmscore/request/RequestRecordTest.java         |    6 +-
 .../com/netscape/cmscore/request/RequestTest.java  |   63 +++++-----
 .../src/com/netscape/cmstools/CMCEnroll.java       |    4 +-
 .../src/com/netscape/cmstools/CMCRequest.java      |    4 +-
 .../src/com/netscape/cmstools/CMCRevoke.java       |   36 +++---
 .../src/com/netscape/cmstools/CRMFPopClient.java   |   19 ++--
 .../src/com/netscape/cmstools/GenExtKeyUsage.java  |    4 +-
 .../src/com/netscape/cmstools/PrettyPrintCert.java |    2 +-
 .../src/com/netscape/kra/EnrollmentService.java    |   30 +++--
 .../src/com/netscape/kra/KeyRecoveryAuthority.java |   11 +-
 .../kra/src/com/netscape/kra/RecoveryService.java  |    8 +-
 .../com/netscape/kra/TokenKeyRecoveryService.java  |    8 +-
 .../src/com/netscape/pkisilent/common/CMSLDAP.java |    6 +-
 .../src/com/netscape/pkisilent/common/Request.java |    5 +-
 .../com/netscape/pkisilent/common/TestClient.java  |    3 +-
 .../com/netscape/pkisilent/common/Utilities.java   |    8 --
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |   10 +-
 .../com/netscape/cmsutil/scep/CRSPKIMessage.java   |   18 ++--
 .../extensions/AuthInfoAccessExtension.java        |   13 +--
 .../CertificateRenewalWindowExtension.java         |    5 +-
 .../extensions/CertificateScopeOfUseExtension.java |   10 +-
 .../extensions/ExtendedKeyUsageExtension.java      |   20 ++--
 .../security/extensions/GenericASN1Extension.java  |   22 ++--
 .../extensions/InhibitAnyPolicyExtension.java      |    2 +-
 .../netscape/security/extensions/KerberosName.java |    6 +-
 .../security/extensions/NSCertTypeExtension.java   |    4 +-
 .../security/extensions/OCSPNoCheckExtension.java  |    2 +-
 .../extensions/PresenceServerExtension.java        |    2 +-
 .../extensions/SubjectInfoAccessExtension.java     |   13 +--
 .../netscape/security/pkcs/PKCS10Attribute.java    |    9 +-
 .../src/netscape/security/pkcs/PKCS9Attribute.java |   50 ++++-----
 .../security/provider/X509CertificateFactory.java  |    4 +-
 .../netscape/security/util/CertPrettyPrint.java    |    4 +-
 .../src/netscape/security/util/CrlPrettyPrint.java |    9 +-
 .../src/netscape/security/util/ExtPrettyPrint.java |   47 ++++----
 .../src/netscape/security/x509/ACertAttrSet.java   |    2 +-
 .../src/netscape/security/x509/AlgorithmId.java    |    3 +-
 .../x509/AuthorityKeyIdentifierExtension.java      |    2 +-
 .../security/x509/BasicConstraintsExtension.java   |    2 +-
 .../x509/CRLDistributionPointsExtension.java       |    7 +-
 .../netscape/security/x509/CRLNumberExtension.java |    2 +-
 .../netscape/security/x509/CRLReasonExtension.java |    2 +-
 .../src/netscape/security/x509/CertAttrSet.java    |    2 +-
 .../security/x509/CertificateAlgorithmId.java      |    2 +-
 .../security/x509/CertificateExtensions.java       |   33 +++--
 .../security/x509/CertificateIssuerExtension.java  |    2 +-
 .../security/x509/CertificateIssuerName.java       |    2 +-
 .../x509/CertificateIssuerUniqueIdentity.java      |    2 +-
 .../x509/CertificatePoliciesExtension.java         |   15 ++-
 .../security/x509/CertificateSerialNumber.java     |    2 +-
 .../security/x509/CertificateSubjectName.java      |    2 +-
 .../x509/CertificateSubjectUniqueIdentity.java     |    2 +-
 .../security/x509/CertificateValidity.java         |    2 +-
 .../netscape/security/x509/CertificateVersion.java |    2 +-
 .../netscape/security/x509/CertificateX509Key.java |    2 +-
 .../security/x509/DeltaCRLIndicatorExtension.java  |    2 +-
 .../src/netscape/security/x509/Extensions.java     |   31 +++---
 .../security/x509/FreshestCRLExtension.java        |    7 +-
 .../security/x509/HoldInstructionExtension.java    |    2 +-
 .../security/x509/InvalidityDateExtension.java     |    2 +-
 .../x509/IssuerAlternativeNameExtension.java       |    2 +-
 .../x509/IssuingDistributionPointExtension.java    |    2 +-
 .../netscape/security/x509/KeyUsageExtension.java  |    2 +-
 .../security/x509/NSCCommentExtension.java         |   13 +-
 .../security/x509/NameConstraintsExtension.java    |    2 +-
 .../util/src/netscape/security/x509/OIDMap.java    |    6 +-
 .../security/x509/PolicyConstraintsExtension.java  |    2 +-
 .../security/x509/PolicyMappingsExtension.java     |    3 +-
 .../security/x509/PrivateKeyUsageExtension.java    |    2 +-
 .../netscape/security/x509/RevokedCertImpl.java    |  127 +++++++++++---------
 .../netscape/security/x509/RevokedCertificate.java |    3 +
 .../x509/SubjectAlternativeNameExtension.java      |    2 +-
 .../x509/SubjectDirAttributesExtension.java        |    2 +-
 .../x509/SubjectKeyIdentifierExtension.java        |    2 +-
 .../util/src/netscape/security/x509/X500Name.java  |    2 +-
 .../netscape/security/x509/X500NameAttrMap.java    |    3 +-
 .../src/netscape/security/x509/X509CertImpl.java   |   16 ++--
 .../src/netscape/security/x509/X509CertInfo.java   |    2 +-
 .../extensions/GenericASN1ExtensionTest.java       |   72 +++++++++++
 217 files changed, 1656 insertions(+), 1388 deletions(-)
 create mode 100644 pki/base/util/test/com/netscape/security/extensions/GenericASN1ExtensionTest.java

diff --git a/pki/base/ca/src/com/netscape/ca/CAService.java b/pki/base/ca/src/com/netscape/ca/CAService.java
index d6f02a059030c1e1cd3ce7826439fe7a74e06321..d086ee551ae25b9f893c63d2160471e6ecf2e51e 100644
--- a/pki/base/ca/src/com/netscape/ca/CAService.java
+++ b/pki/base/ca/src/com/netscape/ca/CAService.java
@@ -45,6 +45,7 @@ import netscape.security.x509.CertificateIssuerName;
 import netscape.security.x509.CertificateSerialNumber;
 import netscape.security.x509.CertificateSubjectName;
 import netscape.security.x509.CertificateValidity;
+import netscape.security.x509.Extension;
 import netscape.security.x509.LdapV3DNStrConverter;
 import netscape.security.x509.PKIXExtensions;
 import netscape.security.x509.RevocationReason;
@@ -104,11 +105,11 @@ public class CAService implements ICAService, IService {
     protected static IConnector mCLAConnector = null;
 
     private ICertificateAuthority mCA = null;
-    private Hashtable mServants = new Hashtable();
+    private Hashtable<String, IServant> mServants = new Hashtable<String, IServant>();
     private IConnector mKRAConnector = null;
     private IConfigStore mConfig = null;
     private boolean mArchivalRequired = true;
-    private Hashtable mCRLIssuingPoints = new Hashtable();
+    private Hashtable<String, ICRLIssuingPoint> mCRLIssuingPoints = new Hashtable<String, ICRLIssuingPoint>();
 
     private ILogger mSignedAuditLogger = CMS.getSignedAuditLogger();
     private final static String LOGGING_SIGNED_AUDIT_PRIVATE_KEY_ARCHIVE_REQUEST =
@@ -289,7 +290,8 @@ public class CAService implements ICAService, IService {
             if (timeout == 0)
                 connector = new HttpConnector((IAuthority) mCA, nickname, remauthority, resendInterval, config);
             else
-                connector = new HttpConnector((IAuthority) mCA, nickname, remauthority, resendInterval, config, timeout);
+                connector =
+                        new HttpConnector((IAuthority) mCA, nickname, remauthority, resendInterval, config, timeout);
             // Change end			
 
             // log(ILogger.LL_INFO, "remote authority "+ 
@@ -370,8 +372,8 @@ public class CAService implements ICAService, IService {
         // short cut profile-based request
         if (isProfileRequest(request)) {
             try {
-                CMS.debug("CAServic: x0 requestStatus=" + request.getRequestStatus().toString() + " instance="
-                        + request);
+                CMS.debug("CAServic: x0 requestStatus="
+                        + request.getRequestStatus().toString() + " instance=" + request);
                 serviceProfileRequest(request);
                 request.setExtData(IRequest.RESULT, IRequest.RES_SUCCESS);
                 CMS.debug("CAServic: x1 requestStatus=" + request.getRequestStatus().toString());
@@ -530,7 +532,7 @@ public class CAService implements ICAService, IService {
     /**
      * get CRL Issuing Point
      */
-    public Hashtable getCRLIssuingPoints() {
+    public Hashtable<String, ICRLIssuingPoint> getCRLIssuingPoints() {
         return mCRLIssuingPoints;
     }
 
@@ -683,7 +685,7 @@ public class CAService implements ICAService, IService {
                 exts = (CertificateExtensions)
                         certi.get(X509CertInfo.EXTENSIONS);
                 if (exts != null) {
-                    Enumeration e = exts.getElements();
+                    Enumeration<Extension> e = exts.getAttributes();
 
                     while (e.hasMoreElements()) {
                         netscape.security.x509.Extension ext = (netscape.security.x509.Extension) e.nextElement();
@@ -918,7 +920,7 @@ public class CAService implements ICAService, IService {
                 } else {
                     if (Debug.ON) {
                         System.out.println("Old meta info");
-                        Enumeration n = oldMeta.getElements();
+                        Enumeration<String> n = oldMeta.getElements();
 
                         while (n.hasMoreElements()) {
                             String name = (String) n.nextElement();
@@ -945,7 +947,7 @@ public class CAService implements ICAService, IService {
                             mCA.getCertificateRepository().readCertificateRecord(oldSerialNo);
                     MetaInfo meta = check.getMetaInfo();
 
-                    Enumeration n = oldMeta.getElements();
+                    Enumeration<String> n = oldMeta.getElements();
 
                     while (n.hasMoreElements()) {
                         String name = (String) n.nextElement();
@@ -1012,7 +1014,7 @@ public class CAService implements ICAService, IService {
             mCA.log(ILogger.LL_INFO, CMS.getLogMessage("CMSCORE_CA_CERT_REVOKED",
                     serialno.toString(16)));
             // inform all CRLIssuingPoints about revoked certificate
-            Enumeration eIPs = mCRLIssuingPoints.elements();
+            Enumeration<ICRLIssuingPoint> eIPs = mCRLIssuingPoints.elements();
 
             while (eIPs.hasMoreElements()) {
                 ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -1100,7 +1102,7 @@ public class CAService implements ICAService, IService {
                         certRec.getRevokedOn(), certRec.getRevokedBy());
                 mCA.log(ILogger.LL_INFO, CMS.getLogMessage("CMSCORE_CA_CERT_UNREVOKED", serialNo.toString(16)));
                 // inform all CRLIssuingPoints about unrevoked certificate
-                Enumeration eIPs = mCRLIssuingPoints.elements();
+                Enumeration<ICRLIssuingPoint> eIPs = mCRLIssuingPoints.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -1620,15 +1622,15 @@ class serviceCheckChallenge implements IServant {
                 String filter = "(&(x509cert.subject=" + subjectName + ")(certStatus=VALID))";
                 ICertRecordList list = certDB.findCertRecordsInList(filter, null, 10);
                 int size = list.getSize();
-                Enumeration en = list.getCertRecords(0, size - 1);
+                Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
 
                 if (!en.hasMoreElements()) {
                     bigIntArray = new BigInteger[0];
                 } else {
-                    Vector idv = new Vector();
+                    Vector<BigInteger> idv = new Vector<BigInteger>();
 
                     while (en.hasMoreElements()) {
-                        CertRecord record = (CertRecord) en.nextElement();
+                        ICertRecord record = en.nextElement();
                         boolean samepwd = compareChallengePassword(record, pwd);
 
                         if (samepwd) {
@@ -1650,7 +1652,7 @@ class serviceCheckChallenge implements IServant {
         return true;
     }
 
-    private boolean compareChallengePassword(CertRecord record, String pwd)
+    private boolean compareChallengePassword(ICertRecord record, String pwd)
             throws EBaseException {
         MetaInfo metaInfo = (MetaInfo) record.get(CertRecord.ATTR_META_INFO);
 
@@ -1931,7 +1933,7 @@ class serviceGetRevocationInfo implements IServant {
 
     public boolean service(IRequest request)
             throws EBaseException {
-        Enumeration enum1 = request.getExtDataKeys();
+        Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
             String name = (String) enum1.nextElement();
@@ -1971,7 +1973,7 @@ class serviceGetCertificates implements IServant {
 
     public boolean service(IRequest request)
             throws EBaseException {
-        Enumeration enum1 = request.getExtDataKeys();
+        Enumeration<String> enum1 = request.getExtDataKeys();
 
         while (enum1.hasMoreElements()) {
             String name = (String) enum1.nextElement();
@@ -2040,8 +2042,8 @@ class serviceCert4Crl implements IServant {
                 //				mService.revokeCert(crlentries[i]);
                 recordedCerts[i] = revokedCertRecs[i];
                 // inform all CRLIssuingPoints about revoked certificate
-                Hashtable hips = mService.getCRLIssuingPoints();
-                Enumeration eIPs = hips.elements();
+                Hashtable<String, ICRLIssuingPoint> hips = mService.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
@@ -2102,8 +2104,8 @@ class serviceUnCert4Crl implements IServant {
             try {
                 mCA.getCertificateRepository().deleteCertificateRecord(oldSerialNo[i]);
                 // inform all CRLIssuingPoints about unrevoked certificate
-                Hashtable hips = mService.getCRLIssuingPoints();
-                Enumeration eIPs = hips.elements();
+                Hashtable<String, ICRLIssuingPoint> hips = mService.getCRLIssuingPoints();
+                Enumeration<ICRLIssuingPoint> eIPs = hips.elements();
 
                 while (eIPs.hasMoreElements()) {
                     ICRLIssuingPoint ip = (ICRLIssuingPoint) eIPs.nextElement();
diff --git a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
index d9e14884a6f217ddb8b687131d4049d6388cbef3..0d98b96319539c896f5b7d7f88950baef4c96a1d 100644
--- a/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
+++ b/pki/base/ca/src/com/netscape/ca/CMSCRLExtensions.java
@@ -623,8 +623,8 @@ public class CMSCRLExtensions implements ICMSCRLExtensions {
 
                 CMSCRLExtensions cmsCRLExtensions = (CMSCRLExtensions) ip.getCRLExtensions();
                 if (cmsCRLExtensions != null) {
-                    issuingDistPointExtEnabled = cmsCRLExtensions
-                            .isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME);
+                    issuingDistPointExtEnabled =
+                            cmsCRLExtensions.isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME);
                 }
 
                 CMS.debug("issuingDistPointExtEnabled = " + issuingDistPointExtEnabled);
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index 96f1468f1774286555906152238c65f21c4a08e9..46ddb544d08c1fc52cd597e88a63128e026e169e 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -736,9 +736,9 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
 
         mCMSCRLExtensions = new CMSCRLExtensions(this, config);
 
-        mExtendedNextUpdate = ((mUpdateSchema > 1 || (mEnableDailyUpdates && mExtendedTimeList)) && isDeltaCRLEnabled()) ?
-                                config.getBoolean(Constants.PR_EXTENDED_NEXT_UPDATE, true)
-                :
+        mExtendedNextUpdate =
+                ((mUpdateSchema > 1 || (mEnableDailyUpdates && mExtendedTimeList)) && isDeltaCRLEnabled()) ?
+                                config.getBoolean(Constants.PR_EXTENDED_NEXT_UPDATE, true) :
                                 false;
 
         // Get serial number ranges if any.
@@ -1166,7 +1166,9 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                             IConfigStore crlSubStore = crlsSubStore.getSubStore(mId);
                             IConfigStore crlExtsSubStore =
                                     crlSubStore.getSubStore(ICertificateAuthority.PROP_CRLEXT_SUBSTORE);
-                            crlExtsSubStore = crlExtsSubStore.getSubStore(IssuingDistributionPointExtension.NAME);
+                            crlExtsSubStore =
+                                    crlExtsSubStore
+                                            .getSubStore(IssuingDistributionPointExtension.NAME);
 
                             if (crlExtsSubStore != null) {
                                 String val = "";
@@ -1599,8 +1601,8 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                         }
                     }
                     if (t - mMinUpdateInterval > last) {
-                        if (mExtendedNextUpdate && (!fromLastUpdate) && (!(mEnableDailyUpdates && mExtendedTimeList))
-                                && (!delta) &&
+                        if (mExtendedNextUpdate
+                                && (!fromLastUpdate) && (!(mEnableDailyUpdates && mExtendedTimeList)) && (!delta) &&
                                 isDeltaEnabled && mUpdateSchema > 1) {
                             i += mUpdateSchema - ((i + m) % mUpdateSchema);
                         }
@@ -1686,8 +1688,8 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
             next = nextUpdate;
         }
 
-        CMS.debug("findNextUpdate:  " + ((new Date(next)).toString())
-                + ((fromLastUpdate) ? "  delay: " + (next - now) : ""));
+        CMS.debug("findNextUpdate:  "
+                + ((new Date(next)).toString()) + ((fromLastUpdate) ? "  delay: " + (next - now) : ""));
 
         return (fromLastUpdate) ? next - now : next;
     }
@@ -2231,7 +2233,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
     public boolean isDeltaCRLEnabled() {
         return (mAllowExtensions && mEnableCRLCache &&
                 mCMSCRLExtensions.isCRLExtensionEnabled(DeltaCRLIndicatorExtension.NAME) &&
-                mCMSCRLExtensions.isCRLExtensionEnabled(CRLNumberExtension.NAME) && 
+                mCMSCRLExtensions.isCRLExtensionEnabled(CRLNumberExtension.NAME) &&
                 mCMSCRLExtensions.isCRLExtensionEnabled(CRLReasonExtension.NAME));
     }
 
@@ -2339,8 +2341,8 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                             Boolean.toString(isCRLCacheEnabled()),
                             Boolean.toString(mEnableCacheRecovery),
                             Boolean.toString(mCRLCacheIsCleared),
-                            "" + mCRLCerts.size() + "," + mRevokedCerts.size() + "," + mUnrevokedCerts.size() + ","
-                                    + mExpiredCerts.size() + ""
+                                    mCRLCerts.size() + "," + mRevokedCerts.size() + "," + mUnrevokedCerts.size()
+                                    + "," + mExpiredCerts.size() + ""
                     }
                    );
         mUpdatingCRL = CRL_UPDATE_STARTED;
@@ -2395,14 +2397,14 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
 
         mSplits[0] -= System.currentTimeMillis();
         @SuppressWarnings("unchecked")
-        Hashtable<BigInteger, RevokedCertificate> clonedRevokedCerts = (Hashtable<BigInteger, RevokedCertificate>) mRevokedCerts
-                .clone();
+        Hashtable<BigInteger, RevokedCertificate> clonedRevokedCerts =
+                (Hashtable<BigInteger, RevokedCertificate>) mRevokedCerts.clone();
         @SuppressWarnings("unchecked")
-        Hashtable<BigInteger, RevokedCertificate> clonedUnrevokedCerts = (Hashtable<BigInteger, RevokedCertificate>) mUnrevokedCerts
-                .clone();
+        Hashtable<BigInteger, RevokedCertificate> clonedUnrevokedCerts =
+                (Hashtable<BigInteger, RevokedCertificate>) mUnrevokedCerts.clone();
         @SuppressWarnings("unchecked")
-        Hashtable<BigInteger, RevokedCertificate> clonedExpiredCerts = (Hashtable<BigInteger, RevokedCertificate>) mExpiredCerts
-                .clone();
+        Hashtable<BigInteger, RevokedCertificate> clonedExpiredCerts =
+                (Hashtable<BigInteger, RevokedCertificate>) mExpiredCerts.clone();
 
         mSplits[0] += System.currentTimeMillis();
 
@@ -2441,8 +2443,8 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
             if (isDeltaCRLEnabled()) {
                 mSplits[1] -= System.currentTimeMillis();
                 @SuppressWarnings("unchecked")
-                Hashtable<BigInteger, RevokedCertificate> deltaCRLCerts = (Hashtable<BigInteger, RevokedCertificate>) clonedRevokedCerts
-                        .clone();
+                Hashtable<BigInteger, RevokedCertificate> deltaCRLCerts =
+                        (Hashtable<BigInteger, RevokedCertificate>) clonedRevokedCerts.clone();
 
                 deltaCRLCerts.putAll(clonedUnrevokedCerts);
                 if (mIncludeExpiredCertsOneExtraTime) {
@@ -2716,8 +2718,10 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
                         splitTimes += ",";
                     splitTimes += Long.toString(mSplits[i]);
                 }
-                splitTimes += "," + Long.toString(deltaTime) + "," + Long.toString(crlTime) + ","
-                        + Long.toString(totalTime) + ")";
+                splitTimes +=
+                        ","
+                                + Long.toString(deltaTime) + "," + Long.toString(crlTime) + ","
+                                + Long.toString(totalTime) + ")";
                 mLogger.log(ILogger.EV_AUDIT, ILogger.S_OTHER,
                             AuditFormat.LEVEL,
                             CMS.getLogMessage("CMSCORE_CA_CA_CRL_UPDATED"),
@@ -2817,7 +2821,6 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
      *  Suppress the warnings generated by adding to the session context   
      *   
      */
-    @SuppressWarnings("unchecked")
     protected void publishCRL(X509CRLImpl x509crl, boolean isDeltaCRL)
             throws EBaseException {
         SessionContext sc = SessionContext.getContext();
@@ -3014,7 +3017,8 @@ class CertRecProcessor implements IElementProcessor {
             return result;
         }
         boolean isIssuingDistPointExtEnabled = false;
-        isIssuingDistPointExtEnabled = exts.isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME);
+        isIssuingDistPointExtEnabled =
+                exts.isCRLExtensionEnabled(IssuingDistributionPointExtension.NAME);
         if (isIssuingDistPointExtEnabled == false) {
             mIssuingDistPointEnabled = false;
             return false;
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index 0ae915d2f9b364c7431f041a03a0ed219140ccb6..dab9c069db82eeb324e1fc6646faeed35b6f8dc1 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -1561,12 +1561,13 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
             if (nc != null && nc.size() > 0) {
                 // Initialize Certificate Issued notification listener
 
-                String certificateIssuedListenerClassName = nc.getString("certificateIssuedListenerClassName",
-                        "com.netscape.cms.listeners.CertificateIssuedListener");
+                String certificateIssuedListenerClassName =
+                        nc.getString("certificateIssuedListenerClassName",
+                                "com.netscape.cms.listeners.CertificateIssuedListener");
 
                 try {
-                    mCertIssuedListener = (IRequestListener) Class.forName(certificateIssuedListenerClassName)
-                            .newInstance();
+                    mCertIssuedListener =
+                            (IRequestListener) Class.forName(certificateIssuedListenerClassName).newInstance();
                     mCertIssuedListener.init(this, nc);
                 } catch (Exception e1) {
                     log(ILogger.LL_FAILURE,
@@ -1575,12 +1576,13 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
 
                 // Initialize Revoke Request notification listener
 
-                String certificateRevokedListenerClassName = nc.getString("certificateIssuedListenerClassName",
-                        "com.netscape.cms.listeners.CertificateRevokedListener");
+                String certificateRevokedListenerClassName =
+                        nc.getString("certificateIssuedListenerClassName",
+                                "com.netscape.cms.listeners.CertificateRevokedListener");
 
                 try {
-                    mCertRevokedListener = (IRequestListener) Class.forName(certificateRevokedListenerClassName)
-                            .newInstance();
+                    mCertRevokedListener =
+                            (IRequestListener) Class.forName(certificateRevokedListenerClassName).newInstance();
                     mCertRevokedListener.init(this, nc);
                 } catch (Exception e1) {
                     log(ILogger.LL_FAILURE,
@@ -1590,8 +1592,9 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                 // Initialize Request In Queue notification listener
                 IConfigStore rq = nc.getSubStore(PROP_REQ_IN_Q_SUBSTORE);
 
-                String requestInQListenerClassName = nc.getString("certificateIssuedListenerClassName",
-                        "com.netscape.cms.listeners.RequestInQListener");
+                String requestInQListenerClassName =
+                        nc.getString("certificateIssuedListenerClassName",
+                                "com.netscape.cms.listeners.RequestInQListener");
 
                 try {
                     mReqInQListener = (IRequestListener) Class.forName(requestInQListenerClassName).newInstance();
@@ -1701,6 +1704,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                     "initializing crl issue point " + issuePointId);
             IConfigStore issuePointConfig = null;
             String issuePointClassName = null;
+            @SuppressWarnings("unchecked")
             Class<CRLIssuingPoint> issuePointClass = null;
             CRLIssuingPoint issuePoint = null;
 
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
index 9450558c1d37932a38fd90537d11c211f87e7454..3a7bac97704c2f07852039eedf85cd2b74e3d437 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
@@ -34,7 +34,8 @@ public class MetaAttributeDef {
     private ObjectIdentifier mOid;
     private Class<?> mValueClass;
     private static Hashtable<String, MetaAttributeDef> mNameToAttrDef = new Hashtable<String, MetaAttributeDef>();
-    private static Hashtable<ObjectIdentifier, MetaAttributeDef> mOidToAttrDef = new Hashtable<ObjectIdentifier, MetaAttributeDef>();
+    private static Hashtable<ObjectIdentifier, MetaAttributeDef> mOidToAttrDef =
+            new Hashtable<ObjectIdentifier, MetaAttributeDef>();
 
     private MetaAttributeDef() {
     }
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 d971a71282d6ac27dd9ca999c822e6560e2c557f..7123de303ddfff3095e0e129e733c459f4f12517 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 searchAllCRLIssuingPointRecord(
+    public Enumeration<Object> searchAllCRLIssuingPointRecord(
             int maxSize)
             throws EBaseException;
 
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
index 26bd8aeb70fdfcad833a10d1ec3332069171914e..102b25ccdde2f660d24aa3918aec13e82a22b1c0 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
@@ -54,7 +54,8 @@ public interface IGeneralNameUtil {
     /**
      * Default extended plugin info.
      */
-    public static String NUM_GENERALNAMES_INFO = "number;The total number of alternative names or identities permitted in the extension.";
+    public static String NUM_GENERALNAMES_INFO =
+            "number;The total number of alternative names or identities permitted in the extension.";
     public static String GENNAME_CHOICE_INFO =
             "choice(" +
                     IGeneralNameUtil.GENNAME_CHOICE_RFC822NAME + "," +
diff --git a/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java b/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
index 124ca5590bbeadd14ee394e3f9244eb15de52c93..a50996f2b680b8d7b8415872501d304dea85177c 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
@@ -245,8 +245,8 @@ public class ARequestNotifier implements IRequestNotifier {
                     }
                     if (mRequests.size() < mMaxRequests) {
                         mRequests.addElement(r.getRequestId().toString());
-                        CMS.debug("getRequest  added " + r.getRequestType() + " request " + r.getRequestId().toString()
-                                +
+                        CMS.debug("getRequest  added "
+                                + r.getRequestType() + " request " + r.getRequestId().toString() +
                                   " to mRequests: " + mRequests.size() + " (" + mMaxRequests + ")");
                     } else {
                         break;
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
index 8bd3048581c155b6ee902b19096968a03b2b23e8..19b830898d80bc8f312bd96c99246938bbc59d5d 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
@@ -355,7 +355,7 @@ public interface IRequest {
      *            the Hashtable contains an illegal key.
      * @return false if the key or hashtable keys are invalid
      */
-    public boolean setExtData(String key, Hashtable value);
+    public boolean setExtData(String key, Hashtable<String, String> value);
 
     /**
      * Checks whether the key is storing a simple String value, or a complex
@@ -391,14 +391,14 @@ public interface IRequest {
      * @return The hashtable value associated with the key. null if not found
      *         or if the key is associated with a string-value.
      */
-    public Hashtable getExtDataInHashtable(String key);
+    public Hashtable<String, String> getExtDataInHashtable(String key);
 
     /**
      * Returns all the keys stored in ExtData
      * 
      * @return Enumeration of all the keys.
      */
-    public Enumeration getExtDataKeys();
+    public Enumeration<String> getExtDataKeys();
 
     /**
      * Stores an array of Strings in ExtData.
@@ -652,7 +652,7 @@ public interface IRequest {
      * @param data A vector of Strings to store
      * @return False on key error or invalid data.
      */
-    public boolean setExtData(String key, Vector data);
+    public boolean setExtData(String key, Vector<?> data);
 
     /**
      * Returns a vector of strings for the key.
diff --git a/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java b/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
index 51fefda57358f32c2fea95ea8df7375ee2f00fc6..fba601b6c61c580c10556de345ce520d8b51f48a 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
@@ -147,8 +147,8 @@ public class HttpInput {
                 i.equals("2048") || i.equals("4096")) {
             return i;
         }
-        throw new IOException("Invalid key length '" + i
-                + "'. Currently supported key lengths are 256, 512, 1024, 2048, 4096.");
+        throw new IOException("Invalid key length '"
+                + i + "'. Currently supported key lengths are 256, 512, 1024, 2048, 4096.");
     }
 
     public static String getKeySize(HttpServletRequest request, String name, String keyType)
@@ -159,8 +159,8 @@ public class HttpInput {
                     i.equals("2048") || i.equals("4096")) {
                 return i;
             } else {
-                throw new IOException("Invalid key length '" + i
-                        + "'. Currently supported RSA key lengths are 256, 512, 1024, 2048, 4096.");
+                throw new IOException("Invalid key length '"
+                        + i + "'. Currently supported RSA key lengths are 256, 512, 1024, 2048, 4096.");
             }
         }
         if (keyType.equals("ecc")) {
@@ -264,8 +264,8 @@ public class HttpInput {
         Pattern p = Pattern.compile("[A-Za-z0-9]+[A-Za-z0-9 -]*");
         Matcher m = p.matcher(v);
         if (!m.matches()) {
-            throw new IOException("Invalid characters found in Security Domain Name " + v
-                    + ". Valid characters are A-Z, a-z, 0-9, dash and space");
+            throw new IOException("Invalid characters found in Security Domain Name "
+                    + v + ". Valid characters are A-Z, a-z, 0-9, dash and space");
         }
         return v;
     }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
index 3120b9e23b8a8d44c8043750623bbc164a13f94f..da8d5bd5113c0890a30ac088916628b425ff98c9 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/DirBasedAuthentication.java
@@ -120,10 +120,10 @@ public abstract class DirBasedAuthentication
             "E=$attr.mail, CN=$attr.cn, O=$dn.o, C=$dn.c";
 
     /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
+    protected static Vector<String> mExtendedPluginInfo = null;
 
     static {
-        mExtendedPluginInfo = new Vector();
+        mExtendedPluginInfo = new Vector<String>();
         mExtendedPluginInfo.add(PROP_DNPATTERN + ";string;Template for cert" +
                 " Subject Name. ($dn.xxx - get value from user's LDAP " +
                 "DN.  $attr.yyy - get value from LDAP attributes in " +
@@ -570,8 +570,9 @@ public abstract class DirBasedAuthentication
         if (values == null)
             return;
 
-        Vector v = new Vector();
-        Enumeration e = values.getStringValues();
+        Vector<String> v = new Vector<String>();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = values.getStringValues();
 
         while (e.hasMoreElements()) {
             v.addElement(e.nextElement());
@@ -591,8 +592,9 @@ public abstract class DirBasedAuthentication
         if (values == null)
             return;
 
-        Vector v = new Vector();
-        Enumeration e = values.getByteValues();
+        Vector<byte[]> v = new Vector<byte[]>();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> e = values.getByteValues();
 
         while (e.hasMoreElements()) {
             v.addElement(e.nextElement());
diff --git a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
index 028cea37648ebec27a0cdd21a02fdd14e1242bfa..37e076d4a904d5c3fd2c61996f5179ed046a8d86 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
@@ -210,8 +210,8 @@ public class FlatFileAuth
             CMS.debug("FlatFileAuth: " + CMS.getLogMessage("CMS_AUTH_READ_ENTRIES", mFilename));
             // printAllEntries();
         } catch (IOException e) {
-            throw new EBaseException(mName + " authentication: Could not open file " + mFilename + "   ("
-                    + e.getMessage() + ")");
+            throw new EBaseException(mName
+                    + " authentication: Could not open file " + mFilename + "   (" + e.getMessage() + ")");
         } catch (java.lang.StringIndexOutOfBoundsException ee) {
             CMS.debug("FlatFileAuth: " + CMS.getLogMessage("OPERATION_ERROR", ee.toString()));
         }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java b/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
index 8a2a43ab4db9f30f316e18e149f3a3edc526a47b..35c23bd0f564022719dc93f69779e8f1281f3d10 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/SSLclientCertAuthentication.java
@@ -332,7 +332,7 @@ public class SSLclientCertAuthentication implements IAuthManager,
     /**
      * Retrieves a list of names of the value parameter.
      */
-    public Enumeration getValueNames() {
+    public Enumeration<String> getValueNames() {
         return null;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSAuthorityKeyIdentifierExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSAuthorityKeyIdentifierExtension.java
index 96d73d4c411da19850b004868a5097eac4aa060c..26c8c1d0e22f0227cc67abca85e88dba2c19cdae 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSAuthorityKeyIdentifierExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSAuthorityKeyIdentifierExtension.java
@@ -121,9 +121,10 @@ public class CMSAuthorityKeyIdentifierExtension
 
                 gNames.addElement(((ICertificateAuthority) crlIssuingPoint.getCertificateAuthority()).getX500Name());
 
-                authKeyIdExt = new AuthorityKeyIdentifierExtension(critical, null, gNames,
-                            new SerialNumber(((ICertificateAuthority) crlIssuingPoint.getCertificateAuthority())
-                                    .getCACert().getSerialNumber()));
+                authKeyIdExt =
+                        new AuthorityKeyIdentifierExtension(critical, null, gNames,
+                                new SerialNumber(((ICertificateAuthority) crlIssuingPoint.getCertificateAuthority())
+                                        .getCACert().getSerialNumber()));
             }
 
         } catch (IOException e) {
diff --git a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
index 48f20f61120e66e37921041b2434f2f6bd25efd8..29c5f21a5abf2b6e5ade39653d6769d892062b07 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
@@ -182,8 +182,8 @@ public class PublishCertsJob extends AJobBase
 
         // form filter
         String filter = // might need to use "metaInfo"
-        "(!(certMetainfo=" + ICertRecord.META_LDAPPUBLISH +
-                ":true))";
+                "(!(certMetainfo=" + ICertRecord.META_LDAPPUBLISH +
+                        ":true))";
 
         Enumeration unpublishedCerts = 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 3c2e14b22f4922ed3bd37dd247c16758580f348e..db61382c57ef8f127b264162ccacb2e530a65025 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
@@ -101,12 +101,12 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
     private final static String PROP_INCLUDE_NEXT_UPDATE =
             "includeNextUpdate";
 
-    protected Hashtable mReqCounts = new Hashtable();
+    protected Hashtable<String, Long> mReqCounts = new Hashtable<String, Long>();
     protected boolean mNotFoundGood = true;
     protected boolean mUseCache = true;
     protected boolean mByName = true;
     protected boolean mIncludeNextUpdate = false;
-    protected Hashtable mCacheCRLIssuingPoints = new Hashtable();
+    protected Hashtable<String, CRLIPContainer> mCacheCRLIssuingPoints = new Hashtable<String, CRLIPContainer>();
     private IOCSPAuthority mOCSPAuthority = null;
     private IConfigStore mConfig = null;
     private String mId = null;
@@ -122,13 +122,13 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
-        v.addElement(PROP_NOT_FOUND_GOOD + ";boolean; "
-                + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_NOT_FOUND_GOOD"));
+        v.addElement(PROP_NOT_FOUND_GOOD
+                + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_NOT_FOUND_GOOD"));
         v.addElement(PROP_BY_NAME + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_BY_NAME"));
-        v.addElement(PROP_INCLUDE_NEXT_UPDATE + ";boolean; "
-                + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_INCLUDE_NEXT_UPDATE"));
+        v.addElement(PROP_INCLUDE_NEXT_UPDATE
+                + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_PROP_INCLUDE_NEXT_UPDATE"));
         v.addElement(IExtendedPluginInfo.HELP_TEXT + "; " + CMS.getUserMessage(locale, "CMS_OCSP_DEFSTORE_DESC"));
         v.addElement(IExtendedPluginInfo.HELP_TOKEN + ";configuration-ocspstores-defstore");
         return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
@@ -226,7 +226,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
      * new one is totally committed.
      */
     public void deleteOldCRLs() throws EBaseException {
-        Enumeration recs = searchCRLIssuingPointRecord(
+        Enumeration<Object> recs = searchCRLIssuingPointRecord(
                 "objectclass=" +
                         CMS.getCRLIssuingPointRecordName(),
                 100);
@@ -234,9 +234,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         ICRLIssuingPointRecord theRec = null;
 
         while (recs.hasMoreElements()) {
-            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord)
-                    recs.nextElement();
-
+            ICRLIssuingPointRecord rec = (ICRLIssuingPointRecord) recs.nextElement();
             deleteOldCRLsInCA(rec.getId());
         }
     }
@@ -254,15 +252,14 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 return; // nothing to do
             String thisUpdate = Long.toString(
                     cp.getThisUpdate().getTime());
-            Enumeration e = searchRepository(
+            Enumeration<Object> e = searchRepository(
                     caName,
                     "(!" + IRepositoryRecord.ATTR_SERIALNO + "=" +
                             thisUpdate + ")");
 
             while (e != null && e.hasMoreElements()) {
-                IRepositoryRecord r = (IRepositoryRecord)
-                        e.nextElement();
-                Enumeration recs =
+                IRepositoryRecord r = (IRepositoryRecord) e.nextElement();
+                Enumeration<Object> recs =
                         searchCertRecord(caName,
                                 r.getSerialNumber().toString(),
                                 ICertRecord.ATTR_ID + "=*");
@@ -339,7 +336,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
 
             // (3) look into database to check the
             //     certificate's status
-            Vector singleResponses = new Vector();
+            Vector<SingleResponse> singleResponses = new Vector<SingleResponse>();
             if (statsSub != null) {
                 statsSub.startTiming("lookup");
             }
@@ -440,7 +437,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                     mCacheCRLIssuingPoints.get(new String(keyhsh));
 
             if (matched == null) {
-                Enumeration recs = searchCRLIssuingPointRecord(
+                Enumeration<Object> recs = searchCRLIssuingPointRecord(
                         "objectclass=" +
                                 CMS.getCRLIssuingPointRecordName(),
                         100);
@@ -524,7 +521,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                     // if crl is not available, we can try crl cache
                     if (theRec != null) {
                         CMS.debug("DefStore: evaluating crl cache");
-                        Hashtable cache = theRec.getCRLCacheNoClone();
+                        Hashtable<BigInteger, RevokedCertificate> cache = theRec.getCRLCacheNoClone();
                         if (cache != null) {
                             RevokedCertificate rc = (RevokedCertificate)
                                     cache.get(new BigInteger(serialNo.toString()));
@@ -582,7 +579,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         return mDBService.getBaseDN();
     }
 
-    public Enumeration searchAllCRLIssuingPointRecord(int maxSize)
+    public Enumeration<Object> searchAllCRLIssuingPointRecord(int maxSize)
             throws EBaseException {
         return searchCRLIssuingPointRecord(
                 "objectclass=" +
@@ -590,11 +587,11 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
                 maxSize);
     }
 
-    public Enumeration searchCRLIssuingPointRecord(String filter,
+    public Enumeration<Object> searchCRLIssuingPointRecord(String filter,
             int maxSize)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
 
         try {
             e = s.search(getBaseDN(), filter, maxSize);
@@ -688,10 +685,10 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration searchRepository(String name, String filter)
+    public Enumeration<Object> searchRepository(String name, String filter)
             throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
 
         try {
             e = s.search("cn=" + transformDN(name) + "," + getBaseDN(),
@@ -739,10 +736,10 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         }
     }
 
-    public Enumeration searchCertRecord(String name, String thisUpdate,
+    public Enumeration<Object> searchCertRecord(String name, String thisUpdate,
             String filter) throws EBaseException {
         IDBSSession s = mDBService.createSession();
-        Enumeration e = null;
+        Enumeration<Object> e = null;
 
         try {
             e = s.search("ou=" + thisUpdate + ",cn=" +
@@ -814,7 +811,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
 
     public void setConfigParameters(NameValuePairs pairs)
             throws EBaseException {
-        Enumeration k = pairs.getNames();
+        Enumeration<String> k = pairs.getNames();
 
         while (k.hasMoreElements()) {
             String key = (String) k.nextElement();
@@ -938,10 +935,10 @@ class CRLIPContainer {
 }
 
 class DefStoreCRLUpdater extends Thread {
-    private Hashtable mCache = null;
+    private Hashtable<String, CRLIPContainer> mCache = null;
     private int mSec = 0;
 
-    public DefStoreCRLUpdater(Hashtable cache, int sec) {
+    public DefStoreCRLUpdater(Hashtable<String, CRLIPContainer> cache, int sec) {
         mCache = cache;
         mSec = sec;
     }
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 6fa3d300c16b44b019e16fa798ea14879b7d9e2d..4a0225a40464a801c672116a939065571bbf58bd 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
@@ -101,7 +101,7 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
     private boolean mByName = true;
     private String mCACertAttr = null;
     protected Hashtable mReqCounts = new Hashtable();
-    private Hashtable mCRLs = new Hashtable();
+    private Hashtable<X509CertImpl, Object> mCRLs = new Hashtable<X509CertImpl, Object>();
 
     /**
      * Constructs the default store.
@@ -112,15 +112,15 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
     public String[] getExtendedPluginInfo(Locale locale) {
         Vector v = new Vector();
 
-        v.addElement(PROP_NOT_FOUND_GOOD + ";boolean; "
-                + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_NOT_FOUND_GOOD"));
-        v.addElement(PROP_INCLUDE_NEXT_UPDATE + ";boolean; "
-                + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_INCLUDE_NEXT_UPDATE"));
+        v.addElement(PROP_NOT_FOUND_GOOD
+                + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_NOT_FOUND_GOOD"));
+        v.addElement(PROP_INCLUDE_NEXT_UPDATE
+                + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_INCLUDE_NEXT_UPDATE"));
         v.addElement(PROP_NUM_CONNS + ";number; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_NUM_CONNS"));
         v.addElement(PROP_BY_NAME + ";boolean; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_BY_NAME"));
         v.addElement(PROP_CRL_ATTR + ";string; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_CRL_ATTR"));
-        v.addElement(PROP_CA_CERT_ATTR + ";string; "
-                + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_CA_CERT_ATTR"));
+        v.addElement(PROP_CA_CERT_ATTR
+                + ";string; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_PROP_CA_CERT_ATTR"));
         v.addElement(IExtendedPluginInfo.HELP_TEXT + "; " + CMS.getUserMessage(locale, "CMS_OCSP_LDAPSTORE_DESC"));
         v.addElement(IExtendedPluginInfo.HELP_TOKEN + ";configuration-ocspstores-ldapstore");
         return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
@@ -393,13 +393,13 @@ public class LDAPStore implements IDefStore, IExtendedPluginInfo {
         throw new EBaseException("NOT SUPPORTED");
     }
 
-    public Enumeration searchAllCRLIssuingPointRecord(int maxSize)
+    public Enumeration<Object> searchAllCRLIssuingPointRecord(int maxSize)
             throws EBaseException {
         Vector recs = new Vector();
-        Enumeration keys = mCRLs.keys();
+        Enumeration<X509CertImpl> keys = mCRLs.keys();
 
         while (keys.hasMoreElements()) {
-            X509CertImpl caCert = (X509CertImpl) keys.nextElement();
+            X509CertImpl caCert = keys.nextElement();
             X509CRLImpl crl = (X509CRLImpl) mCRLs.get(caCert);
 
             recs.addElement(new TempCRLIssuingPointRecord(caCert, crl));
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/IssuerConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/IssuerConstraints.java
index 09feb27664d01c2b1e5822475a4a81e8433ed617..b0e27501e4d576aa5e2a5620edd19627b0315d2b 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/IssuerConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/IssuerConstraints.java
@@ -72,7 +72,7 @@ public class IssuerConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Rejects the request if the issuer in the certificate is" +
                         "not of the one specified"
-            };
+        };
 
         return params;
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalConstraints.java
index 2b220cb8f9d47a694fb17f8bc9d1c4468a2739a4..185bceed9b1f7185aa319043e341c1b04632944b 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalConstraints.java
@@ -84,7 +84,7 @@ public class RenewalConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Permit administrator to decide policy on whether to " +
                         "permit renewals for already-expired certificates"
-            };
+        };
 
         return params;
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java
index 862f8ac5a3bfe81ded73dff24f796cc3b431ee30..b2f654b7733555be16e8341f43b4d46652c4de8a 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java
@@ -86,8 +86,10 @@ public class RenewalValidityConstraints extends APolicyRule
 
     public String[] getExtendedPluginInfo(Locale locale) {
         String[] params = {
-                PROP_MIN_VALIDITY + ";number;Specifies the minimum validity period, in days, for renewed certificates.",
-                PROP_MAX_VALIDITY + ";number;Specifies the maximum validity period, in days, for renewed certificates.",
+                PROP_MIN_VALIDITY
+                        + ";number;Specifies the minimum validity period, in days, for renewed certificates.",
+                PROP_MAX_VALIDITY
+                        + ";number;Specifies the maximum validity period, in days, for renewed certificates.",
                 PROP_RENEWAL_INTERVAL
                         + ";number;Specifies how many days before its expiration that a certificate can be renewed.",
                 IExtendedPluginInfo.HELP_TOKEN +
@@ -95,7 +97,7 @@ public class RenewalValidityConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Reject renewal request if the certificate is too far " +
                         "before it's expiry date"
-            };
+        };
 
         return params;
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java
index 1dd99702f3adf81eca26e990e9855029c4637fff..8c2ba0796753ef44bc1e8c299b20bc0ffac5027e 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java
@@ -376,7 +376,8 @@ public class SigningAlgorithmConstraints extends APolicyRule
         String[] params = null;
 
         String[] params_BOTH = {
-                PROP_ALGORITHMS + ";"
+                PROP_ALGORITHMS
+                        + ";"
                         + "choice(MD2withRSA\\,MD5withRSA\\,SHA1withRSA\\,SHA256withRSA\\,SHA512withRSA\\,SHA1withDSA,"
                         +
                         "MD2withRSA\\,MD5withRSA\\,SHA1withRSA\\,SHA1withDSA," +
@@ -399,7 +400,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Restricts the requested signing algorithm to be one of" +
                         " the algorithms supported by Certificate System"
-            };
+        };
 
         String[] params_RSA = {
                 PROP_ALGORITHMS + ";" + "choice(MD2withRSA\\,MD5withRSA\\,SHA1withRSA," +
@@ -414,7 +415,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Restricts the requested signing algorithm to be one of" +
                         " the algorithms supported by Certificate System"
-            };
+        };
 
         String[] params_DSA = {
                 PROP_ALGORITHMS + ";" + "choice(SHA1withDSA);Restrict the requested signing " +
@@ -424,7 +425,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Restricts the requested signing algorithm to be one of" +
                         " the algorithms supported by Certificate System"
-            };
+        };
 
         switch (mDefaultAllowedAlgs.length) {
         case 1:
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
index a3eeae98cc4e43307e743c9ee07d1bec08b84537..8c106800aac0df1919fda0cbe537cdab5cf61fd3 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/UniqueSubjectNameConstraints.java
@@ -94,7 +94,7 @@ public class UniqueSubjectNameConstraints extends APolicyRule
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Rejects a request if there exists an unrevoked, unexpired " +
                         "certificate with the same subject name"
-            };
+        };
 
         return params;
 
@@ -185,14 +185,15 @@ public class UniqueSubjectNameConstraints extends APolicyRule
                 String filter = "x509Cert.subject=" + certSubjectName;
                 // subject name is indexed, so we only use subject name
                 // in the filter
-                Enumeration matched =
+                Enumeration<ICertRecord> matched =
                         mCA.getCertificateRepository().findCertRecords(filter);
 
                 while (matched.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) matched.nextElement();
+                    ICertRecord rec = matched.nextElement();
                     String status = rec.getStatus();
 
-                    if (status.equals(ICertRecord.STATUS_REVOKED) || status.equals(ICertRecord.STATUS_EXPIRED)
+                    if (status.equals(ICertRecord.STATUS_REVOKED)
+                            || status.equals(ICertRecord.STATUS_EXPIRED)
                             || status.equals(ICertRecord.STATUS_REVOKED_EXPIRED)) {
                         // accept this only if we have a REVOKED, 
                         // EXPIRED or REVOKED_EXPIRED certificate
@@ -287,8 +288,8 @@ public class UniqueSubjectNameConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector confParams = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> confParams = new Vector<String>();
 
         confParams.addElement(PROP_PRE_AGENT_APPROVAL_CHECKING +
                 "=" + mPreAgentApprovalChecking);
@@ -302,8 +303,8 @@ public class UniqueSubjectNameConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_PRE_AGENT_APPROVAL_CHECKING + "=");
         defParams.addElement(PROP_KEY_USAGE_EXTENSION_CHECKING + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
index cf94d73ee25f2d916550760b74fbb9737c97539c..fea1265679f18608c0e88fdc296aceeef7408028 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthInfoAccessExt.java
@@ -18,6 +18,7 @@
 package com.netscape.cms.policy.extensions;
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
 import java.util.Locale;
@@ -104,7 +105,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL +
                 ";boolean;RFC 2459 recommendation: This extension MUST be non-critical.");
@@ -122,10 +123,10 @@ public class AuthInfoAccessExt extends APolicyRule implements
                     + PROP_METHOD
                     + ";string;"
                     + "A unique,valid OID specified in dot-separated numeric component notation. e.g. 1.3.6.1.5.5.7.48.1 (ocsp), 1.3.6.1.5.5.7.48.2 (caIssuers), 2.16.840.1.113730.1.16.1 (renewal)");
-            v.addElement(PROP_AD + Integer.toString(i) + "_" + PROP_LOCATION_TYPE + ";"
-                    + IGeneralNameUtil.GENNAME_CHOICE_INFO);
-            v.addElement(PROP_AD + Integer.toString(i) + "_" + PROP_LOCATION + ";"
-                    + IGeneralNameUtil.GENNAME_VALUE_INFO);
+            v.addElement(PROP_AD
+                    + Integer.toString(i) + "_" + PROP_LOCATION_TYPE + ";" + IGeneralNameUtil.GENNAME_CHOICE_INFO);
+            v.addElement(PROP_AD
+                    + Integer.toString(i) + "_" + PROP_LOCATION + ";" + IGeneralNameUtil.GENNAME_VALUE_INFO);
         }
         return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
     }
@@ -149,8 +150,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
     /**
      * Returns a sequence of access descriptions.
      */
-    private Enumeration getAccessDescriptions() throws EBaseException {
-        Vector ads = new Vector();
+    private Enumeration<Vector<Serializable>> getAccessDescriptions() throws EBaseException {
+        Vector<Vector<Serializable>> ads = new Vector<Vector<Serializable>>();
 
         //
         // read until there is *NO* ad<NUM>_method
@@ -200,7 +201,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
             if (location == null)
                 break;
             GeneralName gn = CMS.form_GeneralName(location_type, location);
-            Vector e = new Vector();
+            Vector<Serializable> e = new Vector<Serializable>();
 
             e.addElement(methodOID);
             e.addElement(gn);
@@ -245,7 +246,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
                         certInfo.get(X509CertInfo.EXTENSIONS);
 
                 // add access descriptions
-                Enumeration e = getAccessDescriptions();
+                Enumeration<Vector<Serializable>> e = getAccessDescriptions();
 
                 if (!e.hasMoreElements()) {
                     return res;
@@ -261,7 +262,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
                     // check to see if AIA is already exist
                     try {
                         extensions.delete(AuthInfoAccessExtension.NAME);
-                        log(ILogger.LL_WARN, "Previous extension deleted: " + AuthInfoAccessExtension.NAME);
+                        log(ILogger.LL_WARN,
+                                "Previous extension deleted: " + AuthInfoAccessExtension.NAME);
                     } catch (IOException ex) {
                     }
                 }
@@ -272,7 +274,7 @@ public class AuthInfoAccessExt extends APolicyRule implements
                                 PROP_CRITICAL, false));
 
                 while (e.hasMoreElements()) {
-                    Vector ad = (Vector) e.nextElement();
+                    Vector<Serializable> ad = e.nextElement();
                     ObjectIdentifier oid = (ObjectIdentifier) ad.elementAt(0);
                     GeneralName gn = (GeneralName) ad.elementAt(1);
 
@@ -306,8 +308,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" +
@@ -368,8 +370,8 @@ public class AuthInfoAccessExt extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NUM_ADS + "=" + MAX_AD);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
index 94a1f19a7ab2552b50c0b7cdf6e67a6ab830db5e..971379a46e61821b2c06cb09d17f97ddce6495fd 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/AuthorityKeyIdentifierExt.java
@@ -80,10 +80,10 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
     protected AuthorityKeyIdentifierExtension mTheExtension = null;
 
     // instance params for console
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     // default params for console.
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         // form static default params.
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -390,7 +390,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -399,7 +399,7 @@ public class AuthorityKeyIdentifierExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
index 10aa8630fa4f40159bcfdf23fdecfb55edd76933..1d22d48ecb72b6fc1aba893c4b5829712ed6cbba 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
@@ -464,8 +464,8 @@ public class BasicConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         // Because of one of the UI bugs 385273, we should leave the empty space
         // as is. Do not convert the space to some definite numbers.
@@ -480,8 +480,8 @@ public class BasicConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_IS_CRITICAL + "=true");
         defParams.addElement(PROP_MAXPATHLEN + "=");
@@ -501,7 +501,7 @@ public class BasicConstraintsExt extends APolicyRule
                         ";configuration-policyrules-basicconstraints",
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Adds the Basic Constraints extension. See RFC 2459 (4.2.1.10)"
-            };
+        };
 
         return params;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
index 4ba2a44dc6ad532fa715e4d10458fcfba9458233..1ede3d5d0741a4a928c52178c658d3b8d1569e32 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CRLDistributionPointsExt.java
@@ -75,14 +75,14 @@ class NameType {
         stringRep = s;
     }
 
-    private static Hashtable map = new Hashtable();
+    private static Hashtable<String, NameType> map = new Hashtable<String, NameType>();
 
     /**
      * Looks up a NameType from its string representation. Returns null
      * if no matching NameType was found.
      */
     public static NameType fromString(String s) {
-        return (NameType) map.get(s);
+        return map.get(s);
     }
 
     public String toString() {
@@ -144,9 +144,9 @@ public class CRLDistributionPointsExt extends APolicyRule
     // PKIX specifies the that the extension SHOULD NOT be critical
     public static final boolean DEFAULT_CRITICALITY = false;
 
-    private Vector defaultParams = new Vector();
+    private Vector<String> defaultParams = new Vector<String>();
 
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
     private String mExtParams[] = null;
     private CRLDistributionPointsExtension mCrldpExt = null;
 
@@ -165,7 +165,7 @@ public class CRLDistributionPointsExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         // should replace MAX_POINTS with mNumPoints if bug 385118 is fixed
         for (int i = 0; i < MAX_POINTS; i++) {
@@ -462,7 +462,7 @@ public class CRLDistributionPointsExt extends APolicyRule
     }
 
     // parameters must be entered in the config file
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         for (int i = DEFAULT_NUM_BLANK_POINTS; i < mNumPoints; i++) {
             defaultParams.addElement(PROP_POINT_NAME + i + "=");
             defaultParams.addElement(PROP_POINT_TYPE + i + "=");
@@ -478,7 +478,7 @@ public class CRLDistributionPointsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
index e2c31cf5a248049db3a9942c88adb96e0f8322ec..7ea2d6fb86988b7461485a8017e406679a5493ba 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificatePoliciesExt.java
@@ -79,7 +79,7 @@ public class CertificatePoliciesExt extends APolicyRule
     protected int mNumCertPolicies = DEF_NUM_CERTPOLICIES;
     protected CertPolicy[] mCertPolicies = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
     protected CertificatePoliciesExtension mCertificatePoliciesExtension = null;
 
     public CertificatePoliciesExt() {
@@ -132,7 +132,7 @@ public class CertificatePoliciesExt extends APolicyRule
         // create instance of certificate policy extension if enabled.
         if (mEnabled) {
             try {
-                Vector CertPolicies = new Vector();
+                Vector<CertificatePolicyInfo> CertPolicies = new Vector<CertificatePolicyInfo>();
 
                 for (int j = 0; j < mNumCertPolicies; j++) {
                     CertPolicies.addElement(
@@ -239,7 +239,7 @@ public class CertificatePoliciesExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -249,7 +249,7 @@ public class CertificatePoliciesExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -274,12 +274,12 @@ public class CertificatePoliciesExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 3280 recommendation: MUST be non-critical.");
         theparams.addElement(PROP_NUM_CERTPOLICIES
@@ -445,7 +445,7 @@ class CertPolicy {
                 // should add a method to NoticeReference to take a
                 // Vector...but let's do this for now
 
-                Vector numsVector = new Vector();
+                Vector<String> numsVector = new Vector<String>();
                 StringTokenizer tokens = new StringTokenizer(mNoticeRefNums,
                         ",");
 
@@ -458,7 +458,7 @@ class CertPolicy {
                 nums = new int[numsVector.size()];
 
                 for (int i = 0; i < numsVector.size(); i++) {
-                    Integer ii = new Integer((String) numsVector.elementAt(i));
+                    Integer ii = new Integer(numsVector.elementAt(i));
 
                     nums[i] = ii.intValue();
                 }
@@ -516,7 +516,7 @@ class CertPolicy {
         }
     }
 
-    protected void getInstanceParams(Vector instanceParams) {
+    protected void getInstanceParams(Vector<String> instanceParams) {
         instanceParams.addElement(
                 mNameDot + PROP_POLICY_IDENTIFIER + "=" + (mPolicyId == null ? "" :
                         mPolicyId));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
index 305c11b2e0f2b0bea287e045f6b86f1039c80c47..28366ade84ae2a8fff6d986e29971ae75db0d4ba 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateRenewalWindowExt.java
@@ -210,7 +210,7 @@ public class CertificateRenewalWindowExt extends APolicyRule
                         ";configuration-policyrules-certificaterenewalwindow",
                 IExtendedPluginInfo.HELP_TEXT +
                         ";Adds 'Certificate Renewal Window' extension. See manual"
-            };
+        };
 
         return params;
 
@@ -221,8 +221,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         if (mBeginTime == null) {
@@ -243,8 +243,8 @@ public class CertificateRenewalWindowExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_BEGIN_TIME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
index 88ffb4dff7b0b92d7f03c85a5e57cc079002aca7..b385923af7b97ec055e18af2e896e7f803723247 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/CertificateScopeOfUseExt.java
@@ -78,7 +78,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL +
                 ";boolean; This extension may be either critical or non-critical.");
@@ -89,10 +89,10 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
 
         for (int i = 0; i < MAX_ENTRY; i++) {
             v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_NAME + ";" + IGeneralNameUtil.GENNAME_VALUE_INFO);
-            v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_NAME_TYPE + ";"
-                    + IGeneralNameUtil.GENNAME_CHOICE_INFO);
-            v.addElement(PROP_ENTRY + Integer.toString(i) + "_" + PROP_PORT_NUMBER + ";string;"
-                    + "The port number (optional).");
+            v.addElement(PROP_ENTRY
+                    + Integer.toString(i) + "_" + PROP_NAME_TYPE + ";" + IGeneralNameUtil.GENNAME_CHOICE_INFO);
+            v.addElement(PROP_ENTRY
+                    + Integer.toString(i) + "_" + PROP_PORT_NUMBER + ";string;" + "The port number (optional).");
         }
         return com.netscape.cmsutil.util.Utils.getStringArrayFromVector(v);
     }
@@ -116,8 +116,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
     /**
      * Returns a sequence of scope entry.
      */
-    private Vector getScopeEntries() throws EBaseException {
-        Vector entries = new Vector();
+    private Vector<CertificateScopeEntry> getScopeEntries() throws EBaseException {
+        Vector<CertificateScopeEntry> entries = new Vector<CertificateScopeEntry>();
 
         //
         // read until there is *NO* ad<NUM>_method
@@ -190,7 +190,7 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
                         certInfo.get(X509CertInfo.EXTENSIONS);
 
                 // add access descriptions
-                Vector entries = getScopeEntries();
+                Vector<CertificateScopeEntry> entries = getScopeEntries();
 
                 if (entries.size() == 0) {
                     return res;
@@ -247,8 +247,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" +
@@ -303,8 +303,8 @@ public class CertificateScopeOfUseExt extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
index 98ab09166842657521adf878af29f4c0ee3c02d3..65ef6b937817e6b43c6d5dfd58f80cf0904a01ca 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/ExtendedKeyUsageExt.java
@@ -59,7 +59,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
     protected static int MAX_PURPOSE_ID = 10;
     private boolean mCritical = false;
     private IConfigStore mConfig = null;
-    private Vector mUsages = null;
+    private Vector<ObjectIdentifier> mUsages = null;
 
     private String[] mParams = null;
 
@@ -156,8 +156,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
     /**
      * Returns instance specific parameters.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         int numIds = MAX_PURPOSE_ID;
@@ -188,7 +188,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
         int mNum = MAX_PURPOSE_ID;
 
         if (mConfig != null) {
@@ -228,8 +228,8 @@ public class ExtendedKeyUsageExt extends APolicyRule
     /**
      * Returns default parameters.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NUM_IDS + "=" + MAX_PURPOSE_ID);
@@ -246,7 +246,7 @@ public class ExtendedKeyUsageExt extends APolicyRule
 
         mCritical = mConfig.getBoolean(PROP_CRITICAL, false);
         if (mUsages == null) {
-            mUsages = new Vector();
+            mUsages = new Vector<ObjectIdentifier>();
         }
 
         int mNum = mConfig.getInteger(PROP_NUM_IDS, MAX_PURPOSE_ID);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
index 495788a1a4bef77e4f77f31de179593efb2ac999..0202ee784e5efcb47737fbccece07f91837597eb 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/GenericASN1Ext.java
@@ -388,7 +388,7 @@ public class GenericASN1Ext extends APolicyRule implements
                 // Create the extension
                 GenericASN1Extension priExt = mkExtension();
 
-                extensions.set(GenericASN1Extension.NAME, priExt);
+                extensions.set(priExt.getName(), priExt);
 
             } catch (IOException e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("BASE_IO_ERROR", e.getMessage()));
@@ -429,9 +429,9 @@ public class GenericASN1Ext extends APolicyRule implements
             throws IOException, EBaseException, ParseException {
         GenericASN1Extension ext;
 
-        Hashtable h = new Hashtable();
+        Hashtable<String, String> h = new Hashtable<String, String>();
         // This only show one level, not substores!
-        Enumeration e = mConfig.getPropertyNames();
+        Enumeration<String> e = mConfig.getPropertyNames();
 
         while (e.hasMoreElements()) {
             String n = (String) e.nextElement();
@@ -456,9 +456,9 @@ public class GenericASN1Ext extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         int idx = 0;
-        Vector params = new Vector();
+        Vector<String> params = new Vector<String>();
 
         try {
             params.addElement(PROP_CRITICAL + "=" + mConfig.getBoolean(PROP_CRITICAL, false));
@@ -488,10 +488,10 @@ public class GenericASN1Ext extends APolicyRule implements
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         int idx = 0;
 
-        Vector defParams = new Vector();
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_NAME + "=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
index b76651ea6cf10f20d4cc82dac073c635a829e053..21afaa18858138478a473abcae071166c7ee41e1 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
@@ -62,14 +62,14 @@ public class IssuerAltNameExt extends APolicyRule
     // PKIX specifies the that the extension SHOULD NOT be critical
     public static final boolean DEFAULT_CRITICALITY = false;
 
-    private static Vector defaultParams = new Vector();
+    private static Vector<String> defaultParams = new Vector<String>();
     private static String[] mInfo = null;
 
     static {
         defaultParams.addElement(PROP_CRITICAL + "=" + DEFAULT_CRITICALITY);
         CMS.getGeneralNamesConfigDefaultParams(null, true, defaultParams);
 
-        Vector info = new Vector();
+        Vector<String> info = new Vector<String>();
 
         info.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: SHOULD NOT be marked critical.");
         info.addElement(IExtendedPluginInfo.HELP_TOKEN +
@@ -84,7 +84,7 @@ public class IssuerAltNameExt extends APolicyRule
         info.copyInto(mInfo);
     }
 
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
     private IConfigStore mConfig = null;
     private boolean mCritical = DEFAULT_CRITICALITY;
     private boolean mEnabled = false;
@@ -230,7 +230,7 @@ public class IssuerAltNameExt extends APolicyRule
      * @return Empty Vector since this policy has no configuration parameters.
      *         for this policy instance.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mParams;
     }
 
@@ -240,7 +240,7 @@ public class IssuerAltNameExt extends APolicyRule
      * @return Empty Vector since this policy implementation has no
      *         configuration parameters.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
index e89aa8488ee860add39a39358ae4bd272556fe06..037206b89e3b6e84ab0151effc33b222fe80f2b4 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/KeyUsageExt.java
@@ -282,8 +282,8 @@ public class KeyUsageExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         params.addElement(PROP_DIGITAL_SIGNATURE + "=" + mDigitalSignature);
@@ -298,7 +298,7 @@ public class KeyUsageExt extends APolicyRule
         return params;
     }
 
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=true");
         mDefParams.addElement(PROP_DIGITAL_SIGNATURE + "=");
@@ -348,7 +348,7 @@ public class KeyUsageExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
index 7540191f31229314a3d7bd9baa29e87044f6487f..f3ae4efa4d5472c3559f0045ec00a2284b7652b6 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
@@ -71,7 +71,7 @@ public class NSCCommentExt extends APolicyRule
     protected String mCommentFile;
     protected String mInputType;
     protected boolean mCritical;
-    private Vector mParams = new Vector();
+    private Vector<String> mParams = new Vector<String>();
 
     protected String tempCommentFile;
     protected boolean certApplied = false;
@@ -276,7 +276,7 @@ public class NSCCommentExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mParams;
     }
 
@@ -285,8 +285,8 @@ public class NSCCommentExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         defParams.addElement(PROP_INPUT_TYPE + "=" + TEXT);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
index 195a8792ae546bd23e59c475ba7f19cca9053f40..8903535dd2700249093d02e6ac4bee96665cf8b5 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCertTypeExt.java
@@ -494,8 +494,8 @@ public class NSCertTypeExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         params.addElement(PROP_SET_DEFAULT_BITS + "=" + mSetDefaultBits);
@@ -503,7 +503,7 @@ public class NSCertTypeExt extends APolicyRule
         return params;
     }
 
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(
                 PROP_CRITICAL + "=false");
@@ -532,7 +532,7 @@ public class NSCertTypeExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
index 3492ea5ede10e4a196b08ca2e1e12d8b5a7f5d9c..f010bf3f1c5fe02206c6227346f3a7b06113d991 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NameConstraintsExt.java
@@ -79,7 +79,7 @@ public class NameConstraintsExt extends APolicyRule
     protected Subtree[] mExcludedSubtrees = null;
     protected NameConstraintsExtension mNameConstraintsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     public NameConstraintsExt() {
         NAME = "NameConstraintsExt";
@@ -157,13 +157,13 @@ public class NameConstraintsExt extends APolicyRule
         // create instance of name constraints extension if enabled.
         if (mEnabled) {
             try {
-                Vector permittedSubtrees = new Vector();
+                Vector<GeneralSubtree> permittedSubtrees = new Vector<GeneralSubtree>();
 
                 for (int i = 0; i < mNumPermittedSubtrees; i++) {
                     permittedSubtrees.addElement(
                             mPermittedSubtrees[i].mGeneralSubtree);
                 }
-                Vector excludedSubtrees = new Vector();
+                Vector<GeneralSubtree> excludedSubtrees = new Vector<GeneralSubtree>();
 
                 for (int j = 0; j < mNumExcludedSubtrees; j++) {
                     excludedSubtrees.addElement(
@@ -323,7 +323,7 @@ public class NameConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -333,7 +333,7 @@ public class NameConstraintsExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -353,12 +353,12 @@ public class NameConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be critical.");
         theparams.addElement(
@@ -447,13 +447,13 @@ class Subtree {
         }
     }
 
-    void getInstanceParams(Vector instanceParams) {
+    void getInstanceParams(Vector<String> instanceParams) {
         mBase.getInstanceParams(instanceParams);
         instanceParams.addElement(mNameDotMin + "=" + mMin);
         instanceParams.addElement(mNameDotMax + "=" + mMax);
     }
 
-    static void getDefaultParams(String name, Vector params) {
+    static void getDefaultParams(String name, Vector<String> params) {
         String nameDot = "";
 
         if (name != null && name.length() >= 0)
@@ -463,7 +463,7 @@ class Subtree {
         params.addElement(nameDot + PROP_MAX + "=" + DEF_MAX);
     }
 
-    static void getExtendedPluginInfo(String name, Vector info) {
+    static void getExtendedPluginInfo(String name, Vector<String> info) {
         String nameDot = "";
 
         if (name != null && name.length() > 0)
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
index 2bb3ff803eb8d516f06b135857be0e34c1b457bb..33f2f85e04aa84a2ff3862876c7ff8b31d1d0a51 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/OCSPNoCheckExt.java
@@ -169,8 +169,8 @@ public class OCSPNoCheckExt extends APolicyRule
     /**
      * Returns instance parameters.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_CRITICAL + "=" + mCritical);
         return params;
@@ -180,8 +180,8 @@ public class OCSPNoCheckExt extends APolicyRule
     /**
      * Returns default parameters.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_CRITICAL + "=false");
         return defParams;
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
index ec67627019b89962a09ffa554296e090ed2008e6..861107b8e9ec8e4aca22f8e208ed5f3ceb9b9e55 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyConstraintsExt.java
@@ -71,9 +71,9 @@ public class PolicyConstraintsExt extends APolicyRule
     protected int mInhibitPolicyMapping = DEF_INHIBIT_POLICY_MAPPING;
     protected PolicyConstraintsExtension mPolicyConstraintsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefaultParams.addElement(
@@ -250,7 +250,7 @@ public class PolicyConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -259,7 +259,7 @@ public class PolicyConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefaultParams;
     }
 
@@ -280,7 +280,7 @@ public class PolicyConstraintsExt extends APolicyRule
                 PROP_INHIBIT_POLICY_MAPPING
                         + ";integer;Number of addional certificates that may appear in the path before policy mapping is no longer permitted. If less than 0 this field is unset in the extension.",
                 IExtendedPluginInfo.HELP_TOKEN + ";configuration-policyrules-policyconstraints"
-            };
+        };
 
         return params;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
index f3ef6c710407c0178960eea754ad25bfb3c3bbd0..7623f455f414289c5428a2301a3a880f7b98bbaa 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PolicyMappingsExt.java
@@ -74,7 +74,7 @@ public class PolicyMappingsExt extends APolicyRule
     protected PolicyMap[] mPolicyMaps = null;
     protected PolicyMappingsExtension mPolicyMappingsExtension = null;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
     public PolicyMappingsExt() {
         NAME = "PolicyMappingsExt";
@@ -146,7 +146,7 @@ public class PolicyMappingsExt extends APolicyRule
         // create instance of policy mappings extension if enabled.
         if (mEnabled) {
             try {
-                Vector certPolicyMaps = new Vector();
+                Vector<CertificatePolicyMap> certPolicyMaps = new Vector<CertificatePolicyMap>();
 
                 for (int j = 0; j < mNumPolicyMappings; j++) {
                     certPolicyMaps.addElement(
@@ -261,7 +261,7 @@ public class PolicyMappingsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -271,7 +271,7 @@ public class PolicyMappingsExt extends APolicyRule
      * increase the num to greater than 0 and more configuration params
      * will show up in the console.
      */
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
         mDefParams.addElement(
@@ -289,12 +289,12 @@ public class PolicyMappingsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector theparams = new Vector();
+        Vector<String> theparams = new Vector<String>();
 
         theparams.addElement(PROP_CRITICAL + ";boolean;RFC 2459 recommendation: MUST be non-critical.");
         theparams.addElement(PROP_NUM_POLICYMAPPINGS
@@ -414,7 +414,7 @@ class PolicyMap {
         }
     }
 
-    protected void getInstanceParams(Vector instanceParams) {
+    protected void getInstanceParams(Vector<String> instanceParams) {
         instanceParams.addElement(
                 mNameDot + PROP_ISSUER_DOMAIN_POLICY + "=" + (mIssuerDomainPolicy == null ? "" :
                         mIssuerDomainPolicy));
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
index 4ce8709502d2c692158ba2ef0ade672161e30397..e13a7a84ca493ac67a27fc25115dec0a13e7784b 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PresenceExt.java
@@ -41,7 +41,7 @@ import com.netscape.cms.policy.APolicyRule;
  * @version $Revision$, $Date$
  */
 public class PresenceExt extends APolicyRule {
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     private IConfigStore mConfig = null;
     private String mOID = null;
     private boolean mCritical;
@@ -106,8 +106,8 @@ public class PresenceExt extends APolicyRule {
         return res;
     }
 
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_IS_CRITICAL + "=" + mCritical);
         params.addElement(PROP_OID + "=" + mOID);
@@ -151,7 +151,7 @@ public class PresenceExt extends APolicyRule {
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
index eaf19bb339547c70bfa4e6f78f505b97b81771ab..52c8f1f6965aff1da79ce585aace1b2b5c9d97a1 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java
@@ -78,13 +78,13 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
     protected String mNotAfter;
     protected boolean mCritical;
 
-    private static Vector defaultParams;
+    private static Vector<String> defaultParams;
 
     static {
 
         formatter.setLenient(false);
 
-        defaultParams = new Vector();
+        defaultParams = new Vector<String>();
         defaultParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
         defaultParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
         defaultParams.addElement(PROP_NOT_AFTER + "=" + DEFAULT_NOT_AFTER);
@@ -230,8 +230,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
      * @return Empty Vector since this policy has no configuration parameters.
      *         for this policy instance.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         params.addElement(PROP_IS_CRITICAL + "=" + mCritical);
         params.addElement(PROP_NOT_BEFORE + "=" + mNotBefore);
@@ -245,8 +245,8 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
      * @return Empty Vector since this policy implementation has no
      *         configuration parameters.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         defParams.addElement(PROP_IS_CRITICAL + "=" + DEFAULT_CRITICALITY);
         defParams.addElement(PROP_NOT_BEFORE + "=" + DEFAULT_NOT_BEFORE);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
index 197d1585e1e8bd25e783a52923c50b51ed8d003c..0af977a2430cda8e72d8bbfeabb85b86b94131b0 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/RemoveBasicConstraintsExt.java
@@ -113,8 +113,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         return params;
     }
@@ -124,8 +124,8 @@ public class RemoveBasicConstraintsExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         return defParams;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
index 8152db07b3a6bb06d19e17072bdce477565c8892..63bd8804cd27a10e1e3ce6f1641da1893307cef2 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjAltNameExt.java
@@ -107,7 +107,7 @@ public class SubjAltNameExt extends APolicyRule
                         "the 'mail' or 'mailalternateaddress' values in the authToken. " +
                         "See the 'ldapStringAttrs' parameter in the Directory-based " +
                         "authentication plugin"
-            };
+        };
 
         return params;
 
@@ -208,7 +208,7 @@ public class SubjAltNameExt extends APolicyRule
             if (tok == null)
                 break apply;
 
-            Vector emails = getEmailList(tok);
+            Vector<String> emails = getEmailList(tok);
 
             if (emails == null)
                 break apply;
@@ -251,10 +251,10 @@ public class SubjAltNameExt extends APolicyRule
      * Generate a String Vector containing all the email addresses
      * found in this Authentication token
      */
-    protected Vector /* of String */
-    getEmailList(IAuthToken tok) {
+    protected Vector /* of String */<String>
+            getEmailList(IAuthToken tok) {
 
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         addValues(tok, "mail", v);
         addValues(tok, "mailalternateaddress", v);
@@ -269,7 +269,7 @@ public class SubjAltNameExt extends APolicyRule
      * Add attribute values from an LDAP attribute to a vector
      */
     protected void
-            addValues(IAuthToken tok, String attrName, Vector v) {
+            addValues(IAuthToken tok, String attrName, Vector<String> v) {
         String attr[] = tok.getInStringArray(attrName);
 
         if (attr == null)
@@ -284,13 +284,13 @@ public class SubjAltNameExt extends APolicyRule
      * Make a Subject name extension given a list of email addresses
      */
     protected SubjectAlternativeNameExtension
-            mkExt(Vector emails)
+            mkExt(Vector<String> emails)
                     throws IOException {
         SubjectAlternativeNameExtension sa;
         GeneralNames gns = new GeneralNames();
 
         for (int i = 0; i < emails.size(); i++) {
-            String email = (String) emails.elementAt(i);
+            String email = emails.elementAt(i);
 
             gns.addElement(new RFC822Name(email));
         }
@@ -326,8 +326,8 @@ public class SubjAltNameExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector params = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> params = new Vector<String>();
 
         //params.addElement("PROP_AGENT_OVERR = " + mAllowAgentOverride);
         //params.addElement("PROP_EE_OVERR = " + mAllowEEOverride);
@@ -342,8 +342,8 @@ public class SubjAltNameExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector defParams = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> defParams = new Vector<String>();
 
         //defParams.addElement("PROP_AGENT_OVERR = " + DEF_AGENT_OVERR);
         //defParams.addElement("PROP_EE_OVERR = " + DEF_EE_OVERR);
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
index 9a54a7aad7f2451c688ad7f790f650b71c904c99..62f0b21da3186a6d845bb396065a6c296bdf1afe 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectAltNameExt.java
@@ -80,10 +80,10 @@ public class SubjectAltNameExt extends APolicyRule
     protected int mNumGNs = 0;
     protected ISubjAltNameConfig[] mGNs = null;
 
-    Vector mInstanceParams = new Vector();
+    Vector<String> mInstanceParams = new Vector<String>();
 
     // init default params and extended plugin info.
-    private static Vector mDefParams = new Vector();
+    private static Vector<String> mDefParams = new Vector<String>();
     static {
         // default params.
         mDefParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -211,12 +211,12 @@ public class SubjectAltNameExt extends APolicyRule
                 if (value == null) {
                     continue;
                 }
-                Vector gn = mGNs[i].formGeneralNames(value);
+                Vector<GeneralName> gn = mGNs[i].formGeneralNames(value);
 
                 if (gn.size() == 0)
                     continue;
-                for (Enumeration n = gn.elements(); n.hasMoreElements();) {
-                    gns.addElement((GeneralName) n.nextElement());
+                for (Enumeration<GeneralName> n = gn.elements(); n.hasMoreElements();) {
+                    gns.addElement(n.nextElement());
                 }
             }
 
@@ -288,7 +288,7 @@ public class SubjectAltNameExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -297,14 +297,14 @@ public class SubjectAltNameExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
     public String[] getExtendedPluginInfo(Locale locale) {
 
         // extended plugin info.
-        Vector info = new Vector();
+        Vector<String> info = new Vector<String>();
 
         info.addElement(PROP_CRITICAL
                 + ";boolean;RFC2459 recommendation: If the certificate subject field contains an empty sequence, the extension MUST be marked critical.");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
index f7e18e8ca8c6296101d024dffed0de0a8f258c24..6c1c6a4e819bb8c1b171daca805b66185747c746 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectDirectoryAttributesExt.java
@@ -73,9 +73,9 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
     protected IConfigStore mConfig;
     protected SubjectDirAttributesExtension mExt = null;
 
-    protected Vector mParams = new Vector();
+    protected Vector<String> mParams = new Vector<String>();
     private String[] mEPI = null; // extended plugin info
-    protected static Vector mDefParams = new Vector();
+    protected static Vector<String> mDefParams = new Vector<String>();
 
     static {
         setDefaultParams();
@@ -190,11 +190,11 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
         }
     }
 
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mParams; // inited in init()
     }
 
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefParams;
     }
 
@@ -223,7 +223,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
     }
 
     private void setExtendedPluginInfo() {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_CRITICAL + ";boolean;" +
                 "RFC 2459 recommendation: MUST be non-critical.");
@@ -245,7 +245,7 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
 
     private SubjectDirAttributesExtension formExt(IRequest req)
             throws IOException {
-        Vector attrs = new Vector();
+        Vector<Attribute> attrs = new Vector<Attribute>();
 
         // if we're called from init and one attribute is from request attribute
         // the ext can't be formed yet.
@@ -369,7 +369,7 @@ class AttributeConfig {
         }
     }
 
-    public static void getDefaultParams(String name, Vector v) {
+    public static void getDefaultParams(String name, Vector<String> v) {
         String nameDot = name + ".";
 
         v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=");
@@ -377,7 +377,7 @@ class AttributeConfig {
         v.addElement(nameDot + PROP_VALUE + "=");
     }
 
-    public static void getExtendedPluginInfo(String name, Vector v) {
+    public static void getExtendedPluginInfo(String name, Vector<String> v) {
         String nameDot = name + ".";
         String attrChoices = getAllNames();
 
@@ -387,7 +387,7 @@ class AttributeConfig {
         v.addElement(nameDot + VALUE_INFO);
     }
 
-    public void getInstanceParams(Vector v) {
+    public void getInstanceParams(Vector<String> v) {
         String nameDot = mName + ".";
 
         v.addElement(nameDot + PROP_ATTRIBUTE_NAME + "=" + mAttributeName);
@@ -407,9 +407,9 @@ class AttributeConfig {
     }
 
     static private String getAllNames() {
-        Enumeration n = X500NameAttrMap.getDefault().getAllNames();
+        Enumeration<String> n = X500NameAttrMap.getDefault().getAllNames();
         StringBuffer sb = new StringBuffer();
-        sb.append((String) n.nextElement());
+        sb.append(n.nextElement());
 
         while (n.hasMoreElements()) {
             sb.append(",");
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
index 73649dd6192c8822dbaa64a95d7a1ae94b321d23..32d254c40dca8443f7ac798eeaf7f98de378ba60 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/SubjectKeyIdentifierExt.java
@@ -80,9 +80,9 @@ public class SubjectKeyIdentifierExt extends APolicyRule
     protected String mKeyIdType = DEF_KEYID_TYPE;;
     protected String mReqAttrName = DEF_REQATTR_NAME;
 
-    protected Vector mInstanceParams = new Vector();
+    protected Vector<String> mInstanceParams = new Vector<String>();
 
-    protected static Vector mDefaultParams = new Vector();
+    protected static Vector<String> mDefaultParams = new Vector<String>();
     static {
         // form static default params.
         mDefaultParams.addElement(PROP_CRITICAL + "=" + DEF_CRITICAL);
@@ -342,7 +342,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return mInstanceParams;
     }
 
@@ -351,7 +351,7 @@ public class SubjectKeyIdentifierExt extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return mDefaultParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
index 7a1a31a3de583c2917967cb51765ee42dc375a50..9416171215a960d4bee9413d47c11c8967344a69 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
@@ -883,16 +883,16 @@ public abstract class BasicProfile implements IProfile {
                     matches++;
                     if (createConfig) {
                         if (matches == 1) {
-                            CMS.debug("WARNING attempt to add duplicate Policy " + defaultClassId + ":"
-                                    + constraintClassId +
+                            CMS.debug("WARNING attempt to add duplicate Policy "
+                                    + defaultClassId + ":" + constraintClassId +
                                     " Contact System Administrator.");
-                            throw new EProfileException("Attempt to add duplicate Policy : " + defaultClassId + ":"
-                                    + constraintClassId);
+                            throw new EProfileException("Attempt to add duplicate Policy : "
+                                    + defaultClassId + ":" + constraintClassId);
                         }
                     } else {
                         if (matches > 1) {
-                            CMS.debug("WARNING attempt to add duplicate Policy " + defaultClassId + ":"
-                                    + constraintClassId +
+                            CMS.debug("WARNING attempt to add duplicate Policy "
+                                    + defaultClassId + ":" + constraintClassId +
                                     " Contact System Administrator.");
                         }
                     }
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
index 9b8d09e0fa9aa2fe819c612fd0f469c109b126bc..f2e921a53bc162e342dc03fd95bc7650f0899f73 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
@@ -729,15 +729,16 @@ public abstract class EnrollProfile extends BasicProfile
                 INTEGER num = (INTEGER) (bodyIds.elementAt(i));
                 if (num.toString().equals(reqId.toString())) {
                     donePOP = true;
-                    CMS.debug("EnrollProfile: skip POP for request: " + reqId.toString()
-                            + " because LRA POP Witness control is found.");
+                    CMS.debug("EnrollProfile: skip POP for request: "
+                            + reqId.toString() + " because LRA POP Witness control is found.");
                     break;
                 }
             }
         }
 
         if (!donePOP) {
-            CMS.debug("EnrollProfile: not skip POP for request: " + reqId.toString()
+            CMS.debug("EnrollProfile: not skip POP for request: "
+                    + reqId.toString()
                     + " because this request id is not part of the body list in LRA Pop witness control.");
             verifyPOP(locale, crm);
         }
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
index b16a7d94b0efe550db674d10fe2100f3b5d17c5f..40c2153a8d546f080e9b25a3e6aaf7a748b7d50d 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/EnrollConstraint.java
@@ -47,12 +47,12 @@ public abstract class EnrollConstraint implements IPolicyConstraint {
     public static final String CONFIG_NAME = "name";
 
     protected IConfigStore mConfig = null;
-    protected Vector mConfigNames = new Vector();
+    protected Vector<String> mConfigNames = new Vector<String>();
 
     public EnrollConstraint() {
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         return mConfigNames.elements();
     }
 
@@ -173,10 +173,10 @@ public abstract class EnrollConstraint implements IPolicyConstraint {
         }
         if (exts == null)
             return null;
-        Enumeration e = exts.getElements();
+        Enumeration<Extension> e = exts.getAttributes();
 
         while (e.hasMoreElements()) {
-            Extension ext = (Extension) e.nextElement();
+            Extension ext = e.nextElement();
 
             if (ext.getExtensionId().toString().equals(name)) {
                 return ext;
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
index 8bc16544cc26a260963732d47fdfe18827bb73aa..558338e7fcdadf9c9388073e3cf0513bc484684e 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
@@ -55,8 +55,8 @@ public class KeyConstraint extends EnrollConstraint {
     public static final String CONFIG_KEY_TYPE = "keyType"; // (EC, RSA)
     public static final String CONFIG_KEY_PARAMETERS = "keyParameters";
 
-    private static final String[] ecCurves = { "nistp256", "nistp384", "nistp521", "sect163k1", "nistk163",
-            "sect163r1", "sect163r2",
+    private static final String[] ecCurves = {
+            "nistp256", "nistp384", "nistp521", "sect163k1", "nistk163", "sect163r1", "sect163r2",
             "nistb163", "sect193r1", "sect193r2", "sect233k1", "nistk233", "sect233r1", "nistb233", "sect239k1",
             "sect283k1", "nistk283",
             "sect283r1", "nistb283", "sect409k1", "nistk409", "sect409r1", "nistb409", "sect571k1", "nistk571",
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/RenewGracePeriodConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/RenewGracePeriodConstraint.java
index 8f78945f610d0c2026dfac86f8024bdfc3cac624..fb01d7d1410b3b74a933b3f4c925b21e8f893bcc 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/RenewGracePeriodConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/RenewGracePeriodConstraint.java
@@ -122,8 +122,8 @@ public class RenewGracePeriodConstraint extends EnrollConstraint {
 
         Date current = CMS.getCurrentDate();
         long millisDiff = origExpDate.getTime() - current.getTime();
-        CMS.debug("validateRenewGracePeriod: millisDiff=" + millisDiff + " origExpDate=" + origExpDate.getTime()
-                + " current=" + current.getTime());
+        CMS.debug("validateRenewGracePeriod: millisDiff="
+                + millisDiff + " origExpDate=" + origExpDate.getTime() + " current=" + current.getTime());
 
         /*
          * "days", if positive, has to be less than renew_grace_before
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
index 211aef9137bbd242c52bd28b695b8fe36ead6bec..7a985b631f2142d76f715cc2ed391853cbb3f914 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/UniqueSubjectNameConstraint.java
@@ -179,14 +179,14 @@ public class UniqueSubjectNameConstraint extends EnrollConstraint {
         else {
             certsubjectname = sn.toString();
             String filter = "x509Cert.subject=" + certsubjectname;
-            Enumeration sameSubjRecords = null;
+            Enumeration<ICertRecord> sameSubjRecords = null;
             try {
                 sameSubjRecords = certdb.findCertRecords(filter);
             } catch (EBaseException e) {
                 CMS.debug("UniqueSubjectNameConstraint exception: " + e.toString());
             }
             while (sameSubjRecords != null && sameSubjRecords.hasMoreElements()) {
-                ICertRecord rec = (ICertRecord) sameSubjRecords.nextElement();
+                ICertRecord rec = sameSubjRecords.nextElement();
                 String status = rec.getStatus();
 
                 IRevocationInfo revocationInfo = rec.getRevocationInfo();
@@ -196,10 +196,10 @@ public class UniqueSubjectNameConstraint extends EnrollConstraint {
                     CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                     if (crlExts != null) {
-                        Enumeration enumx = crlExts.getElements();
+                        Enumeration<Extension> enumx = crlExts.getElements();
 
                         while (enumx.hasMoreElements()) {
-                            Extension ext = (Extension) enumx.nextElement();
+                            Extension ext = enumx.nextElement();
 
                             if (ext instanceof CRLReasonExtension) {
                                 reason = ((CRLReasonExtension) ext).getReason();
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/ValidityConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/ValidityConstraint.java
index abfef548dc35b63f4125446bb1b8b520ff88d64d..98a7b4f96390133158798bc795042f9b9e7f9a7a 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/ValidityConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/ValidityConstraint.java
@@ -141,8 +141,8 @@ public class ValidityConstraint extends EnrollConstraint {
         }
 
         long millisDiff = notAfter.getTime() - notBefore.getTime();
-        CMS.debug("ValidityConstraint: millisDiff=" + millisDiff + " notAfter=" + notAfter.getTime() + " notBefore="
-                + notBefore.getTime());
+        CMS.debug("ValidityConstraint: millisDiff="
+                + millisDiff + " notAfter=" + notAfter.getTime() + " notBefore=" + notBefore.getTime());
         long long_days = (millisDiff / 1000) / 86400;
         CMS.debug("ValidityConstraint: long_days: " + long_days);
         int days = (int) long_days;
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
index 92592d1372db65ce8d8b3bc6b2c7142570078b3a..a95ec6b7d08cf4d21244dfc8e0cd793081ab8fa7 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/CRLDistributionPointsExtDefault.java
@@ -107,7 +107,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -240,7 +240,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
                 if (ext == null) {
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 boolean critical = ext.isCritical();
@@ -248,7 +248,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
                 for (; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
                     String pointType = null;
                     String pointValue = null;
                     String issuerType = null;
@@ -438,7 +438,7 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
 
             for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
index 6668ee82338a02bebd1081fdaa4f03d8640c6d02..8d4ae228883fbeee00d2ef4f5938e43e1f70d5aa 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/CertificatePoliciesExtDefault.java
@@ -146,7 +146,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -172,8 +172,8 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                 addConfigName(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_USERNOTICE_ENABLE);
                 addConfigName(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_CPSURI_VALUE);
                 addConfigName(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_USERNOTICE_ORG);
-                addConfigName(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
-                        + CONFIG_USERNOTICE_NUMBERS);
+                addConfigName(CONFIG_PREFIX
+                        + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_USERNOTICE_NUMBERS);
                 addConfigName(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_USERNOTICE_TEXT);
             }
         }
@@ -243,9 +243,9 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
         return null;
     }
 
-    private Hashtable buildRecords(String value) throws EPropertyException {
+    private Hashtable<String, String> buildRecords(String value) throws EPropertyException {
         StringTokenizer st = new StringTokenizer(value, "\r\n");
-        Hashtable table = new Hashtable();
+        Hashtable<String, String> table = new Hashtable<String, String>();
         while (st.hasMoreTokens()) {
             String token = (String) st.nextToken();
             int index = token.indexOf(":");
@@ -285,12 +285,12 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                         getExtension(PKIXExtensions.CertificatePolicies_Id.toString(),
                                 info);
 
-                Hashtable h = buildRecords(value);
+                Hashtable<String, String> h = buildRecords(value);
 
                 String numStr = (String) h.get(CONFIG_POLICY_NUM);
                 int size = Integer.parseInt(numStr);
 
-                Vector certificatePolicies = new Vector();
+                Vector<CertificatePolicyInfo> certificatePolicies = new Vector<CertificatePolicyInfo>();
                 for (int i = 0; i < size; i++) {
                     String enable = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_POLICY_ENABLE);
                     CertificatePolicyInfo cinfo = null;
@@ -302,30 +302,41 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                                         locale, "CMS_PROFILE_CERTIFICATE_POLICIES_EMPTY_POLICYID"));
                         CertificatePolicyId cpolicyId = getPolicyId(policyId);
 
-                        String qualifersNum = (String) h.get(CONFIG_PREFIX + i + SEPARATOR
-                                + CONFIG_POLICY_QUALIFIERS_NUM);
+                        String qualifersNum =
+                                (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_POLICY_QUALIFIERS_NUM);
                         PolicyQualifiers policyQualifiers = new PolicyQualifiers();
                         int num = 0;
                         if (qualifersNum != null && qualifersNum.length() > 0)
                             num = Integer.parseInt(qualifersNum);
                         for (int j = 0; j < num; j++) {
-                            String cpsuriEnable = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j
-                                    + SEPARATOR + CONFIG_CPSURI_ENABLE);
-                            String usernoticeEnable = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j
-                                    + SEPARATOR + CONFIG_USERNOTICE_ENABLE);
+                            String cpsuriEnable =
+                                    (String) h.get(CONFIG_PREFIX
+                                            + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_CPSURI_ENABLE);
+                            String usernoticeEnable =
+                                    (String) h
+                                            .get(CONFIG_PREFIX
+                                                    + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
+                                                    + CONFIG_USERNOTICE_ENABLE);
                             if (cpsuriEnable != null && cpsuriEnable.equals("true")) {
-                                String cpsuri = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j
-                                        + SEPARATOR + CONFIG_CPSURI_VALUE);
+                                String cpsuri =
+                                        (String) h.get(CONFIG_PREFIX
+                                                + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_CPSURI_VALUE);
                                 netscape.security.x509.PolicyQualifierInfo qualifierInfo = createCPSuri(cpsuri);
                                 if (qualifierInfo != null)
                                     policyQualifiers.add(qualifierInfo);
                             } else if (usernoticeEnable != null && enable.equals("true")) {
-                                String org = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j
-                                        + SEPARATOR + CONFIG_USERNOTICE_ORG);
-                                String noticenumbers = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1
-                                        + j + SEPARATOR + CONFIG_USERNOTICE_NUMBERS);
-                                String explicitText = (String) h.get(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j
-                                        + SEPARATOR + CONFIG_USERNOTICE_TEXT);
+                                String org =
+                                        (String) h.get(CONFIG_PREFIX
+                                                + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
+                                                + CONFIG_USERNOTICE_ORG);
+                                String noticenumbers =
+                                        (String) h.get(CONFIG_PREFIX
+                                                + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
+                                                + CONFIG_USERNOTICE_NUMBERS);
+                                String explicitText =
+                                        (String) h.get(CONFIG_PREFIX
+                                                + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
+                                                + CONFIG_USERNOTICE_TEXT);
                                 netscape.security.x509.PolicyQualifierInfo qualifierInfo = createUserNotice(org,
                                         noticenumbers, explicitText);
                                 if (qualifierInfo != null)
@@ -364,6 +375,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
         }
     }
 
+    @SuppressWarnings("unchecked")
     public String getValue(String name, Locale locale,
             X509CertInfo info)
             throws EPropertyException {
@@ -397,17 +409,17 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
             int num_policies = getNumPolicies();
-            int num_qualifiers = DEF_NUM_QUALIFIERS;
             sb.append(CONFIG_POLICY_NUM);
             sb.append(":");
             sb.append(num_policies);
             sb.append("\n");
-            Vector infos = null;
+            Vector<CertificatePolicyInfo> infos;
+
             try {
-                infos = (Vector) (ext.get(CertificatePoliciesExtension.INFOS));
+                infos = (Vector<CertificatePolicyInfo>) ext.get(CertificatePoliciesExtension.INFOS);
             } catch (IOException ee) {
+                infos = null;
             }
-            Enumeration policies = ext.getElements();
 
             for (int i = 0; i < num_policies; i++) {
                 int qSize = 0;
@@ -416,7 +428,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                 PolicyQualifiers qualifiers = null;
                 if (infos.size() > 0) {
                     CertificatePolicyInfo cinfo =
-                            (CertificatePolicyInfo) infos.elementAt(0);
+                            infos.elementAt(0);
 
                     CertificatePolicyId id1 = cinfo.getPolicyIdentifier();
                     policyId = id1.getIdentifier().toString();
@@ -455,8 +467,8 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                     sb.append(":");
                     sb.append("");
                     sb.append("\n");
-                    sb.append(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + "0" + SEPARATOR
-                            + CONFIG_USERNOTICE_ENABLE);
+                    sb.append(CONFIG_PREFIX
+                            + i + SEPARATOR + CONFIG_PREFIX1 + "0" + SEPARATOR + CONFIG_USERNOTICE_ENABLE);
                     sb.append(":");
                     sb.append("false");
                     sb.append("\n");
@@ -464,8 +476,8 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                     sb.append(":");
                     sb.append("");
                     sb.append("\n");
-                    sb.append(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + "0" + SEPARATOR
-                            + CONFIG_USERNOTICE_NUMBERS);
+                    sb.append(CONFIG_PREFIX
+                            + i + SEPARATOR + CONFIG_PREFIX1 + "0" + SEPARATOR + CONFIG_USERNOTICE_NUMBERS);
                     sb.append(":");
                     sb.append("");
                     sb.append("\n");
@@ -527,8 +539,8 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                     sb.append(":");
                     sb.append(org);
                     sb.append("\n");
-                    sb.append(CONFIG_PREFIX + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR
-                            + CONFIG_USERNOTICE_NUMBERS);
+                    sb.append(CONFIG_PREFIX
+                            + i + SEPARATOR + CONFIG_PREFIX1 + j + SEPARATOR + CONFIG_USERNOTICE_NUMBERS);
                     sb.append(":");
                     sb.append(noticeNum.toString());
                     sb.append("\n");
@@ -547,7 +559,6 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
     public String getText(Locale locale) {
         StringBuffer sb = new StringBuffer();
-        String numPolicies = getConfig(CONFIG_POLICY_NUM);
         int num = getNumPolicies();
         int num1 = getNumQualifiers();
 
@@ -630,7 +641,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
         try {
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
-            Vector certificatePolicies = new Vector();
+            Vector<CertificatePolicyInfo> certificatePolicies = new Vector<CertificatePolicyInfo>();
             int num = getNumPolicies();
             CMS.debug("CertificatePoliciesExtension: createExtension: number of policies=" + num);
             IConfigStore config = getConfigStore();
@@ -644,8 +655,8 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
                 if (enable != null && enable.equals("true")) {
                     String policyId = substore.getString(CONFIG_POLICY_ID);
                     CertificatePolicyId cpolicyId = getPolicyId(policyId);
-                    CMS.debug("CertificatePoliciesExtension: createExtension: CertificatePolicy " + i + " policyId="
-                            + policyId);
+                    CMS.debug("CertificatePoliciesExtension: createExtension: CertificatePolicy "
+                            + i + " policyId=" + policyId);
                     int qualifierNum = getNumQualifiers();
                     PolicyQualifiers policyQualifiers = new PolicyQualifiers();
                     for (int j = 0; j < qualifierNum; j++) {
@@ -741,7 +752,7 @@ public class CertificatePoliciesExtDefault extends EnrollExtDefault {
 
         int nums[] = null;
         if (noticeNums != null && noticeNums.length() > 0) {
-            Vector numsVector = new Vector();
+            Vector<String> numsVector = new Vector<String>();
             StringTokenizer tokens = new StringTokenizer(noticeNums, ";");
             while (tokens.hasMoreTokens()) {
                 String num = tokens.nextToken().trim();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
index 060f2ad16dc3cde176f3beb09a55d060f21e1372..855cd92c7eb538f5e23ba21ddea363ca006bd818 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/EnrollDefault.java
@@ -289,10 +289,10 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
                     info.get(X509CertInfo.EXTENSIONS);
             if (exts == null)
                 return;
-            Enumeration<?> e = exts.getNames();
+            Enumeration<String> e = exts.getNames();
 
             while (e.hasMoreElements()) {
-                String n = (String) e.nextElement();
+                String n = e.nextElement();
                 Extension ext = (Extension) exts.get(n);
 
                 if (ext.getExtensionId().toString().equals(name)) {
@@ -321,10 +321,10 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
     protected Extension getExtension(String name, CertificateExtensions exts) {
         if (exts == null)
             return null;
-        Enumeration<?> e = exts.getElements();
+        Enumeration<Extension> e = exts.getAttributes();
 
         while (e.hasMoreElements()) {
-            Extension ext = (Extension) e.nextElement();
+            Extension ext = e.nextElement();
 
             if (ext.getExtensionId().toString().equals(name)) {
                 return ext;
@@ -632,19 +632,19 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         return true;
     }
 
-    protected String buildRecords(Vector<?> recs) throws EPropertyException {
+    protected String buildRecords(Vector<NameValuePairs> recs) throws EPropertyException {
         StringBuffer sb = new StringBuffer();
 
         for (int i = 0; i < recs.size(); i++) {
-            NameValuePairs pairs = (NameValuePairs) recs.elementAt(i);
+            NameValuePairs pairs = recs.elementAt(i);
 
             sb.append("Record #");
             sb.append(i);
             sb.append("\r\n");
-            Enumeration<?> e = pairs.getNames();
+            Enumeration<String> e = pairs.getNames();
 
             while (e.hasMoreElements()) {
-                String key = (String) e.nextElement();
+                String key = e.nextElement();
                 String val = pairs.getValue(key);
 
                 sb.append(key);
@@ -665,14 +665,14 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         NameValuePairs nvps = null;
 
         while (st.hasMoreTokens()) {
-            String token = (String) st.nextToken();
+            String token = st.nextToken();
 
             if (token.equals("Record #" + num)) {
                 CMS.debug("parseRecords: Record" + num);
                 nvps = new NameValuePairs();
                 v.addElement(nvps);
                 try {
-                    token = (String) st.nextToken();
+                    token = st.nextToken();
                 } catch (NoSuchElementException e) {
                     v.removeElementAt(num);
                     CMS.debug(e.toString());
@@ -756,7 +756,7 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         return locale;
     }
 
-    public String toGeneralNameString(GeneralName gn) {
+    public String toGeneralNameString(GeneralNameInterface gn) {
         int type = gn.getType();
         // Sun's General Name is not consistent, so we need
         // to do a special case for directory string
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
index 3dcf899291e9dec590b20967900b7aae98611e94..d5ac9247dc96e3384d67b677a79ffa36677eb7ee 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/FreshestCRLExtDefault.java
@@ -119,7 +119,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -224,7 +224,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
                         getExtension(FreshestCRLExtension.OID,
                                 info);
 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 boolean critical = ext.isCritical();
@@ -232,7 +232,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
                 for (; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
                     String pointType = null;
                     String pointValue = null;
                     String issuerType = null;
@@ -384,7 +384,7 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
             for (int i = 0; i < num; i++) {
                 NameValuePairs pairs = null;
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
index d56eebc02cfb6a4389d3f2192c714cdd10716ed7..251d8a3e7aae34dc61e92d4e8703d6c31b1b65a9 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/IssuerAltNameExtDefault.java
@@ -235,7 +235,7 @@ public class IssuerAltNameExtDefault extends EnrollExtDefault {
                 GeneralNames names = (GeneralNames)
                         ext.get(IssuerAlternativeNameExtension.ISSUER_NAME);
                 StringBuffer sb = new StringBuffer();
-                Enumeration e = names.elements();
+                Enumeration<GeneralNameInterface> e = names.elements();
 
                 while (e.hasMoreElements()) {
                     GeneralName gn = (GeneralName) e.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
index 45db3576796f3a0dbf43150fc695371ae6552510..c513c332ba4fa380499bbd04756cd2c0f95ce494 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/NameConstraintsExtDefault.java
@@ -315,9 +315,9 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                     return;
                 }
 
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
 
-                Vector permittedSubtrees = createSubtrees(locale, v);
+                Vector<GeneralSubtree> permittedSubtrees = createSubtrees(locale, v);
 
                 ext.set(NameConstraintsExtension.PERMITTED_SUBTREES,
                         new GeneralSubtrees(permittedSubtrees));
@@ -333,9 +333,9 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                               "blank value for excluded subtrees ... returning");
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
 
-                Vector excludedSubtrees = createSubtrees(locale, v);
+                Vector<GeneralSubtree> excludedSubtrees = createSubtrees(locale, v);
 
                 ext.set(NameConstraintsExtension.EXCLUDED_SUBTREES,
                         new GeneralSubtrees(excludedSubtrees));
@@ -356,18 +356,18 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
         }
     }
 
-    private Vector createSubtrees(Locale locale, Vector v) throws EPropertyException {
+    private Vector<GeneralSubtree> createSubtrees(Locale locale, Vector<NameValuePairs> v) throws EPropertyException {
         int size = v.size();
         String choice = null;
         String val = "";
         String minS = null;
         String maxS = null;
 
-        Vector subtrees = new Vector();
+        Vector<GeneralSubtree> subtrees = new Vector<GeneralSubtree>();
 
         for (int i = 0; i < size; i++) {
             NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-            Enumeration names = nvps.getNames();
+            Enumeration<String> names = nvps.getNames();
 
             while (names.hasMoreElements()) {
                 String name1 = (String) names.nextElement();
@@ -512,10 +512,10 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
 
     private String getSubtreesInfo(NameConstraintsExtension ext,
             GeneralSubtrees subtrees) throws EPropertyException {
-        Vector trees = subtrees.getSubtrees();
+        Vector<GeneralSubtree> trees = subtrees.getSubtrees();
         int size = trees.size();
 
-        Vector recs = new Vector();
+        Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
         for (int i = 0; i < size; i++) {
             GeneralSubtree tree = (GeneralSubtree) trees.elementAt(i);
@@ -601,7 +601,7 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
 
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
 
-            Vector v = new Vector();
+            Vector<GeneralSubtree> v = new Vector<GeneralSubtree>();
 
             for (int i = 0; i < num; i++) {
                 String enable = getConfig(CONFIG_PERMITTED_ENABLE + i);
@@ -616,7 +616,7 @@ public class NameConstraintsExtDefault extends EnrollExtDefault {
                 }
             }
 
-            Vector v1 = new Vector();
+            Vector<GeneralSubtree> v1 = new Vector<GeneralSubtree>();
 
             num = getNumExcluded();
             for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
index f8fcfe15a1e309b2d6ebfd56cc9aabdbb3c2a3d1..183ef87bc0c57542d14db725b56753652a3f3272 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/PolicyMappingsExtDefault.java
@@ -108,7 +108,7 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -207,17 +207,17 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
                 if (ext == null) {
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 String issuerPolicyId = null;
                 String subjectPolicyId = null;
                 String enable = null;
-                Vector policyMaps = new Vector();
+                Vector<CertificatePolicyMap> policyMaps = new Vector<CertificatePolicyMap>();
 
                 for (int i = 0; i < size; i++) {
                     NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    Enumeration<String> names = nvps.getNames();
 
                     while (names.hasMoreElements()) {
                         String name1 = (String) names.nextElement();
@@ -310,12 +310,12 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
             int num_mappings = getNumMappings();
 
-            Enumeration maps = ext.getMappings();
+            Enumeration<CertificatePolicyMap> maps = ext.getMappings();
 
             int num = 0;
             StringBuffer sb = new StringBuffer();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
             for (int i = 0; i < num_mappings; i++) {
                 NameValuePairs pairs = new NameValuePairs();
@@ -388,7 +388,7 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
         try {
             boolean critical = getConfigBoolean(CONFIG_CRITICAL);
-            Vector policyMaps = new Vector();
+            Vector<CertificatePolicyMap> policyMaps = new Vector<CertificatePolicyMap>();
             int num = getNumMappings();
 
             for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
index c14f3239f2a9e99847e2758e8b4bcb32b93b4805..b205f7df481a30faf9cdc7339efa9b62f0331b1c 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectAltNameExtDefault.java
@@ -23,7 +23,6 @@ import java.util.Locale;
 import java.util.StringTokenizer;
 import java.util.UUID;
 
-import netscape.security.x509.GeneralName;
 import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.PKIXExtensions;
@@ -156,7 +155,7 @@ public class SubjectAltNameExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -354,13 +353,10 @@ public class SubjectAltNameExtDefault extends EnrollExtDefault {
                 GeneralNames names = (GeneralNames)
                         ext.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
                 StringBuffer sb = new StringBuffer();
-                Enumeration e = names.elements();
+                Enumeration<GeneralNameInterface> e = names.elements();
 
                 while (e.hasMoreElements()) {
-                    Object o = (Object) e.nextElement();
-                    if (!(o instanceof GeneralName))
-                        continue;
-                    GeneralName gn = (GeneralName) o;
+                    GeneralNameInterface gn = e.nextElement();
 
                     if (!sb.toString().equals("")) {
                         sb.append("\r\n");
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
index ca361f6b83239ad6f97e98a4576be9aabb5374bd..29562123e7e0a7c04087950f81a7463ef2c5df7a 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
@@ -114,7 +114,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
         super.setConfig(name, value);
     }
 
-    public Enumeration getConfigNames() {
+    public Enumeration<String> getConfigNames() {
         refreshConfigAndValueNames();
         return super.getConfigNames();
     }
@@ -212,21 +212,21 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
                 if (ext == null) {
                     return;
                 }
-                Vector v = parseRecords(value);
+                Vector<NameValuePairs> v = parseRecords(value);
                 int size = v.size();
 
                 boolean critical = ext.isCritical();
 
                 X500NameAttrMap map = X500NameAttrMap.getDefault();
-                Vector attrV = new Vector();
+                Vector<Attribute> attrV = new Vector<Attribute>();
                 for (int i = 0; i < size; i++) {
-                    NameValuePairs nvps = (NameValuePairs) v.elementAt(i);
-                    Enumeration names = nvps.getNames();
+                    NameValuePairs nvps = v.elementAt(i);
+                    Enumeration<String> names = nvps.getNames();
                     String attrName = null;
                     String attrValue = null;
                     String enable = "false";
                     while (names.hasMoreElements()) {
-                        String name1 = (String) names.nextElement();
+                        String name1 = names.nextElement();
 
                         if (name1.equals(ATTR_NAME)) {
                             attrName = nvps.getValue(name1);
@@ -309,16 +309,16 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
 
             X500NameAttrMap map = X500NameAttrMap.getDefault();
 
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumAttrs();
-            Enumeration e = ext.getAttributesList();
+            Enumeration<Attribute> e = ext.getAttributesList();
             CMS.debug("SubjectDirAttributesExtDefault: getValue: attributesList=" + e);
             int i = 0;
 
             while (e.hasMoreElements()) {
                 NameValuePairs pairs = new NameValuePairs();
                 pairs.add(ENABLE, "true");
-                Attribute attr = (Attribute) (e.nextElement());
+                Attribute attr = e.nextElement();
                 CMS.debug("SubjectDirAttributesExtDefault: getValue: attribute=" + attr);
                 ObjectIdentifier oid = attr.getOid();
                 CMS.debug("SubjectDirAttributesExtDefault: getValue: oid=" + oid);
@@ -329,7 +329,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
                     pairs.add(ATTR_NAME, vv);
                 else
                     pairs.add(ATTR_NAME, oid.toString());
-                Enumeration v = attr.getValues();
+                Enumeration<String> v = attr.getValues();
 
                 // just support single value for now
                 StringBuffer ss = new StringBuffer();
@@ -410,7 +410,7 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
         num = getNumAttrs();
 
         AttributeConfig attributeConfig = null;
-        Vector attrs = new Vector();
+        Vector<Attribute> attrs = new Vector<Attribute>();
         for (int i = 0; i < num; i++) {
             String enable = getConfig(CONFIG_ENABLE + i);
             if (enable != null && enable.equals("true")) {
@@ -517,9 +517,9 @@ class AttributeConfig {
         return;
     }
 
-    private Vector str2MultiValues(String attrValue) {
+    private Vector<String> str2MultiValues(String attrValue) {
         StringTokenizer tokenizer = new StringTokenizer(attrValue, ",");
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
         while (tokenizer.hasMoreTokens()) {
             v.addElement(tokenizer.nextToken());
         }
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/nsNKeySubjectNameDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/nsNKeySubjectNameDefault.java
index 476db0e0286039cf0faa7b7cb5e445357ea7d590..cc1a8de8125f3bdb450d248dca0d5001b43a1899 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/nsNKeySubjectNameDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/nsNKeySubjectNameDefault.java
@@ -384,8 +384,8 @@ public class nsNKeySubjectNameDefault extends EnrollDefault {
             ;
 
             LDAPEntry entry = null;
-            CMS.debug("nsNKeySubjectNameDefault: getSubjectName(): about to search with " + mLdapStringAttrs.length
-                    + " attributes");
+            CMS.debug("nsNKeySubjectNameDefault: getSubjectName(): about to search with "
+                    + mLdapStringAttrs.length + " attributes");
             LDAPSearchResults results =
                     conn.search(userdn, LDAPv2.SCOPE_BASE, "objectclass=*",
                             mLdapStringAttrs, false);
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
index bbb3369cea2b74d8e673399bc11e01232866d8b0..65adabfad3029242960f97cfc9d7715412008ebe 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
@@ -406,8 +406,8 @@ public class nsTokenUserKeySubjectNameDefault extends EnrollDefault {
                 CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): " + searchName + " does not exist");
                 throw new EProfileException("id does not exist");
             }
-            CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): retrieved entry for " + searchName + " = "
-                    + request.getExtDataInString("uid"));
+            CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): retrieved entry for "
+                    + searchName + " = " + request.getExtDataInString("uid"));
 
             LDAPEntry entry = null;
             CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): about to search with "
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
index 5db61f94d2d93a68cdd74147b3ba8210da2858c0..7fd2bb44e6a6334d083f25d39c2a0cb9bbca5b83 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
@@ -120,7 +120,7 @@ public class LdapEnhancedMap
      * for instances of this implementation can be configured through the
      * console.
      */
-    private static Vector defaultParams = new Vector();
+    private static Vector<String> defaultParams = new Vector<String>();
 
     static {
         defaultParams.addElement(PROP_DNPATTERN + "=");
@@ -392,12 +392,12 @@ public class LdapEnhancedMap
         return "LdapEnhancedMap";
     }
 
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defaultParams;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         try {
             if (mDnPattern == null) {
@@ -584,7 +584,7 @@ public class LdapEnhancedMap
     /////////////////////////////////
 
     public String[] getExtendedPluginInfo(Locale locale) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_DNPATTERN +
                 ";string;Describes how to form the Ldap " +
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
index fe74935655c0179f7498d449636d5db4a9a64dc5..b3177787ffa00a4beeca79295f57ea789ebd7eda 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
@@ -304,15 +304,15 @@ public class LdapSimpleMap implements ILdapMapper, IExtendedPluginInfo {
         return "LdapSimpleMap";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(PROP_DNPATTERN + "=");
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         try {
             if (mDnPattern == null) {
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
index 98fb41496c5a1717fd5053898a6c74f18c490bb6..7aeb672d038c0b33c67122a00cc262e6626d5b3c 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapAVAPattern.java
@@ -29,6 +29,7 @@ import netscape.security.x509.AVA;
 import netscape.security.x509.CertificateExtensions;
 import netscape.security.x509.Extension;
 import netscape.security.x509.GeneralName;
+import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.LdapV3DNStrConverter;
 import netscape.security.x509.OIDMap;
@@ -533,7 +534,8 @@ class MapAVAPattern {
                         // For now, just give subjectAltName as an example.
                         if (mValue.equalsIgnoreCase(SubjectAlternativeNameExtension.NAME)) {
                             try {
-                                GeneralNames subjectNames = (GeneralNames)
+                                GeneralNames subjectNames =
+                                        (GeneralNames)
                                         ((SubjectAlternativeNameExtension) ext)
                                                 .get(SubjectAlternativeNameExtension.SUBJECT_NAME);
 
@@ -541,7 +543,7 @@ class MapAVAPattern {
                                     break;
                                 int j = 0;
 
-                                for (Enumeration n = subjectNames.elements(); n.hasMoreElements();) {
+                                for (Enumeration<GeneralNameInterface> n = subjectNames.elements(); n.hasMoreElements();) {
                                     GeneralName gn = (GeneralName) n.nextElement();
                                     String gname = gn.toString();
 
@@ -623,7 +625,7 @@ class MapAVAPattern {
 
         if (plus == -1)
             return new String[] { rdn };
-        Vector avas = new Vector();
+        Vector<String> avas = new Vector<String>();
         StringTokenizer token = new StringTokenizer(rdn, "+");
 
         while (token.hasMoreTokens())
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
index 4eb6baeca3d10071c9dc272db44e4c6c45ac59ee..7a9025b1d4947f1841929f71a44b79d5a523b47d 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapDNPattern.java
@@ -121,7 +121,7 @@ public class MapDNPattern {
 
     private void parse(PushbackReader in)
             throws ELdapException {
-        Vector rdnPatterns = new Vector();
+        Vector<MapRDNPattern> rdnPatterns = new Vector<MapRDNPattern>();
         MapRDNPattern rdnPattern = null;
         int lastChar = -1;
 
@@ -139,7 +139,7 @@ public class MapDNPattern {
         mRDNPatterns = new MapRDNPattern[rdnPatterns.size()];
         rdnPatterns.copyInto(mRDNPatterns);
 
-        Vector reqAttrs = new Vector();
+        Vector<String> reqAttrs = new Vector<String>();
 
         for (int i = 0; i < mRDNPatterns.length; i++) {
             String[] rdnAttrs = mRDNPatterns[i].getReqAttrs();
@@ -151,7 +151,7 @@ public class MapDNPattern {
         mReqAttrs = new String[reqAttrs.size()];
         reqAttrs.copyInto(mReqAttrs);
 
-        Vector certAttrs = new Vector();
+        Vector<String> certAttrs = new Vector<String>();
 
         for (int i = 0; i < mRDNPatterns.length; i++) {
             String[] rdnAttrs = mRDNPatterns[i].getCertAttrs();
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java b/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
index c494627f101c7e0fcad4fadd8ef8404e68bed691..c1688345bbbe0ace4eeab5efbc2618afa6d1cf42 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/MapRDNPattern.java
@@ -124,7 +124,7 @@ class MapRDNPattern {
     private void parse(PushbackReader in)
             throws ELdapException {
         //System.out.println("_________ begin rdn _________");
-        Vector avaPatterns = new Vector();
+        Vector<MapAVAPattern> avaPatterns = new Vector<MapAVAPattern>();
         MapAVAPattern avaPattern = null;
         int lastChar;
 
@@ -156,7 +156,7 @@ class MapRDNPattern {
         mAVAPatterns = new MapAVAPattern[avaPatterns.size()];
         avaPatterns.copyInto(mAVAPatterns);
 
-        Vector reqAttrs = new Vector();
+        Vector<String> reqAttrs = new Vector<String>();
 
         for (int i = 0; i < mAVAPatterns.length; i++) {
             String avaAttr = mAVAPatterns[i].getReqAttr();
@@ -168,7 +168,7 @@ class MapRDNPattern {
         mReqAttrs = new String[reqAttrs.size()];
         reqAttrs.copyInto(mReqAttrs);
 
-        Vector certAttrs = new Vector();
+        Vector<String> certAttrs = new Vector<String>();
 
         for (int i = 0; i < mAVAPatterns.length; i++) {
             String avaAttr = mAVAPatterns[i].getCertAttr();
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/FileBasedPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/FileBasedPublisher.java
index b8d6a8e5406880361d20b810194d3ab53b626f43..d8cec78d8b0c5db275183c5b5d038bdb66bdf78b 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/FileBasedPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/FileBasedPublisher.java
@@ -100,9 +100,11 @@ public class FileBasedPublisher implements ILdapPublisher, IExtendedPluginInfo {
                 PROP_B64 + ";boolean;Store certificates or CRLs into *.b64 files.",
                 PROP_GMT
                         + ";choice(LocalTime,GMT);Use local time or GMT to time stamp CRL file name with CRL's 'thisUpdate' field.",
-                PROP_LNK + ";boolean;Generate link to the latest binary CRL. It requires '" + PROP_DER
+                PROP_LNK
+                        + ";boolean;Generate link to the latest binary CRL. It requires '" + PROP_DER
                         + "' to be enabled.",
-                PROP_EXT + ";string;Name extension used by link to the latest CRL. Default name extension is 'der'.",
+                PROP_EXT
+                        + ";string;Name extension used by link to the latest CRL. Default name extension is 'der'.",
                 PROP_ZIP + ";boolean;Generate compressed CRLs.",
                 PROP_LEV + ";choice(0,1,2,3,4,5,6,7,8,9);Set compression level from 0 to 9.",
                 IExtendedPluginInfo.HELP_TOKEN +
@@ -110,7 +112,7 @@ public class FileBasedPublisher implements ILdapPublisher, IExtendedPluginInfo {
                 IExtendedPluginInfo.HELP_TEXT
                         +
                         ";Stores the certificates or CRLs into files. Certificate is named as cert-<serialno>.der or *.b64, and CRL is named as <IssuingPoint>-<thisUpdate-time>.der or *.b64."
-            };
+        };
 
         return params;
     }
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
index 337c5a3832ede27de36f0373097c2244b74e54db..d5cbfb323ee1decf1a77ee170c35c8f9451b1a74 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapEncryptCertPublisher.java
@@ -89,15 +89,15 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
 
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         return v;
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         return v;
@@ -247,11 +247,12 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
             return at;
         }
 
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
-            val = (byte[]) vals.nextElement();
+            val = vals.nextElement();
             try {
                 X509CertImpl cert = new X509CertImpl(val);
 
@@ -322,7 +323,8 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getByteValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<byte[]> vals = attr.getByteValues();
         byte[] val = null;
 
         while (vals.hasMoreElements()) {
@@ -341,11 +343,12 @@ public class LdapEncryptCertPublisher implements ILdapPublisher, IExtendedPlugin
         if (attr == null) {
             return false;
         }
-        Enumeration vals = attr.getStringValues();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> vals = attr.getStringValues();
         String val = null;
 
         while (vals.hasMoreElements()) {
-            val = (String) vals.nextElement();
+            val = vals.nextElement();
             if (val.equalsIgnoreCase(sval)) {
                 return true;
             }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
index 92cbb88851018bdd4b44a8d77a003476ea9a5d84..41f0c248f8a1f16e6b322254bc9486606f2aabe9 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
@@ -354,7 +354,7 @@ public final class CMSAdminServlet extends AdminServlet {
     }
 
     private boolean isSubsystemInstalled(String subsystem) {
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
 
         while (e.hasMoreElements()) {
             String type = "";
@@ -382,7 +382,7 @@ public final class CMSAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
 
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
         boolean isCAInstalled = false;
         boolean isRAInstalled = false;
         boolean isKRAInstalled = false;
@@ -536,13 +536,14 @@ public final class CMSAdminServlet extends AdminServlet {
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             NameValuePairs params = new NameValuePairs();
             ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                     CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
 
             jssSubSystem.getInternalTokenName();
-            Enumeration e = CMS.getSubsystems();
+            Enumeration<ISubsystem> e = CMS.getSubsystems();
             boolean isCAInstalled = false;
             boolean isRAInstalled = false;
             boolean isKRAInstalled = false;
@@ -797,7 +798,7 @@ public final class CMSAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = CMS.getSubsystems();
+        Enumeration<ISubsystem> e = CMS.getSubsystems();
         StringBuffer buff = new StringBuffer();
 
         while (e.hasMoreElements()) {
@@ -863,7 +864,8 @@ public final class CMSAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         IConfigStore dbConfig = mConfig.getSubStore(PROP_INTERNAL_DB);
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
@@ -890,7 +892,8 @@ public final class CMSAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
         String newKeyName = null, selectedToken = null;
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -923,7 +926,8 @@ public final class CMSAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -974,7 +978,8 @@ public final class CMSAdminServlet extends AdminServlet {
         IConfigStore dbConfig = mConfig.getSubStore(PROP_DB);
         IConfigStore ldapConfig = dbConfig.getSubStore("ldap");
         NameValuePairs params = new NameValuePairs();
-        Enumeration e = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> e = req.getParameterNames();
 
         while (e.hasMoreElements()) {
             String name = (String) e.nextElement();
@@ -1036,7 +1041,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void loggedInToken(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String tokenName = "";
         String pwd = "";
 
@@ -1064,7 +1070,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void checkTokenStatus(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String key = "";
         String value = "";
 
@@ -1110,7 +1117,8 @@ public final class CMSAdminServlet extends AdminServlet {
         // to the signed audit log and stored as failures
         try {
             NameValuePairs params = new NameValuePairs();
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             String tokenName = Constants.PR_INTERNAL_TOKEN_NAME;
             String keyType = "";
             int keyLength = 512;
@@ -1486,7 +1494,8 @@ public final class CMSAdminServlet extends AdminServlet {
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             String pkcs = "";
             String type = "";
             String tokenName = Constants.PR_INTERNAL_TOKEN_NAME;
@@ -1921,7 +1930,8 @@ public final class CMSAdminServlet extends AdminServlet {
             String serverRoot = "";
             String serverID = "";
             String certpath = "";
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
 
             while (enum1.hasMoreElements()) {
                 String key = (String) enum1.nextElement();
@@ -2086,8 +2096,8 @@ public final class CMSAdminServlet extends AdminServlet {
 
                 String eString = e.toString();
                 if (eString.contains("Failed to find certificate that was just imported")) {
-                    CMS.debug("CMSAdminServlet.installCert(): nickname=" + nicknameWithoutTokenName
-                            + " TokenException: " + eString);
+                    CMS.debug("CMSAdminServlet.installCert(): nickname="
+                            + nicknameWithoutTokenName + " TokenException: " + eString);
 
                     X509Certificate cert = null;
                     try {
@@ -2338,7 +2348,8 @@ public final class CMSAdminServlet extends AdminServlet {
             String serverRoot = "";
             String serverID = "";
             String certpath = "";
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             NameValuePairs results = new NameValuePairs();
 
             while (enum1.hasMoreElements()) {
@@ -2565,7 +2576,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void getCertInfo(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         NameValuePairs results = new NameValuePairs();
         String pkcs = "";
         String path = "";
@@ -2662,7 +2674,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void getCertPrettyPrint(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                 CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2705,7 +2718,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void getRootCertTrustBit(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                 CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2821,7 +2835,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void deleteCerts(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                 CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
         String nickname = "";
@@ -2853,8 +2868,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void validateSubjectName(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
@@ -2874,7 +2889,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void validateKeyLength(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String keyType = "RSA";
         String keyLen = "512";
         String certType = "";
@@ -2904,7 +2920,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void validateCurveName(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String curveName = null;
 
         while (enum1.hasMoreElements()) {
@@ -2934,7 +2951,8 @@ public final class CMSAdminServlet extends AdminServlet {
     private void validateCertExtension(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
         String certExt = "";
 
         while (enum1.hasMoreElements()) {
@@ -2958,7 +2976,8 @@ public final class CMSAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         String nickname = "";
         String keyType = "RSA";
@@ -2989,7 +3008,8 @@ public final class CMSAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
         NameValuePairs params = new NameValuePairs();
-        Enumeration enum1 = req.getParameterNames();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> enum1 = req.getParameterNames();
 
         String nickname = "";
         String keyType = "RSA";
@@ -3078,7 +3098,8 @@ public final class CMSAdminServlet extends AdminServlet {
         // ensure that any low-level exceptions are reported
         // to the signed audit log and stored as failures
         try {
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                     CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
             String trust = "";
@@ -3178,8 +3199,8 @@ public final class CMSAdminServlet extends AdminServlet {
                 CMS.debug("CMSAdminServlet::runSelfTestsOnDemand():"
                         + "  ENTERING . . .");
             }
-
-            Enumeration enum1 = req.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> enum1 = req.getParameterNames();
             String request = "";
             NameValuePairs results = new NameValuePairs();
             String content = "";
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
index 57fadab47798c64268b1d7866f8c62c409e05935..cbc406997eb6661b7663f3dfaf5fd571d70545e1 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
@@ -1981,7 +1981,8 @@ public class ProfileAdminServlet extends AdminServlet {
                 nvp.add(name, ";" + ";" + rule.getConfig(name));
             } else {
                 nvp.add(name,
-                        desc.getSyntax() + ";" + ";" + getNonNull(desc.getConstraint()) + ";"
+                        desc.getSyntax()
+                                + ";" + ";" + getNonNull(desc.getConstraint()) + ";"
                                 + desc.getDescription(getLocale(req)) + ";" + rule.getConfig(name));
             }
         }
@@ -2031,8 +2032,9 @@ public class ProfileAdminServlet extends AdminServlet {
                 nvp.add(name, ";" + rule.getConfig(name));
             } else {
                 nvp.add(name,
-                        desc.getSyntax() + ";" + getNonNull(desc.getConstraint()) + ";"
-                                + desc.getDescription(getLocale(req)) + ";" + rule.getConfig(name));
+                        desc.getSyntax()
+                                + ";" + getNonNull(desc.getConstraint()) + ";" + desc.getDescription(getLocale(req))
+                                + ";" + rule.getConfig(name));
             }
         }
         sendResponse(SUCCESS, null, nvp, resp);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
index e8d80640e5629727e62f6875aff6b355598de71f..58cf327bb2e82c1cfd211e120f54cf2a68cd9afc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
@@ -353,13 +353,15 @@ public class PublisherAdminServlet extends AdminServlet {
 
         String epi[] = new String[] {
                 "type;choice(cacert,crl,certs,xcert);The certType of the request",
-                "mapper;choice(" + map.toString()
+                "mapper;choice("
+                        + map.toString()
                         + ");Use the mapper to find the ldap dn to publish the certificate or crl",
-                "publisher;choice(" + publish.toString()
+                "publisher;choice("
+                        + publish.toString()
                         + ");Use the publisher to publish the certificate or crl a directory etc",
                 "enable;boolean;",
                 "predicate;string;"
-            };
+        };
 
         return new ExtendedPluginInfo(epi);
     }
@@ -714,9 +716,10 @@ public class PublisherAdminServlet extends AdminServlet {
             if (authType.equals(ILdapAuthInfo.LDAP_SSLCLIENTAUTH_STR)) {
                 try {
                     //certNickName = authInfo.getParms()[0];
-                    certNickName = ldap.getSubStore(
-                                ILdapBoundConnFactory.PROP_LDAPAUTHINFO).getString(
-                            ILdapAuthInfo.PROP_CLIENTCERTNICKNAME);
+                    certNickName =
+                            ldap.getSubStore(
+                                    ILdapBoundConnFactory.PROP_LDAPAUTHINFO).getString(
+                                    ILdapAuthInfo.PROP_CLIENTCERTNICKNAME);
                     conn = new LDAPConnection(CMS.getLdapJssSSLSocketFactory(
                                     certNickName));
                     CMS.debug("Publishing Test certNickName=" + certNickName);
@@ -725,7 +728,8 @@ public class PublisherAdminServlet extends AdminServlet {
                                     certNickName + dashes(70 - 44 - certNickName.length()) + " Success");
                 } catch (Exception ex) {
                     params.add(Constants.PR_CONN_INIT_FAIL,
-                            "Create ssl LDAPConnection with certificate: " +
+                            "Create ssl LDAPConnection with certificate: "
+                                    +
                                     certNickName + dashes(70 - 44 - certNickName.length()) + " failure\n"
                                     + " exception: " + ex);
                     params.add(Constants.PR_SAVE_NOT,
@@ -737,7 +741,8 @@ public class PublisherAdminServlet extends AdminServlet {
                 try {
                     conn.connect(host, port);
                     params.add(Constants.PR_CONN_OK,
-                            "Connect to directory server " +
+                            "Connect to directory server "
+                                    +
                                     host + " at port " + port +
                                     dashes(70 - 37 - host.length() - (Integer.valueOf(port)).toString().length())
                                     + " Success");
@@ -799,7 +804,8 @@ public class PublisherAdminServlet extends AdminServlet {
                 try {
                     conn.connect(host, port);
                     params.add(Constants.PR_CONN_OK,
-                            "Connect to directory server " +
+                            "Connect to directory server "
+                                    +
                                     host + " at port " + port +
                                     dashes(70 - 37 - host.length() - (Integer.valueOf(port)).toString().length())
                                     + " Success");
@@ -808,14 +814,16 @@ public class PublisherAdminServlet extends AdminServlet {
                         // need to intercept this because message from LDAP is
                         // "DSA is unavailable" which confuses with DSA PKI.
                         params.add(Constants.PR_CONN_FAIL,
-                                "Connect to directory server " +
+                                "Connect to directory server "
+                                        +
                                         host + " at port " + port +
                                         dashes(70 - 37 - host.length() - (Integer.valueOf(port)).toString().length())
                                         + " Failure" +
                                         "\nerror: server unavailable");
                     } else {
                         params.add(Constants.PR_CONN_FAIL,
-                                "Connect to directory server " +
+                                "Connect to directory server "
+                                        +
                                         host + " at port " + port +
                                         dashes(70 - 37 - host.length() - (Integer.valueOf(port)).toString().length())
                                         + " Failure" +
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/RegistryAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/RegistryAdminServlet.java
index 41c07d8105d336f72bc3c7d1c9e67107d6483410..0175d9aa46ec21d0465bb8a0a469bb758969c9ba 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/RegistryAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/RegistryAdminServlet.java
@@ -290,7 +290,8 @@ public class RegistryAdminServlet extends AdminServlet {
                         CMS.debug("RegistryAdminServlet: getSUpportedConstraint isApplicable "
                                 + constraintInfo.getClassName());
                         nvp.add(constraintID,
-                                constraintInfo.getClassName() + "," +
+                                constraintInfo.getClassName()
+                                        + "," +
                                         constraintInfo.getDescription(getLocale(req)) + ","
                                         + constraintInfo.getName(getLocale(req)));
                     }
@@ -344,8 +345,11 @@ public class RegistryAdminServlet extends AdminServlet {
 
                     if (desc != null) {
                         try {
-                            String value = getNonNull(desc.getSyntax()) + ";" + getNonNull(desc.getConstraint()) + ";"
-                                    + desc.getDescription(getLocale(req)) + ";" + getNonNull(desc.getDefaultValue());
+                            String value =
+                                    getNonNull(desc.getSyntax())
+                                            + ";" + getNonNull(desc.getConstraint()) + ";"
+                                            + desc.getDescription(getLocale(req)) + ";"
+                                            + getNonNull(desc.getDefaultValue());
 
                             CMS.debug("RegistryAdminServlet: getProfileImpl " + value);
                             nvp.add(name, value);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
index 2920d0f463b991b3400ee02080982f5e3bccfc14..e292e501a460a14ea60104579a4c811f3388c3fe 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
@@ -493,8 +493,8 @@ public abstract class CMSServlet extends HttpServlet {
             Date endDate = CMS.getCurrentDate();
             long endTime = endDate.getTime();
             if (CMS.debugOn()) {
-                CMS.debug(CMS.DEBUG_INFORM, "CMSServlet: curDate=" + endDate + " id=" + mId + " time="
-                        + (endTime - startTime));
+                CMS.debug(CMS.DEBUG_INFORM, "CMSServlet: curDate="
+                        + endDate + " id=" + mId + " time=" + (endTime - startTime));
             }
             iCommandQueue.unRegisterProccess((Object) cmsRequest, (Object) this);
         } catch (EBaseException e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
index 0d7da7fa874c771019ab5af1fa45d3fb9292b889..461fa0b945cf0a0c8124fcb4a48ff19ba495d915 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/CMCRevReqServlet.java
@@ -236,8 +236,9 @@ public class CMCRevReqServlet extends CMSServlet {
                 certs = new X509CertImpl[serialNoArray.length];
 
                 for (int i = 0; i < serialNoArray.length; i++) {
-                    certs[i] = ((ICertificateAuthority) mAuthority).getCertificateRepository().getX509Certificate(
-                            serialNoArray[i]);
+                    certs[i] =
+                            ((ICertificateAuthority) mAuthority).getCertificateRepository().getX509Certificate(
+                                    serialNoArray[i]);
                 }
 
             } else if (mAuthority instanceof IRegistrationAuthority) {
@@ -379,8 +380,8 @@ public class CMCRevReqServlet extends CMSServlet {
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -406,7 +407,7 @@ public class CMCRevReqServlet extends CMSServlet {
             if (mAuthority instanceof ICertificateAuthority) {
                 ICertRecordList list = (ICertRecordList) mCertDB.findCertRecordsInList(
                         revokeAll, null, totalRecordCount);
-                Enumeration e = list.getCertRecords(0, totalRecordCount - 1);
+                Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
                     ICertRecord rec = (ICertRecord) e.nextElement();
@@ -439,11 +440,11 @@ public class CMCRevReqServlet extends CMSServlet {
 
                 if (mRequestID != null && mRequestID.length() > 0)
                     reqIdStr = mRequestID;
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
-                    for (int i = revokeAll.indexOf('='); i < revokeAll.length() && i > -1; i = revokeAll
-                            .indexOf('=', i)) {
+                    for (int i = revokeAll.indexOf('='); i < revokeAll.length() && i > -1; i =
+                            revokeAll.indexOf('=', i)) {
                         if (i > -1) {
                             i++;
                             while (i < revokeAll.length() && revokeAll.charAt(i) == ' ') {
@@ -654,7 +655,7 @@ public class CMCRevReqServlet extends CMSServlet {
                 }
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls.
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                             ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -761,7 +762,7 @@ public class CMCRevReqServlet extends CMSServlet {
                 }
 
             } else {
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 StringBuffer errorStr = new StringBuffer();
 
                 if (errors != null && errors.size() > 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
index 14f28bce9aa9f1ef5a0eeca87e6be5a387ff3118..8ca35484b6ae32b67b17f51f12ae7c684e1698c8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
@@ -213,8 +213,9 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 certs = new X509CertImpl[serialNoArray.length];
 
                 for (int i = 0; i < serialNoArray.length; i++) {
-                    certs[i] = ((ICertificateAuthority) mAuthority).getCertificateRepository().getX509Certificate(
-                            serialNoArray[i]);
+                    certs[i] =
+                            ((ICertificateAuthority) mAuthority).getCertificateRepository().getX509Certificate(
+                                    serialNoArray[i]);
                 }
 
             } else if (mAuthority instanceof IRegistrationAuthority) {
@@ -308,8 +309,8 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
             throws EBaseException {
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -335,7 +336,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
             if (mAuthority instanceof ICertificateAuthority) {
                 ICertRecordList list = (ICertRecordList) mCertDB.findCertRecordsInList(
                         revokeAll, null, totalRecordCount);
-                Enumeration e = list.getCertRecords(0, totalRecordCount - 1);
+                Enumeration<ICertRecord> e = list.getCertRecords(0, totalRecordCount - 1);
 
                 while (e != null && e.hasMoreElements()) {
                     ICertRecord rec = (ICertRecord) e.nextElement();
@@ -368,7 +369,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
 
                 if (mRequestID != null && mRequestID.length() > 0)
                     reqIdStr = mRequestID;
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
                     for (int i = revokeAll.indexOf('='); i < revokeAll.length() && i > -1; 
@@ -563,7 +564,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 }
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls.
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                             ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -672,7 +673,7 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
                 }
 
             } else {
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 StringBuffer errorStr = new StringBuffer();
 
                 if (errors != null && errors.size() > 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
index 1c9838f834a473b42370fb61fa3e19016936f1f7..36746106a70cd05bf453572c2b363f43236b067e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayBySerial.java
@@ -309,8 +309,8 @@ public class DisplayBySerial extends CMSServlet {
                     String rid = (String) metaInfo.get(ICertRecord.META_REQUEST_ID);
 
                     if (rid != null && mAuthority instanceof ICertificateAuthority) {
-                        IRequest r = ((ICertificateAuthority) mAuthority).getRequestQueue().findRequest(
-                                new RequestId(rid));
+                        IRequest r =
+                                ((ICertificateAuthority) mAuthority).getRequestQueue().findRequest(new RequestId(rid));
                         String certType = r.getExtDataInString(IRequest.HTTP_PARAMS, IRequest.CERT_TYPE);
 
                         if (certType != null && certType.equals(IRequest.CLIENT_CERT)) {
@@ -331,7 +331,7 @@ public class DisplayBySerial extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enumx = crlExts.getElements();
+                    Enumeration<Extension> enumx = crlExts.getElements();
                     int reason = 0;
 
                     while (enumx.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
index 97a70fac3c33386d2b403995e0c51b6d2097d02c..b84f5ace14ba8abe694a76793ebe00a0632a982e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevoke.java
@@ -439,8 +439,8 @@ public class DoRevoke extends CMSServlet {
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -465,11 +465,11 @@ public class DoRevoke extends CMSServlet {
 
             if (mAuthority instanceof ICertificateAuthority) {
 
-                Enumeration e = mCertDB.searchCertificates(revokeAll,
+                Enumeration<ICertRecord> e = mCertDB.searchCertificates(revokeAll,
                         totalRecordCount, mTimeLimits);
 
                 while (e != null && e.hasMoreElements()) {
-                    ICertRecord rec = (ICertRecord) e.nextElement();
+                    ICertRecord rec = e.nextElement();
 
                     if (rec == null)
                         continue;
@@ -532,7 +532,7 @@ public class DoRevoke extends CMSServlet {
 
             } else if (mAuthority instanceof IRegistrationAuthority) {
                 String reqIdStr = req.getParameter("requestId");
-                Vector serialNumbers = new Vector();
+                Vector<String> serialNumbers = new Vector<String>();
 
                 if (revokeAll != null && revokeAll.length() > 0) {
                     for (int i = revokeAll.indexOf('='); i < revokeAll.length() && i > -1; 
@@ -787,8 +787,8 @@ public class DoRevoke extends CMSServlet {
                                             "completed",
                                             cert.getSubjectDN(),
                                             cert.getSerialNumber().toString(16),
-                                            RevocationReason.fromInt(reason).toString() + " time: "
-                                                    + (endTime - startTime) }
+                                            RevocationReason.fromInt(reason).toString()
+                                                    + " time: " + (endTime - startTime) }
                                     );
                         }
                     }
@@ -833,7 +833,7 @@ public class DoRevoke extends CMSServlet {
 
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls. 
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                             ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -925,7 +925,7 @@ public class DoRevoke extends CMSServlet {
                 } else {
                     header.addStringValue("revoked", "no");
                 }
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 if (errors != null) {
                     StringBuffer errInfo = new StringBuffer();
                     for (int i = 0; i < errors.size(); i++) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
index 075f3218b8f45b2e17e8607e347d54899aaac4a4..00cca204a98275a87f6c291923d2a5b22f1ae7f9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoRevokeTPS.java
@@ -353,8 +353,8 @@ public class DoRevokeTPS extends CMSServlet {
 
         try {
             int count = 0;
-            Vector oldCertsV = new Vector();
-            Vector revCertImplsV = new Vector();
+            Vector<X509CertImpl> oldCertsV = new Vector<X509CertImpl>();
+            Vector<RevokedCertImpl> revCertImplsV = new Vector<RevokedCertImpl>();
 
             // Construct a CRL reason code extension.
             RevocationReason revReason = RevocationReason.fromInt(reason);
@@ -377,7 +377,7 @@ public class DoRevokeTPS extends CMSServlet {
                 entryExtn.set(invalidityDateExtn.getName(), invalidityDateExtn);
             }
 
-            Enumeration e = mCertDB.searchCertificates(revokeAll,
+            Enumeration<ICertRecord> e = mCertDB.searchCertificates(revokeAll,
                     totalRecordCount, mTimeLimits);
 
             boolean alreadyRevokedCertFound = false;
@@ -593,8 +593,8 @@ public class DoRevokeTPS extends CMSServlet {
                                             "completed",
                                             cert.getSubjectDN(),
                                             cert.getSerialNumber().toString(16),
-                                            RevocationReason.fromInt(reason).toString() + " time: "
-                                                    + (endTime - startTime) }
+                                            RevocationReason.fromInt(reason).toString()
+                                                    + " time: " + (endTime - startTime) }
                                     );
                         }
                     }
@@ -633,7 +633,7 @@ public class DoRevokeTPS extends CMSServlet {
 
                 if (mAuthority instanceof ICertificateAuthority) {
                     // let known update and publish status of all crls. 
-                    Enumeration otherCRLs =
+                    Enumeration<ICRLIssuingPoint> otherCRLs =
                             ((ICertificateAuthority) mAuthority).getCRLIssuingPoints();
 
                     while (otherCRLs.hasMoreElements()) {
@@ -718,7 +718,7 @@ public class DoRevokeTPS extends CMSServlet {
                     o_status = "status=2";
                     errorString = "error=Undefined request status";
                 }
-                Vector errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> errors = revReq.getExtDataInStringVector(IRequest.ERRORS);
                 if (errors != null) {
                     StringBuffer errInfo = new StringBuffer();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
index 0c7b73780b99a1bc00976243fa9fe10e3a50fad0..7b3fb2f748d236f7fe34d3ad2a47ac12c83aa6dc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/EnrollServlet.java
@@ -465,12 +465,13 @@ public class EnrollServlet extends CMSServlet {
         }
 
         String filter =
-                "(&(x509cert.subject=" + certBasedOldSubjectDN + ")(!(x509cert.serialNumber=" + certBasedOldSerialNum
+                "(&(x509cert.subject="
+                        + certBasedOldSubjectDN + ")(!(x509cert.serialNumber=" + certBasedOldSerialNum
                         + "))(certStatus=VALID))";
         ICertRecordList list =
                 (ICertRecordList) mCa.getCertificateRepository().findCertRecordsInList(filter, null, 10);
         int size = list.getSize();
-        Enumeration en = list.getCertRecords(0, size - 1);
+        Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
         boolean gotEncCert = false;
 
         CMS.debug("EnrollServlet: signing cert filter " + filter);
@@ -572,10 +573,10 @@ public class EnrollServlet extends CMSServlet {
             // audit log the status
             try {
                 if (status == RequestStatus.REJECTED) {
-                    Vector messages = req.getExtDataInStringVector(IRequest.ERRORS);
+                    Vector<String> messages = req.getExtDataInStringVector(IRequest.ERRORS);
 
                     if (messages != null) {
-                        Enumeration msgs = messages.elements();
+                        Enumeration<String> msgs = messages.elements();
                         StringBuffer wholeMsg = new StringBuffer();
 
                         while (msgs.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
index e42150f878d1915c0c72abe9218440ff9932e3d0..4d5b711c049520eed21044ecb6fb8d12fbf2e097 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/HashEnrollServlet.java
@@ -487,13 +487,14 @@ public class HashEnrollServlet extends CMSServlet {
                 }
 
                 String filter =
-                        "(&(x509cert.subject=" + certBasedOldSubjectDN + ")(!(x509cert.serialNumber="
-                                + certBasedOldSerialNum + "))(certStatus=VALID))";
+                        "(&(x509cert.subject="
+                                + certBasedOldSubjectDN + ")(!(x509cert.serialNumber=" + certBasedOldSerialNum
+                                + "))(certStatus=VALID))";
                 ICertRecordList list =
                         (ICertRecordList) mCa.getCertificateRepository().findCertRecordsInList(filter,
                                 null, 10);
                 int size = list.getSize();
-                Enumeration en = list.getCertRecords(0, size - 1);
+                Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
                 boolean gotEncCert = false;
 
                 if (!en.hasMoreElements()) {
@@ -656,10 +657,10 @@ public class HashEnrollServlet extends CMSServlet {
             // audit log the status 
             try {
                 if (status == RequestStatus.REJECTED) {
-                    Vector messages = req.getExtDataInStringVector(IRequest.ERRORS);
+                    Vector<String> messages = req.getExtDataInStringVector(IRequest.ERRORS);
 
                     if (messages != null) {
-                        Enumeration msgs = messages.elements();
+                        Enumeration<String> msgs = messages.elements();
                         StringBuffer wholeMsg = new StringBuffer();
 
                         while (msgs.hasMoreElements()) {
@@ -947,8 +948,8 @@ public class HashEnrollServlet extends CMSServlet {
                 // field suggested notBefore and notAfter in CRMF
                 // Tech Support #383184
                 if (certTemplate.getNotBefore() != null || certTemplate.getNotAfter() != null) {
-                    CertificateValidity certValidity = new CertificateValidity(certTemplate.getNotBefore(),
-                            certTemplate.getNotAfter());
+                    CertificateValidity certValidity =
+                            new CertificateValidity(certTemplate.getNotBefore(), certTemplate.getNotAfter());
 
                     certInfo.set(X509CertInfo.VALIDITY, certValidity);
                 }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
index c12c8193d730e58315b4a85ca4addee206c3f37c..8a818f5e819c4d42f31f6867ddbba86c32916539 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java
@@ -68,10 +68,8 @@ public class ListCerts extends CMSServlet {
      */
     private static final long serialVersionUID = -3568155814023099576L;
     private final static String TPL_FILE = "queryCert.template";
-    private final static String INFO = "ListCerts";
     private final static BigInteger MINUS_ONE = new BigInteger("-1");
 
-    private final static String CURRENT_TIME = "currentTime";
     private final static String USE_CLIENT_FILTER = "useClientFilter";
     private final static String ALLOWED_CLIENT_FILTERS = "allowedClientFilters";
 
@@ -82,7 +80,7 @@ public class ListCerts extends CMSServlet {
     private boolean mHardJumpTo = false; //jump to the end
     private String mDirection = null;
     private boolean mUseClientFilter = false;
-    private Vector mAllowedClientFilters = new Vector();
+    private Vector<String> mAllowedClientFilters = new Vector<String>();
     private int mMaxReturns = 2000;
 
     /**
@@ -149,18 +147,18 @@ public class ListCerts extends CMSServlet {
 
         if (mUseClientFilter) {
             com.netscape.certsrv.apps.CMS.debug("useClientFilter=true");
-            Enumeration filters = mAllowedClientFilters.elements();
+            Enumeration<String> filters = mAllowedClientFilters.elements();
             // check to see if the filter is allowed
             while (filters.hasMoreElements()) {
                 String filter = (String) filters.nextElement();
-                com.netscape.certsrv.apps.CMS.debug("Comparing filter=" + filter + " queryCertFilter="
-                        + queryCertFilter);
+                com.netscape.certsrv.apps.CMS.debug("Comparing filter="
+                        + filter + " queryCertFilter=" + queryCertFilter);
                 if (filter.equals(queryCertFilter)) {
                     return queryCertFilter;
                 }
             }
-            com.netscape.certsrv.apps.CMS.debug("Requested filter '" + queryCertFilter
-                    + "' is not allowed. Please check the " + ALLOWED_CLIENT_FILTERS + "parameter");
+            com.netscape.certsrv.apps.CMS.debug("Requested filter '"
+                    + queryCertFilter + "' is not allowed. Please check the " + ALLOWED_CLIENT_FILTERS + "parameter");
             return null;
         } else {
             com.netscape.certsrv.apps.CMS.debug("useClientFilter=false");
@@ -320,8 +318,9 @@ public class ListCerts extends CMSServlet {
         } catch (NumberFormatException e) {
             log(ILogger.LL_FAILURE, com.netscape.certsrv.apps.CMS.getLogMessage("BASE_INVALID_NUMBER_FORMAT"));
 
-            error = new EBaseException(com.netscape.certsrv.apps.CMS.getUserMessage(getLocale(req),
-                    "CMS_BASE_INVALID_NUMBER_FORMAT"));
+            error =
+                    new EBaseException(com.netscape.certsrv.apps.CMS.getUserMessage(getLocale(req),
+                            "CMS_BASE_INVALID_NUMBER_FORMAT"));
         } catch (EBaseException e) {
             error = e;
         }
@@ -395,7 +394,7 @@ public class ListCerts extends CMSServlet {
                 pSize);
         // retrive maxCount + 1 entries
 
-        Enumeration e = list.getCertRecords(0, maxCount);
+        Enumeration<ICertRecord> e = list.getCertRecords(0, maxCount);
 
         ICertRecordList tolist = null;
         int toCurIndex = 0;
@@ -407,7 +406,7 @@ public class ListCerts extends CMSServlet {
                         filter,
                         (String[]) null, serialTo,
                         "serialno", maxCount);
-            Enumeration en = tolist.getCertRecords(0, 0);
+            Enumeration<ICertRecord> en = tolist.getCertRecords(0, 0);
 
             if (en == null || (!en.hasMoreElements())) {
                 toCurIndex = list.getSize() - 1;
@@ -654,7 +653,7 @@ public class ListCerts extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enum1 = crlExts.getElements();
+                    Enumeration<Extension> enum1 = crlExts.getElements();
                     int reason = 0;
 
                     while (enum1.hasMoreElements()) {
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 bbe8a479efe3935d6f19cee59d007a89cd4f72dc..8e6d5821604a9d843577c438c0a9fcf4869b4b85 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
@@ -608,14 +608,14 @@ public class SrchCerts extends CMSServlet {
                 CMS.debug("Resetting timelimit from " + timeLimit + " to " + mTimeLimits);
                 timeLimit = mTimeLimits;
             }
-            CMS.debug("Start searching ... " + "filter=" + filter + " maxreturns=" + maxResults + " timelimit="
-                    + timeLimit);
-            Enumeration e = mCertDB.searchCertificates(filter, maxResults, timeLimit);
+            CMS.debug("Start searching ... "
+                    + "filter=" + filter + " maxreturns=" + maxResults + " timelimit=" + timeLimit);
+            Enumeration<ICertRecord> e = mCertDB.searchCertificates(filter, maxResults, timeLimit);
 
             int count = 0;
 
             while (e != null && e.hasMoreElements()) {
-                ICertRecord rec = (ICertRecord) e.nextElement();
+                ICertRecord rec = e.nextElement();
 
                 if (rec != null) {
                     count++;
@@ -744,11 +744,11 @@ public class SrchCerts extends CMSServlet {
                 CRLExtensions crlExts = revocationInfo.getCRLEntryExtensions();
 
                 if (crlExts != null) {
-                    Enumeration enum1 = crlExts.getElements();
+                    Enumeration<Extension> enum1 = crlExts.getElements();
                     int reason = 0;
 
                     while (enum1.hasMoreElements()) {
-                        Extension ext = (Extension) enum1.nextElement();
+                        Extension ext = enum1.nextElement();
 
                         if (ext instanceof CRLReasonExtension) {
                             reason = ((CRLReasonExtension) ext).getReason().toInt();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
index 9d3e633d2339480625cfa61fda53201c7c3182f0..680886b95dcfc28b69924665ee0ff86efa062856 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateCRL.java
@@ -50,6 +50,7 @@ import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.ldap.ELdapException;
 import com.netscape.certsrv.logging.AuditFormat;
 import com.netscape.certsrv.logging.ILogger;
+import com.netscape.certsrv.publish.ILdapRule;
 import com.netscape.certsrv.publish.IPublisherProcessor;
 import com.netscape.certsrv.util.IStatsSubsystem;
 import com.netscape.cms.servlet.base.CMSServlet;
@@ -72,7 +73,7 @@ public class UpdateCRL extends CMSServlet {
     private final static String INFO = "UpdateCRL";
     private final static String TPL_FILE = "updateCRL.template";
 
-    private static Vector mTesting = new Vector();
+    private static Vector<String> mTesting = new Vector<String>();
 
     private String mFormPath = null;
     private ICertificateAuthority mCA = null;
@@ -278,7 +279,7 @@ public class UpdateCRL extends CMSServlet {
         rarg.addStringValue("crlSizes", crlSizes);
 
         StringBuffer crlSplits = new StringBuffer();
-        Vector splits = crlIssuingPoint.getSplitTimes();
+        Vector<Long> splits = crlIssuingPoint.getSplitTimes();
         for (int i = 0; i < splits.size(); i++) {
             crlSplits.append(splits.elementAt(i));
             if (i + 1 < splits.size())
@@ -311,10 +312,10 @@ public class UpdateCRL extends CMSServlet {
         String results = req.getParameter("results");
 
         if (crlIssuingPointId != null) {
-            Enumeration ips = mCA.getCRLIssuingPoints();
+            Enumeration<ICRLIssuingPoint> ips = mCA.getCRLIssuingPoints();
 
             while (ips.hasMoreElements()) {
-                ICRLIssuingPoint ip = (ICRLIssuingPoint) ips.nextElement();
+                ICRLIssuingPoint ip = ips.nextElement();
 
                 if (crlIssuingPointId.equals(ip.getId())) {
                     break;
@@ -447,7 +448,7 @@ public class UpdateCRL extends CMSServlet {
                         }
 
                         if (lpm != null && lpm.enabled()) {
-                            Enumeration rules = lpm.getRules(IPublisherProcessor.PROP_LOCAL_CRL);
+                            Enumeration<ILdapRule> rules = lpm.getRules(IPublisherProcessor.PROP_LOCAL_CRL);
                             if (rules != null && rules.hasMoreElements()) {
                                 if (publishError != null) {
                                     header.addStringValue("crlPublished", "Failure");
@@ -481,8 +482,8 @@ public class UpdateCRL extends CMSServlet {
                                             crlIssuingPoint.getCRLNumber(),
                                             crlIssuingPoint.getLastUpdate(),
                                             crlIssuingPoint.getNextUpdate(),
-                                            Long.toString(crlIssuingPoint.getCRLSize()) + " time: "
-                                                    + (endTime - startTime) }
+                                            Long.toString(crlIssuingPoint.getCRLSize())
+                                                    + " time: " + (endTime - startTime) }
                                     );
                         } else {
                             mLogger.log(ILogger.EV_AUDIT, ILogger.S_OTHER,
@@ -496,8 +497,8 @@ public class UpdateCRL extends CMSServlet {
                                             crlIssuingPoint.getCRLNumber(),
                                             crlIssuingPoint.getLastUpdate(),
                                             "not set",
-                                            Long.toString(crlIssuingPoint.getCRLSize()) + " time: "
-                                                    + (endTime - startTime) }
+                                            Long.toString(crlIssuingPoint.getCRLSize())
+                                                    + " time: " + (endTime - startTime) }
                                     );
                         }
                     } catch (EBaseException e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
index 75ec99e13f14742946fe8f54ea3d88b3a475a636..23793b3f92b2b1706df8fafc8bbe0b6f9cc3d8d6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java
@@ -206,9 +206,10 @@ public class CRSEnrollment extends HttpServlet {
     public CRSEnrollment() {
     }
 
-    public static Hashtable toHashtable(HttpServletRequest req) {
-        Hashtable httpReqHash = new Hashtable();
-        Enumeration names = req.getParameterNames();
+    public static Hashtable<String, String> toHashtable(HttpServletRequest req) {
+        Hashtable<String, String> httpReqHash = new Hashtable<String, String>();
+        @SuppressWarnings("unchecked")
+        Enumeration<String> names = req.getParameterNames();
         while (names.hasMoreElements()) {
             String name = (String) names.nextElement();
             httpReqHash.put(name, req.getParameter(name));
@@ -416,7 +417,7 @@ public class CRSEnrollment extends HttpServlet {
             HttpServletRequest request) throws EBaseException {
 
         // build credential
-        Enumeration authNames = authenticator.getValueNames();
+        Enumeration<String> authNames = authenticator.getValueNames();
 
         if (authNames != null) {
             while (authNames.hasMoreElements()) {
@@ -536,7 +537,7 @@ public class CRSEnrollment extends HttpServlet {
 
     public String getPasswordFromP10(PKCS10 p10) {
         PKCS10Attributes p10atts = p10.getAttributes();
-        Enumeration e = p10atts.getElements();
+        Enumeration<PKCS10Attribute> e = p10atts.getElements();
 
         try {
             while (e.hasMoreElements()) {
@@ -688,7 +689,7 @@ public class CRSEnrollment extends HttpServlet {
 
             String pkcs10Attr = "";
             PKCS10Attributes p10atts = p10.getAttributes();
-            Enumeration e = p10atts.getElements();
+            Enumeration<PKCS10Attribute> e = p10atts.getElements();
 
             while (e.hasMoreElements()) {
                 PKCS10Attribute p10a = (PKCS10Attribute) e.nextElement();
@@ -696,18 +697,21 @@ public class CRSEnrollment extends HttpServlet {
 
                 if (attr.getName().equals(ChallengePassword.NAME)) {
                     if (attr.get(ChallengePassword.PASSWORD) != null) {
-                        pkcs10Attr = pkcs10Attr +
+                        pkcs10Attr =
+                                pkcs10Attr
+                                        +
                                          "<ChallengePassword><Password>"
-                                + (String) attr.get(ChallengePassword.PASSWORD) + "</Password></ChallengePassword>";
+                                        + (String) attr.get(ChallengePassword.PASSWORD)
+                                        + "</Password></ChallengePassword>";
                     }
 
                 }
                 String extensionsStr = "";
                 if (attr.getName().equals(ExtensionsRequested.NAME)) {
 
-                    Enumeration exts = ((ExtensionsRequested) attr).getExtensions().elements();
+                    Enumeration<Extension> exts = ((ExtensionsRequested) attr).getExtensions().elements();
                     while (exts.hasMoreElements()) {
-                        Extension ext = (Extension) exts.nextElement();
+                        Extension ext = exts.nextElement();
 
                         if (ext.getExtensionId().equals(
                                 OIDMap.getOID(SubjectAlternativeNameExtension.IDENT))) {
@@ -716,14 +720,16 @@ public class CRSEnrollment extends HttpServlet {
                                     Boolean.valueOf(false), // noncritical
                                     ext.getExtensionValue());
 
-                            Vector v =
-                                    (Vector) sane.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
+                            @SuppressWarnings("unchecked")
+                            Vector<GeneralNameInterface> v =
+                                    (Vector<GeneralNameInterface>) sane
+                                            .get(SubjectAlternativeNameExtension.SUBJECT_NAME);
 
-                            Enumeration gne = v.elements();
+                            Enumeration<GeneralNameInterface> gne = v.elements();
 
                             StringBuffer subjAltNameStr = new StringBuffer();
                             while (gne.hasMoreElements()) {
-                                GeneralNameInterface gni = (GeneralNameInterface) gne.nextElement();
+                                GeneralNameInterface gni = gne.nextElement();
                                 if (gni instanceof GeneralName) {
                                     GeneralName genName = (GeneralName) gni;
 
@@ -974,14 +980,14 @@ public class CRSEnrollment extends HttpServlet {
         IRequestQueue rq = ca.getRequestQueue();
         IRequest foundRequest = null;
 
-        Enumeration rids = rq.findRequestsBySourceId(txid);
+        Enumeration<RequestId> rids = rq.findRequestsBySourceId(txid);
         if (rids == null) {
             return null;
         }
 
         int count = 0;
         while (rids.hasMoreElements()) {
-            RequestId rid = (RequestId) rids.nextElement();
+            RequestId rid = rids.nextElement();
             if (rid == null) {
                 continue;
             }
@@ -1151,12 +1157,11 @@ public class CRSEnrollment extends HttpServlet {
 
         IRequest issueReq = null;
         X509CertImpl issuedCert = null;
-        Vector extensionsRequested = null;
         SubjectAlternativeNameExtension sane = null;
         CertAttrSet requested_ext = null;
 
         try {
-            PKCS10 p10 = (PKCS10) req.getP10();
+            PKCS10 p10 = req.getP10();
 
             if (p10 == null) {
                 crsResp.setFailInfo(CRSPKIMessage.mFailInfo_badMessageCheck);
@@ -1185,10 +1190,10 @@ public class CRSEnrollment extends HttpServlet {
             //   one RDN, with many AVA's    to
             //   many RDN's with one AVA in each.
 
-            Enumeration rdne = p10subject.getRDNs();
-            Vector rdnv = new Vector();
+            Enumeration<RDN> rdne = p10subject.getRDNs();
+            Vector<RDN> rdnv = new Vector<RDN>();
 
-            Hashtable sanehash = new Hashtable();
+            Hashtable<String, String> sanehash = new Hashtable<String, String>();
 
             X500NameAttrMap xnap = X500NameAttrMap.getDefault();
             while (rdne.hasMoreElements()) {
@@ -1228,7 +1233,7 @@ public class CRSEnrollment extends HttpServlet {
             kue.set(KeyUsageExtension.KEY_ENCIPHERMENT, Boolean.valueOf(true));
 
             PKCS10Attributes p10atts = p10.getAttributes();
-            Enumeration e = p10atts.getElements();
+            Enumeration<PKCS10Attribute> e = p10atts.getElements();
 
             while (e.hasMoreElements()) {
                 PKCS10Attribute p10a = (PKCS10Attribute) e.nextElement();
@@ -1246,9 +1251,9 @@ public class CRSEnrollment extends HttpServlet {
 
                 if (attr.getName().equals(ExtensionsRequested.NAME)) {
 
-                    Enumeration exts = ((ExtensionsRequested) attr).getExtensions().elements();
+                    Enumeration<Extension> exts = ((ExtensionsRequested) attr).getExtensions().elements();
                     while (exts.hasMoreElements()) {
-                        Extension ext = (Extension) exts.nextElement();
+                        Extension ext = exts.nextElement();
 
                         if (ext.getExtensionId().equals(
                                 OIDMap.getOID(KeyUsageExtension.IDENT))) {
@@ -1265,10 +1270,12 @@ public class CRSEnrollment extends HttpServlet {
                                     new Boolean(false), // noncritical
                                     ext.getExtensionValue());
 
-                            Vector v =
-                                    (Vector) sane.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
+                            @SuppressWarnings("unchecked")
+                            Vector<GeneralNameInterface> v =
+                                    (Vector<GeneralNameInterface>) sane
+                                            .get(SubjectAlternativeNameExtension.SUBJECT_NAME);
 
-                            Enumeration gne = v.elements();
+                            Enumeration<GeneralNameInterface> gne = v.elements();
 
                             while (gne.hasMoreElements()) {
                                 GeneralNameInterface gni = (GeneralNameInterface) gne.nextElement();
@@ -1308,8 +1315,8 @@ public class CRSEnrollment extends HttpServlet {
 
             } catch (Exception sne) {
                 log(ILogger.LL_INFO,
-                        "Unable to use appendDN parameter: " + mAppendDN + ". Error is " + sne.getMessage()
-                                + " Using unmodified subjectname");
+                        "Unable to use appendDN parameter: "
+                                + mAppendDN + ". Error is " + sne.getMessage() + " Using unmodified subjectname");
             }
 
             if (subject != null)
@@ -1350,7 +1357,7 @@ public class CRSEnrollment extends HttpServlet {
         } // NEED TO FIX
     }
 
-    private SubjectAlternativeNameExtension makeDefaultSubjectAltName(Hashtable ht) {
+    private SubjectAlternativeNameExtension makeDefaultSubjectAltName(Hashtable<String, String> ht) {
 
         // if no subjectaltname extension was requested, we try to make it up
         // from some of the elements of the subject name
@@ -1359,7 +1366,7 @@ public class CRSEnrollment extends HttpServlet {
         GeneralNameInterface[] gn = new GeneralNameInterface[ht.size()];
 
         itemCount = 0;
-        Enumeration en = ht.keys();
+        Enumeration<String> en = ht.keys();
         while (en.hasMoreElements()) {
             String key = (String) en.nextElement();
             if (key.equals(SANE_DNSNAME)) {
@@ -1445,15 +1452,15 @@ public class CRSEnrollment extends HttpServlet {
         return authenticationFailed;
     }
 
-    private boolean areFingerprintsEqual(IRequest req, Hashtable fingerprints) {
+    private boolean areFingerprintsEqual(IRequest req, Hashtable<String, byte[]> fingerprints) {
 
-        Hashtable old_fprints = req.getExtDataInHashtable(IRequest.FINGERPRINTS);
+        Hashtable<String, String> old_fprints = req.getExtDataInHashtable(IRequest.FINGERPRINTS);
         if (old_fprints == null) {
             return false;
         }
 
-        byte[] old_md5 = CMS.AtoB((String) old_fprints.get("MD5"));
-        byte[] new_md5 = (byte[]) fingerprints.get("MD5");
+        byte[] old_md5 = CMS.AtoB(old_fprints.get("MD5"));
+        byte[] new_md5 = fingerprints.get("MD5");
 
         if (old_md5.length != new_md5.length)
             return false;
@@ -1474,7 +1481,7 @@ public class CRSEnrollment extends HttpServlet {
 
         try {
             unwrapPKCS10(req, cx);
-            Hashtable fingerprints = makeFingerPrints(req);
+            Hashtable<String, byte[]> fingerprints = makeFingerPrints(req);
 
             if (cmsRequest != null) {
                 if (areFingerprintsEqual(cmsRequest, fingerprints)) {
@@ -1562,7 +1569,7 @@ public class CRSEnrollment extends HttpServlet {
 
         // use profile framework to handle SCEP
         if (mProfileId != null) {
-            PKCS10 pkcs10data = (PKCS10) req.getP10();
+            PKCS10 pkcs10data = req.getP10();
             String pkcs10blob = CMS.BtoA(pkcs10data.toByteArray());
 
             // XXX authentication handling
@@ -1673,10 +1680,10 @@ public class CRSEnrollment extends HttpServlet {
         } catch (Exception pwex) {
         }
 
-        Hashtable fingerprints = (Hashtable) req.get(IRequest.FINGERPRINTS);
+        Hashtable<?, ?> fingerprints = (Hashtable<?, ?>) req.get(IRequest.FINGERPRINTS);
         if (fingerprints.size() > 0) {
-            Hashtable encodedPrints = new Hashtable(fingerprints.size());
-            Enumeration e = fingerprints.keys();
+            Hashtable<String, String> encodedPrints = new Hashtable<String, String>(fingerprints.size());
+            Enumeration<?> e = fingerprints.keys();
             while (e.hasMoreElements()) {
                 String key = (String) e.nextElement();
                 byte[] value = (byte[]) fingerprints.get(key);
@@ -1706,8 +1713,8 @@ public class CRSEnrollment extends HttpServlet {
         return pkiReq;
     }
 
-    public Hashtable makeFingerPrints(CRSPKIMessage req) {
-        Hashtable fingerprints = new Hashtable();
+    public Hashtable<String, byte[]> makeFingerPrints(CRSPKIMessage req) {
+        Hashtable<String, byte[]> fingerprints = new Hashtable<String, byte[]>();
 
         MessageDigest md;
         String[] hashes = new String[] { "MD2", "MD5", "SHA1", "SHA256", "SHA512" };
@@ -1936,7 +1943,7 @@ public class CRSEnrollment extends HttpServlet {
         private CryptoToken keyStorageToken;
         private CryptoToken internalKeyStorageToken;
         private KeyGenerator DESkg;
-        private Enumeration externalTokens = null;
+        private Enumeration<?> externalTokens = null;
         private org.mozilla.jss.crypto.X509Certificate signingCert;
         private org.mozilla.jss.crypto.PrivateKey signingCertPrivKey;
         private int signingCertKeySize = 0;
@@ -2033,11 +2040,11 @@ public class CRSEnrollment extends HttpServlet {
             return internalToken;
         }
 
-        public void setExternalTokens(Enumeration tokens) {
+        public void setExternalTokens(Enumeration<?> tokens) {
             externalTokens = tokens;
         }
 
-        public Enumeration getExternalTokens() {
+        public Enumeration<?> getExternalTokens() {
             return externalTokens;
         }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
index 8a3ddb5d9dc5766da5d3dbcec5603fba4704ad21..ff55dc9ce6c9252ba82305c6bc8071ff30a6aa58 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Vector;
 
 import netscape.security.util.DerValue;
 import netscape.security.x509.CertAttrSet;
@@ -127,8 +127,8 @@ public class ChallengePassword implements CertAttrSet {
     /**
      * @return an empty set of elements
      */
-    public Enumeration getElements() {
-        return (new Hashtable()).elements();
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
     /**
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
index 33c28447f1aa42d1684f437f91186bb76cae23be..b3a0f56516c14ffbd97cf84a95aa8913643945d8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
@@ -23,7 +23,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
-import java.util.Hashtable;
 import java.util.Vector;
 
 import netscape.security.util.DerInputStream;
@@ -41,7 +40,7 @@ public class ExtensionsRequested implements CertAttrSet {
     private String kue_digital_signature = "false";
     private String kue_key_encipherment = "false";
 
-    private Vector exts = new Vector();
+    private Vector<Extension> exts = new Vector<Extension>();
 
     public ExtensionsRequested(Object stuff) throws IOException {
         ByteArrayInputStream is = new ByteArrayInputStream((byte[]) stuff);
@@ -85,8 +84,8 @@ public class ExtensionsRequested implements CertAttrSet {
             throws CertificateException, IOException {
     }
 
-    public Enumeration getElements() {
-        return (new Hashtable()).elements();
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
     public String getName() {
@@ -171,7 +170,7 @@ public class ExtensionsRequested implements CertAttrSet {
 
     }
 
-    public Vector getExtensions() {
+    public Vector<Extension> getExtensions() {
         return exts;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
index 25f0626574a243724845a737c407d3e6da18f9c9..aa95b622d9114bb42fa6b17648c55132d6f3ec9e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMCOutputTemplate.java
@@ -778,12 +778,14 @@ public class CMCOutputTemplate {
                                 SignedData msgData =
                                         (SignedData) msgValue.decodeWith(SignedData.getTemplate());
                                 if (!verifyRevRequestSignature(msgData)) {
-                                    OtherInfo otherInfo = new OtherInfo(OtherInfo.FAIL, new INTEGER(
-                                            OtherInfo.BAD_MESSAGE_CHECK), null);
+                                    OtherInfo otherInfo =
+                                            new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.BAD_MESSAGE_CHECK),
+                                                    null);
                                     SEQUENCE failed_bpids = new SEQUENCE();
                                     failed_bpids.addElement(attrbpid);
-                                    cmcStatusInfo = new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids,
-                                            (String) null, otherInfo);
+                                    cmcStatusInfo =
+                                            new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null,
+                                                    otherInfo);
                                     tagattr = new TaggedAttribute(
                                             new INTEGER(bpid++),
                                             OBJECT_IDENTIFIER.id_cmc_cMCStatusInfo, cmcStatusInfo);
@@ -825,8 +827,8 @@ public class CMCOutputTemplate {
 
                     if (!sharedSecretFound) {
                         CMS.debug("CMCOutputTemplate: class for shared secret was not found.");
-                        OtherInfo otherInfo = new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.INTERNAL_CA_ERROR),
-                                null);
+                        OtherInfo otherInfo =
+                                new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.INTERNAL_CA_ERROR), null);
                         SEQUENCE failed_bpids = new SEQUENCE();
                         failed_bpids.addElement(attrbpid);
                         cmcStatusInfo = new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null, otherInfo);
@@ -845,8 +847,8 @@ public class CMCOutputTemplate {
 
                     if (sharedSecret == null) {
                         CMS.debug("CMCOutputTemplate: class for shared secret was not found.");
-                        OtherInfo otherInfo = new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.INTERNAL_CA_ERROR),
-                                null);
+                        OtherInfo otherInfo =
+                                new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.INTERNAL_CA_ERROR), null);
                         SEQUENCE failed_bpids = new SEQUENCE();
                         failed_bpids.addElement(attrbpid);
                         cmcStatusInfo = new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null, otherInfo);
@@ -864,8 +866,8 @@ public class CMCOutputTemplate {
                         revoke = true;
                     } else {
                         CMS.debug("CMCOutputTemplate: Both client and server shared secret are not the same, cant revoke certificate.");
-                        OtherInfo otherInfo = new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.BAD_MESSAGE_CHECK),
-                                null);
+                        OtherInfo otherInfo =
+                                new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.BAD_MESSAGE_CHECK), null);
                         SEQUENCE failed_bpids = new SEQUENCE();
                         failed_bpids.addElement(attrbpid);
                         cmcStatusInfo = new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null, otherInfo);
@@ -929,8 +931,8 @@ public class CMCOutputTemplate {
                         entryExtn.set(crlReasonExtn.getName(), crlReasonExtn);
                     }
 
-                    RevokedCertImpl revCertImpl = new RevokedCertImpl(impl.getSerialNumber(), CMS.getCurrentDate(),
-                            entryExtn);
+                    RevokedCertImpl revCertImpl =
+                            new RevokedCertImpl(impl.getSerialNumber(), CMS.getCurrentDate(), entryExtn);
                     RevokedCertImpl[] revCertImpls = new RevokedCertImpl[1];
                     revCertImpls[0] = revCertImpl;
                     IRequestQueue queue = ca.getRequestQueue();
@@ -950,12 +952,12 @@ public class CMCOutputTemplate {
                         if (result.equals(IRequest.RES_ERROR)) {
                             CMS.debug("CMCOutputTemplate: revReq exception: " +
                                     revReq.getExtDataInString(IRequest.ERROR));
-                            OtherInfo otherInfo = new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.BAD_REQUEST),
-                                    null);
+                            OtherInfo otherInfo =
+                                    new OtherInfo(OtherInfo.FAIL, new INTEGER(OtherInfo.BAD_REQUEST), null);
                             SEQUENCE failed_bpids = new SEQUENCE();
                             failed_bpids.addElement(attrbpid);
-                            cmcStatusInfo = new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null,
-                                    otherInfo);
+                            cmcStatusInfo =
+                                    new CMCStatusInfo(CMCStatusInfo.FAILED, failed_bpids, (String) null, otherInfo);
                             tagattr = new TaggedAttribute(
                                     new INTEGER(bpid++),
                                     OBJECT_IDENTIFIER.id_cmc_cMCStatusInfo, cmcStatusInfo);
@@ -1039,7 +1041,7 @@ public class CMCOutputTemplate {
 
             SET dias = msgData.getDigestAlgorithmIdentifiers();
             int numDig = dias.size();
-            Hashtable digs = new Hashtable();
+            Hashtable<String, byte[]> digs = new Hashtable<String, byte[]>();
             for (int i = 0; i < numDig; i++) {
                 AlgorithmIdentifier dai =
                         (AlgorithmIdentifier) dias.elementAt(i);
@@ -1057,7 +1059,7 @@ public class CMCOutputTemplate {
                 org.mozilla.jss.pkix.cms.SignerInfo si =
                         (org.mozilla.jss.pkix.cms.SignerInfo) sis.elementAt(i);
                 String name = si.getDigestAlgorithm().toString();
-                byte[] digest = (byte[]) digs.get(name);
+                byte[] digest = digs.get(name);
                 if (digest == null) {
                     MessageDigest md = MessageDigest.getInstance(name);
                     ByteArrayOutputStream ostream = new ByteArrayOutputStream();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java b/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
index ca7759d5af175355f016991dc91fb1a556c6f04b..b2c43b3f7cdc6414ab9b1c57a2b605640a437ebc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/connector/ConnectorServlet.java
@@ -833,10 +833,10 @@ public class ConnectorServlet extends CMSServlet {
                         int reason = 0;
 
                         if (crlExts != null) {
-                            Enumeration enum1 = crlExts.getElements();
+                            Enumeration<Extension> enum1 = crlExts.getElements();
 
                             while (enum1.hasMoreElements()) {
-                                Extension ext = (Extension) enum1.nextElement();
+                                Extension ext = enum1.nextElement();
 
                                 if (ext instanceof CRLReasonExtension) {
                                     reason = ((CRLReasonExtension) ext).getReason().toInt();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminAuthenticatePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminAuthenticatePanel.java
index 16c5e6c65b3a08fdf94e79bf6cfde00656fcb671..8c84f4a218c4e543cd9ba5a144975f8965da11dd 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminAuthenticatePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminAuthenticatePanel.java
@@ -249,12 +249,13 @@ public class AdminAuthenticatePanel extends WizardPanelBase {
                 c1.append(",preop.ca.hostname,preop.ca.httpport,preop.ca.httpsport,preop.ca.list,preop.ca.pkcs7,preop.ca.type");
             }
 
-            String content = "uid="
-                    + uid
-                    + "&pwd="
-                    + pwd
-                    + "&op=get&names=cloning.module.token,instanceId,internaldb.basedn,internaldb.ldapauth.password,internaldb.replication.password,internaldb.ldapconn.host,internaldb.ldapconn.port,internaldb.ldapauth.bindDN"
-                    + c1.toString() + "&substores=" + s1.toString();
+            String content =
+                    "uid="
+                            + uid
+                            + "&pwd="
+                            + pwd
+                            + "&op=get&names=cloning.module.token,instanceId,internaldb.basedn,internaldb.ldapauth.password,internaldb.replication.password,internaldb.ldapconn.host,internaldb.ldapconn.port,internaldb.ldapauth.bindDN"
+                            + c1.toString() + "&substores=" + s1.toString();
 
             boolean success = updateConfigEntries(host, httpsport, true,
                     "/" + cstype + "/admin/" + cstype + "/getConfigEntries", content, config,
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminPanel.java
index d8d841e39083a26eb0f93f135d0b4f7b396c72e2..223801d8f7a75095a037717ee2d6a7a1e46e409a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AdminPanel.java
@@ -481,8 +481,10 @@ public class AdminPanel extends WizardPanelBase {
         String session_id = CMS.getConfigSDSessionId();
         String subjectDN = HttpInput.getString(request, "subject");
 
-        String content = "profileId=" + profileId + "&cert_request_type=" + cert_request_type + "&cert_request="
-                + cert_request + "&xmlOutput=true&sessionID=" + session_id + "&subject=" + subjectDN;
+        String content =
+                "profileId="
+                        + profileId + "&cert_request_type=" + cert_request_type + "&cert_request=" + cert_request
+                        + "&xmlOutput=true&sessionID=" + session_id + "&subject=" + subjectDN;
 
         HttpClient httpclient = new HttpClient();
         String c = null;
@@ -651,7 +653,8 @@ public class AdminPanel extends WizardPanelBase {
         } catch (Exception e) {
         }
         if (ca == null && type.equals("otherca")) {
-            info = "Since you do not join the Redhat CA network, the administrator's certificate will not be generated automatically.";
+            info =
+                    "Since you do not join the Redhat CA network, the administrator's certificate will not be generated automatically.";
         }
         context.put("info", info);
         context.put("admin_email", request.getParameter("email"));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
index f73e44c18afec5f3aae5d577677866663712b883..c81c666e6f37c096bc1df8c072d5f575c4734a44 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertRequestPanel.java
@@ -128,8 +128,8 @@ public class CertRequestPanel extends WizardPanelBase {
                 if (hardware) {
                     CMS.debug("CertRequestPanel findCertificate: The certificate with the same nickname: "
                             + fullnickname + " has been found on HSM. Please remove it before proceeding.");
-                    throw new IOException("The certificate with the same nickname: " + fullnickname
-                            + " has been found on HSM. Please remove it before proceeding.");
+                    throw new IOException("The certificate with the same nickname: "
+                            + fullnickname + " has been found on HSM. Please remove it before proceeding.");
                 }
                 return true;
             }
@@ -212,8 +212,8 @@ public class CertRequestPanel extends WizardPanelBase {
                     CMS.debug("CertRequestPanel cleanup: deleting certificate (" + nickname + ").");
                     deleteCert(tokenname, nickname);
                 } catch (Exception e) {
-                    CMS.debug("CertRequestPanel cleanup: failed to delete certificate (" + nickname + "). Exception: "
-                            + e.toString());
+                    CMS.debug("CertRequestPanel cleanup: failed to delete certificate ("
+                            + nickname + "). Exception: " + e.toString());
                 }
             }
         }
@@ -735,8 +735,8 @@ public class CertRequestPanel extends WizardPanelBase {
                     ic.setSSLTrust(InternalCertificate.USER);
                     ic.setEmailTrust(InternalCertificate.USER);
                     if (tag.equals("audit_signing")) {
-                        ic.setObjectSigningTrust(InternalCertificate.USER | InternalCertificate.VALID_PEER
-                                | InternalCertificate.TRUSTED_PEER);
+                        ic.setObjectSigningTrust(InternalCertificate.USER
+                                | InternalCertificate.VALID_PEER | InternalCertificate.TRUSTED_PEER);
                     } else {
                         ic.setObjectSigningTrust(InternalCertificate.USER);
                     }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
index 5e1bd5e809a46d1138b2b09abbcf21511a5da8d9..2934b3ebe3cf3d1961f81bc1f894e6d1b54325c9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
@@ -643,8 +643,8 @@ public class CertUtil {
         try {
             privKey = cm.findPrivKeyByCert(cert);
         } catch (Exception e) {
-            CMS.debug("CertUtil privateKeyExistsOnToken: cant find private key (" + fullnickname + ") exception: "
-                    + e.toString());
+            CMS.debug("CertUtil privateKeyExistsOnToken: cant find private key ("
+                    + fullnickname + ") exception: " + e.toString());
             return false;
         }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index bd3a31770bd22851c33833baa54aaf716d3e704d..02a99283273462e2bea248d23e97e4526f82f5db 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -1035,8 +1035,8 @@ public class DatabasePanel extends WizardPanelBase {
         // setup replication after indexes have been created
         if (select.equals("clone")) {
             CMS.debug("Start setting up replication.");
-            setupReplication(request, context, (secure.equals("on") ? "true" : "false"),
-                    (cloneStartTLS.equals("on") ? "true" : "false"));
+            setupReplication(request, context, (secure.equals("on") ? "true" : "false"), (cloneStartTLS.equals("on")
+                    ? "true" : "false"));
             CMS.debug("Finish setting up replication.");
 
             try {
@@ -1318,8 +1318,8 @@ public class DatabasePanel extends WizardPanelBase {
                 }
                 return id;
             } else {
-                CMS.debug("DatabasePanel enableReplication: Failed to create " + replicadn + " entry. Exception: "
-                        + e.toString());
+                CMS.debug("DatabasePanel enableReplication: Failed to create "
+                        + replicadn + " entry. Exception: " + e.toString());
                 return id;
             }
         }
@@ -1378,8 +1378,8 @@ public class DatabasePanel extends WizardPanelBase {
                     throw ee;
                 }
             } else {
-                CMS.debug("DatabasePanel createReplicationAgreement: Failed to create " + dn + " entry. Exception: "
-                        + e.toString());
+                CMS.debug("DatabasePanel createReplicationAgreement: Failed to create "
+                        + dn + " entry. Exception: " + e.toString());
                 throw e;
             }
         }
@@ -1391,8 +1391,8 @@ public class DatabasePanel extends WizardPanelBase {
             String name) {
         String dn = "cn=" + name + "," + replicadn;
         CMS.debug("DatabasePanel initializeConsumer: initializeConsumer dn: " + dn);
-        CMS.debug("DatabasePanel initializeConsumer: initializeConsumer host: " + conn.getHost() + " port: "
-                + conn.getPort());
+        CMS.debug("DatabasePanel initializeConsumer: initializeConsumer host: "
+                + conn.getHost() + " port: " + conn.getPort());
         try {
             LDAPAttribute attr = new LDAPAttribute("nsds5beginreplicarefresh",
                     "start");
@@ -1487,9 +1487,9 @@ public class DatabasePanel extends WizardPanelBase {
         try {
             String filter = "(objectclass=*)";
             String[] attrs = { "nsslapd-directory" };
-            LDAPSearchResults results = conn.search("cn=config,cn=ldbm database,cn=plugins,cn=config",
-                    LDAPv3.SCOPE_SUB,
-                    filter, attrs, false);
+            LDAPSearchResults results =
+                    conn.search("cn=config,cn=ldbm database,cn=plugins,cn=config", LDAPv3.SCOPE_SUB,
+                            filter, attrs, false);
 
             while (results.hasMoreElements()) {
                 LDAPEntry entry = results.next();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DisplayCertChainPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DisplayCertChainPanel.java
index c24992cb45c99b1d4fbbad0da95369c7979abb57..2f58317946fefa4e87b6cf5248d1788cce0f35be 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DisplayCertChainPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DisplayCertChainPanel.java
@@ -195,11 +195,14 @@ public class DisplayCertChainPanel extends WizardPanelBase {
                 String cs_hostname = cs.getString("machineName", "");
                 int cs_port = cs.getInteger("pkicreate.admin_secure_port", -1);
                 String subsystem = cs.getString("cs.type", "");
-                String urlVal = "https://" + cs_hostname + ":" + cs_port + "/" + toLowerCaseSubsystemType(subsystem)
-                        + "/admin/console/config/wizard?p=" + panel + "&subsystem=" + subsystem;
+                String urlVal =
+                        "https://"
+                                + cs_hostname + ":" + cs_port + "/" + toLowerCaseSubsystemType(subsystem)
+                                + "/admin/console/config/wizard?p=" + panel + "&subsystem=" + subsystem;
                 String encodedValue = URLEncoder.encode(urlVal, "UTF-8");
-                String sdurl = "https://" + sd_hostname + ":" + sd_port + "/ca/admin/ca/securityDomainLogin?url="
-                        + encodedValue;
+                String sdurl =
+                        "https://"
+                                + sd_hostname + ":" + sd_port + "/ca/admin/ca/securityDomainLogin?url=" + encodedValue;
                 response.sendRedirect(sdurl);
 
                 // The user previously specified the CA Security Domain's
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
index 388570531881e99ff899b52306eada72953d1bba..ffadf58842bb97b3f7d25d4e3582a7d421d945a0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
@@ -495,14 +495,14 @@ public class DonePanel extends WizardPanelBase {
                     } else {
                         serialdn = "ou=keyRepository,ou=" + type.toLowerCase() + "," + basedn;
                     }
-                    LDAPAttribute attrSerialNextRange = new LDAPAttribute("nextRange", endSerialNum.add(oneNum)
-                            .toString());
+                    LDAPAttribute attrSerialNextRange =
+                            new LDAPAttribute("nextRange", endSerialNum.add(oneNum).toString());
                     LDAPModification serialmod = new LDAPModification(LDAPModification.REPLACE, attrSerialNextRange);
                     conn.modify(serialdn, serialmod);
 
                     String requestdn = "ou=" + type.toLowerCase() + ",ou=requests," + basedn;
-                    LDAPAttribute attrRequestNextRange = new LDAPAttribute("nextRange", endRequestNum.add(oneNum)
-                            .toString());
+                    LDAPAttribute attrRequestNextRange =
+                            new LDAPAttribute("nextRange", endRequestNum.add(oneNum).toString());
                     LDAPModification requestmod = new LDAPModification(LDAPModification.REPLACE, attrRequestNextRange);
                     conn.modify(requestdn, requestmod);
 
@@ -777,12 +777,15 @@ public class DonePanel extends WizardPanelBase {
         } else {
             CMS.debug("DonePanel: Transport certificate is being setup in " + url);
             String session_id = CMS.getConfigSDSessionId();
-            String content = "ca.connector.KRA.enable=true&ca.connector.KRA.local=false&ca.connector.KRA.timeout=30&ca.connector.KRA.uri=/kra/agent/kra/connector&ca.connector.KRA.host="
-                    + ownagenthost
-                    + "&ca.connector.KRA.port="
-                    + ownagentsport
-                    + "&ca.connector.KRA.transportCert="
-                    + URLEncoder.encode(transportCert) + "&sessionID=" + session_id;
+            String content =
+                    "ca.connector.KRA.enable=true&ca.connector.KRA.local=false&ca.connector.KRA.timeout=30&ca.connector.KRA.uri=/kra/agent/kra/connector&ca.connector.KRA.host="
+                            + ownagenthost
+                            + "&ca.connector.KRA.port="
+                            + ownagentsport
+                            + "&ca.connector.KRA.transportCert="
+                            + URLEncoder.encode(transportCert)
+                            + "&sessionID="
+                            + session_id;
 
             updateConnectorInfo(host, port, true, content);
         }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
index 4f6df0f0b810ef8f422c44ace7b92a47cbef9164..9e0ca6f381d47efa33d72a066d60f490707964d4 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/NamePanel.java
@@ -491,9 +491,11 @@ public class NamePanel extends WizardPanelBase {
                 String machineName = config.getString("machineName", "");
                 String securePort = config.getString("service.securePort", "");
                 if (certTag.equals("subsystem")) {
-                    String content = "requestor_name=" + sysType + "-" + machineName + "-" + securePort + "&profileId="
-                            + profileId + "&cert_request_type=pkcs10&cert_request="
-                            + URLEncoder.encode(pkcs10, "UTF-8") + "&xmlOutput=true&sessionID=" + session_id;
+                    String content =
+                            "requestor_name="
+                                    + sysType + "-" + machineName + "-" + securePort + "&profileId=" + profileId
+                                    + "&cert_request_type=pkcs10&cert_request=" + URLEncoder.encode(pkcs10, "UTF-8")
+                                    + "&xmlOutput=true&sessionID=" + session_id;
                     cert = CertUtil.createRemoteCert(sd_hostname, sd_ee_port,
                             content, response, this);
                     if (cert == null) {
@@ -508,9 +510,11 @@ public class NamePanel extends WizardPanelBase {
                     } catch (Exception ee) {
                     }
 
-                    String content = "requestor_name=" + sysType + "-" + machineName + "-" + securePort + "&profileId="
-                            + profileId + "&cert_request_type=pkcs10&cert_request="
-                            + URLEncoder.encode(pkcs10, "UTF-8") + "&xmlOutput=true&sessionID=" + session_id;
+                    String content =
+                            "requestor_name="
+                                    + sysType + "-" + machineName + "-" + securePort + "&profileId=" + profileId
+                                    + "&cert_request_type=pkcs10&cert_request=" + URLEncoder.encode(pkcs10, "UTF-8")
+                                    + "&xmlOutput=true&sessionID=" + session_id;
                     cert = CertUtil.createRemoteCert(ca_hostname, ca_port,
                             content, response, this);
                     if (cert == null) {
@@ -651,8 +655,8 @@ public class NamePanel extends WizardPanelBase {
                         config.commit(false);
                     }
                 } catch (Exception e) {
-                    CMS.debug("NamePanel: configCertWithTag: Exception in setting nickname for " + ct + ": "
-                            + e.toString());
+                    CMS.debug("NamePanel: configCertWithTag: Exception in setting nickname for "
+                            + ct + ": " + e.toString());
                 }
 
                 configCert(request, response, context, cert);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
index dde150485bcd280bdf1982c1aeb08802882bdb6d..0ae5507070790e439dbeb97d4a4f6895e1eb9fbb 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
@@ -456,8 +456,13 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                     s1.append("ca.connector.KRA");
                 }
 
-                content = "op=get&names=cloning.token,instanceId,internaldb.basedn,internaldb.ldapauth.password,internaldb.replication.password,internaldb.ldapconn.host,internaldb.ldapconn.port,internaldb.ldapauth.bindDN"
-                        + c1.toString() + "&substores=" + s1.toString() + "&xmlOutput=true&sessionID=" + session_id;
+                content =
+                        "op=get&names=cloning.token,instanceId,internaldb.basedn,internaldb.ldapauth.password,internaldb.replication.password,internaldb.ldapconn.host,internaldb.ldapconn.port,internaldb.ldapauth.bindDN"
+                                + c1.toString()
+                                + "&substores="
+                                + s1.toString()
+                                + "&xmlOutput=true&sessionID="
+                                + session_id;
                 boolean success = updateConfigEntries(master_hostname, master_port, true,
                         "/" + cstype + "/admin/" + cstype + "/getConfigEntries", content, config, response);
                 if (!success) {
@@ -562,8 +567,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
 
                 KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.DES3_CBC_PAD);
                 wrapper.initUnwrap(sk, param);
-                org.mozilla.jss.crypto.PrivateKey pp = wrapper.unwrapPrivate(encpkey, getPrivateKeyType(publickey),
-                        publickey);
+                org.mozilla.jss.crypto.PrivateKey pp =
+                        wrapper.unwrapPrivate(encpkey, getPrivateKeyType(publickey), publickey);
 
             } catch (Exception e) {
                 CMS.debug("RestoreKeyCertPanel importkeycert: Exception=" + e.toString());
@@ -604,8 +609,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                                 | InternalCertificate.VALID_CA);
                     } else if (name.startsWith("auditSigningCert")) {
                         InternalCertificate icert = (InternalCertificate) xcert;
-                        icert.setObjectSigningTrust(InternalCertificate.USER | InternalCertificate.VALID_PEER
-                                | InternalCertificate.TRUSTED_PEER);
+                        icert.setObjectSigningTrust(InternalCertificate.USER
+                                | InternalCertificate.VALID_PEER | InternalCertificate.TRUSTED_PEER);
                     }
                 } else
                     cm.importCACertPackage(cert);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
index c4329bda23766e16f5f1e60564165dda0f0f365e..fcb88c917b90ffbc3cda3b1dd39f106a33e23001 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
@@ -70,11 +70,12 @@ public class SizePanel extends WizardPanelBase {
     public PropertySet getUsage() {
         PropertySet set = new PropertySet();
 
-        Descriptor choiceDesc = new Descriptor(
-                IDescriptor.CHOICE,
-                "default,custom",
-                null, /* no default parameter */
-                "If 'default', the key size will be configured automatically. If 'custom', the key size will be set to the value of the parameter 'custom_size'.");
+        Descriptor choiceDesc =
+                new Descriptor(
+                        IDescriptor.CHOICE,
+                        "default,custom",
+                        null, /* no default parameter */
+                        "If 'default', the key size will be configured automatically. If 'custom', the key size will be set to the value of the parameter 'custom_size'.");
 
         set.add("choice", choiceDesc);
 
@@ -625,8 +626,9 @@ public class SizePanel extends WizardPanelBase {
             s = config.getString("preop.ecc.algorithm.list", "SHA256withEC,SHA1withEC,SHA384withEC,SHA512withEC");
             context.put("ecclist", s);
 
-            s = config.getString("preop.rsa.algorithm.list",
-                    "SHA256withRSA,SHA1withRSA,SHA512withRSA,MD5withRSA,MD2withRSA");
+            s =
+                    config.getString("preop.rsa.algorithm.list",
+                            "SHA256withRSA,SHA1withRSA,SHA512withRSA,MD5withRSA,MD2withRSA");
             context.put("rsalist", s);
 
             s = config.getString("keys.ecc.curve.list", "nistp256");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
index 7b381383bdd5cce43f9a0e70a26b1c727d99c9c4..93893bff115f177344d01b40d9e732625fae9110 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
@@ -1630,8 +1630,10 @@ public class WizardPanelBase implements IWizardPanel {
             int cs_port = cs.getInteger("pkicreate.admin_secure_port", -1);
             int panel = getPanelNo();
             String subsystem = cs.getString("cs.type", "");
-            String urlVal = "https://" + cs_hostname + ":" + cs_port + "/" + toLowerCaseSubsystemType(subsystem)
-                    + "/admin/console/config/wizard?p=" + panel + "&subsystem=" + subsystem;
+            String urlVal =
+                    "https://"
+                            + cs_hostname + ":" + cs_port + "/" + toLowerCaseSubsystemType(subsystem)
+                            + "/admin/console/config/wizard?p=" + panel + "&subsystem=" + subsystem;
             String encodedValue = URLEncoder.encode(urlVal, "UTF-8");
             String sdurl = "https://" + hostname + ":" + port + "/ca/admin/ca/securityDomainLogin?url=" + encodedValue;
             response.sendRedirect(sdurl);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
index 5ccb87125af25e76a87baaf75c2701a9182d529c..8d2c5a28b476d2dc9a76f590b3a533a281232073 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
@@ -192,8 +192,8 @@ public class CheckCertServlet extends CMSServlet {
         } catch (Exception e) {
             header.addStringValue(ATTR_STATUS, STATUS_UNKNOWN);
         }
-        log(ILogger.EV_AUDIT, AuditFormat.LEVEL, "Checked Certificate Status " + cert.getIssuerDN().getName() + " "
-                + cert.getSerialNumber().toString());
+        log(ILogger.EV_AUDIT, AuditFormat.LEVEL, "Checked Certificate Status "
+                + cert.getIssuerDN().getName() + " " + cert.getSerialNumber().toString());
 
         try {
             ServletOutputStream out = resp.getOutputStream();
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 6b9d209448c5397ff3b1d6608bd6bc018bcfdb4f..83eaca45f33784471a218334502dbc0e8cb6f063 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,7 +128,7 @@ public class ListCAServlet extends CMSServlet {
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
         IDefStore defStore = mOCSPAuthority.getDefaultStore();
-        Enumeration recs = defStore.searchAllCRLIssuingPointRecord(100);
+        Enumeration<Object> recs = defStore.searchAllCRLIssuingPointRecord(100);
 
         // show the current CRL number if present
         header.addStringValue("stateCount",
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 81d34a65d3cc68a35dfb85a847195c9cbd9e1366..51655f973c4b3d1885ea2547cd7069c7d275ac91 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
@@ -305,8 +305,9 @@ public class CMCProcessor extends PKIProcessor {
                     PublicKey signKey = null;
 
                     while (signKey == null && j < numReqs) {
-                        X509Key subjectKeyInfo = (X509Key) ((CertificateX509Key) certInfoArray[j].get(X509CertInfo.KEY))
-                                .get(CertificateX509Key.KEY);
+                        X509Key subjectKeyInfo =
+                                (X509Key) ((CertificateX509Key) certInfoArray[j].get(X509CertInfo.KEY))
+                                        .get(CertificateX509Key.KEY);
                         MessageDigest md = MessageDigest.getInstance("SHA-1");
 
                         md.update(subjectKeyInfo.getEncoded());
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 094ea263c36a6395ce5af5a1a1505eadc240deed..641017cc887d4e7e681c99792e2e0aee864a1201 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
@@ -196,8 +196,8 @@ public class CRMFProcessor extends PKIProcessor {
             // field suggested notBefore and notAfter in CRMF
             // Tech Support #383184
             if (certTemplate.getNotBefore() != null || certTemplate.getNotAfter() != null) {
-                CertificateValidity certValidity = new CertificateValidity(certTemplate.getNotBefore(),
-                        certTemplate.getNotAfter());
+                CertificateValidity certValidity =
+                        new CertificateValidity(certTemplate.getNotBefore(), certTemplate.getNotAfter());
 
                 certInfo.set(X509CertInfo.VALIDITY, certValidity);
             }
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 b90dc97b7db24dcf2e562a8388b9b1f8cb1a2960..4a7d70cc0f574125b735f7d0a7aa5edfbeaf6a05 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
@@ -130,13 +130,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
     private void setInputsIntoContext(HttpServletRequest request, IProfile profile, IProfileContext ctx) {
         // passing inputs into context
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -161,13 +161,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
      */
     private void setInputsIntoContext(IRequest request, IProfile profile, IProfileContext ctx, Locale locale) {
         // passing inputs into context
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -193,7 +193,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
     private void setCredentialsIntoContext(HttpServletRequest request, IProfileAuthenticator authenticator,
             IProfileContext ctx) {
-        Enumeration authIds = authenticator.getValueNames();
+        Enumeration<String> authIds = authenticator.getValueNames();
 
         if (authIds != null) {
             CMS.debug("ProfileSubmitServlet:setCredentialsIntoContext() authNames not null");
@@ -303,7 +303,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
         AuthCredentials credentials = new AuthCredentials();
 
         // build credential
-        Enumeration authNames = authenticator.getValueNames();
+        Enumeration<String> authNames = authenticator.getValueNames();
 
         if (authNames != null) {
             while (authNames.hasMoreElements()) {
@@ -329,13 +329,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
     }
 
     private void setInputsIntoRequest(HttpServletRequest request, IProfile profile, IRequest req) {
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 if (inputNames != null) {
                     while (inputNames.hasMoreElements()) {
@@ -363,13 +363,13 @@ public class ProfileSubmitServlet extends ProfileServlet {
      */
     private void setInputsIntoRequest(IRequest request, IProfile profile, IRequest req, Locale locale) {
         // passing inputs into request
-        Enumeration inputIds = profile.getProfileInputIds();
+        Enumeration<String> inputIds = profile.getProfileInputIds();
 
         if (inputIds != null) {
             while (inputIds.hasMoreElements()) {
                 String inputId = (String) inputIds.nextElement();
                 IProfileInput profileInput = profile.getProfileInput(inputId);
-                Enumeration inputNames = profileInput.getValueNames();
+                Enumeration<String> inputNames = profileInput.getValueNames();
 
                 while (inputNames.hasMoreElements()) {
                     String inputName = (String) inputNames.nextElement();
@@ -394,14 +394,14 @@ public class ProfileSubmitServlet extends ProfileServlet {
     }
 
     private void setOutputIntoArgs(IProfile profile, ArgList outputlist, Locale locale, IRequest req) {
-        Enumeration outputIds = profile.getProfileOutputIds();
+        Enumeration<String> outputIds = profile.getProfileOutputIds();
 
         if (outputIds != null) {
             while (outputIds.hasMoreElements()) {
                 String outputId = (String) outputIds.nextElement();
                 IProfileOutput profileOutput = profile.getProfileOutput(outputId);
 
-                Enumeration outputNames = profileOutput.getValueNames();
+                Enumeration<String> outputNames = profileOutput.getValueNames();
 
                 if (outputNames != null) {
                     while (outputNames.hasMoreElements()) {
@@ -483,10 +483,11 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
         if (CMS.debugOn()) {
             CMS.debug("Start of ProfileSubmitServlet Input Parameters");
-            Enumeration paramNames = request.getParameterNames();
+            @SuppressWarnings("unchecked")
+            Enumeration<String> paramNames = request.getParameterNames();
 
             while (paramNames.hasMoreElements()) {
-                String paramName = (String) paramNames.nextElement();
+                String paramName = paramNames.nextElement();
                 // added this facility so that password can be hidden,
                 // all sensitive parameters should be prefixed with 
                 // __ (double underscores); however, in the event that
@@ -749,7 +750,7 @@ public class ProfileSubmitServlet extends ProfileServlet {
                             if (origReq != null) {
                                 CMS.debug("ProfileSubmitServlet: renewal: found original enrollment request id:" + rid);
                                 // debug: print the extData keys
-                                Enumeration en = origReq.getExtDataKeys();
+                                Enumeration<String> en = origReq.getExtDataKeys();
                                 /*
                                                                 CMS.debug("ProfileSubmitServlet: renewal: origRequest extdata key print BEGINS");
                                                                 while (en.hasMoreElements()) {
@@ -973,11 +974,11 @@ public class ProfileSubmitServlet extends ProfileServlet {
             CMS.debug("ProfileSubmitServlet: authentication required.");
             String uid_cred = "Unidentified";
             String uid_attempted_cred = "Unidentified";
-            Enumeration authIds = authenticator.getValueNames();
+            Enumeration<String> authIds = authenticator.getValueNames();
             //Attempt to possibly fetch attemped uid, may not always be available.
             if (authIds != null) {
                 while (authIds.hasMoreElements()) {
-                    String authName = (String) authIds.nextElement();
+                    String authName = authIds.nextElement();
                     String value = request.getParameter(authName);
                     if (value != null) {
                         if (authName.equals("uid")) {
@@ -1156,9 +1157,9 @@ public class ProfileSubmitServlet extends ProfileServlet {
 
             // serial auth token into request
             if (authToken != null) {
-                Enumeration tokenNames = authToken.getElements();
+                Enumeration<String> tokenNames = authToken.getElements();
                 while (tokenNames.hasMoreElements()) {
-                    String tokenName = (String) tokenNames.nextElement();
+                    String tokenName = tokenNames.nextElement();
                     String[] tokenVals = authToken.getInStringArray(tokenName);
                     if (tokenVals != null) {
                         for (int i = 0; i < tokenVals.length; i++) {
@@ -1286,9 +1287,9 @@ public class ProfileSubmitServlet extends ProfileServlet {
                     // print request debug
                     if (reqs[k] != null) {
                         requestIds += "  " + reqs[k].getRequestId().toString();
-                        Enumeration reqKeys = reqs[k].getExtDataKeys();
+                        Enumeration<String> reqKeys = reqs[k].getExtDataKeys();
                         while (reqKeys.hasMoreElements()) {
-                            String reqKey = (String) reqKeys.nextElement();
+                            String reqKey = reqKeys.nextElement();
                             String reqVal = reqs[k].getExtDataInString(reqKey);
                             if (reqVal != null) {
                                 CMS.debug("ProfileSubmitServlet: key=$request." + reqKey + "$ value=" + reqVal);
@@ -1491,15 +1492,15 @@ public class ProfileSubmitServlet extends ProfileServlet {
                 } else {
                     CMS.debug("ProfileSubmitServlet xmlOutput: no certInfo found in request");
                 }
-                Enumeration outputIds = profile.getProfileOutputIds();
+                Enumeration<String> outputIds = profile.getProfileOutputIds();
                 if (outputIds != null) {
                     while (outputIds.hasMoreElements()) {
-                        String outputId = (String) outputIds.nextElement();
+                        String outputId = outputIds.nextElement();
                         IProfileOutput profileOutput = profile.getProfileOutput(outputId);
-                        Enumeration outputNames = profileOutput.getValueNames();
+                        Enumeration<String> outputNames = profileOutput.getValueNames();
                         if (outputNames != null) {
                             while (outputNames.hasMoreElements()) {
-                                String outputName = (String) outputNames.nextElement();
+                                String outputName = outputNames.nextElement();
                                 if (!outputName.equals("b64_cert") && !outputName.equals("pkcs7"))
                                     continue;
                                 try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
index 7fc353a0f0b711204f962c8444e937b293c69e3f..d8fc68a69a4d7a10326452eb7d352b96f109ee5e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java
@@ -127,7 +127,7 @@ public class CertReqParser extends ReqParser {
         arg.addStringValue("certExtsEnabled", "yes");
 
         int saCounter = 0;
-        Enumeration enum1 = req.getExtDataKeys();
+        Enumeration<String> enum1 = req.getExtDataKeys();
 
         // gross hack
         String prefix = "record.";
@@ -136,14 +136,14 @@ public class CertReqParser extends ReqParser {
             prefix = "header.";
 
         while (enum1.hasMoreElements()) {
-            String name = (String) enum1.nextElement();
+            String name = enum1.nextElement();
 
             if (mDetails) {
                 // show all http parameters stored in request.
                 if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) {
-                    Hashtable http_params = req.getExtDataInHashtable(name);
+                    Hashtable<String, String> http_params = req.getExtDataInHashtable(name);
                     // show certType specially 
-                    String certType = (String) http_params.get(IRequest.CERT_TYPE);
+                    String certType = http_params.get(IRequest.CERT_TYPE);
 
                     if (certType != null) {
                         arg.addStringValue(IRequest.CERT_TYPE, certType);
@@ -155,13 +155,13 @@ public class CertReqParser extends ReqParser {
                     }
                     // show all http parameters in request
                     int counter = 0;
-                    Enumeration elms = http_params.keys();
+                    Enumeration<String> elms = http_params.keys();
 
                     while (elms.hasMoreElements()) {
                         String parami =
                                 IRequest.HTTP_PARAMS + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n = elms.nextElement();
                         String rawJS = "new Object;\n\r" +
                                 prefix + parami + ".name=\"" +
                                 CMSTemplate.escapeJavaScriptString(n) + "\";\n\r" +
@@ -173,15 +173,15 @@ public class CertReqParser extends ReqParser {
                     }
                 } // show all http headers stored in request.
                 else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) {
-                    Hashtable http_hdrs = req.getExtDataInHashtable(name);
-                    Enumeration elms = http_hdrs.keys();
+                    Hashtable<String, String> http_hdrs = req.getExtDataInHashtable(name);
+                    Enumeration<String> elms = http_hdrs.keys();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
                         String parami =
                                 IRequest.HTTP_HEADERS + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n = elms.nextElement();
                         String rawJS = "new Object;\n\r" +
                                 prefix + parami + ".name=\"" +
                                 CMSTemplate.escapeJavaScriptString(n) + "\";\n\r" +
@@ -194,14 +194,14 @@ public class CertReqParser extends ReqParser {
                 } // show all auth token stored in request.
                 else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) {
                     IAuthToken auth_token = req.getExtDataInAuthToken(name);
-                    Enumeration elms = auth_token.getElements();
+                    Enumeration<String> elms = auth_token.getElements();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
                         String parami =
                                 IRequest.AUTH_TOKEN + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n = elms.nextElement();
                         Object authTokenValue = auth_token.getInStringArray(n);
                         if (authTokenValue == null) {
                             authTokenValue = auth_token.getInString(n);
@@ -274,7 +274,7 @@ public class CertReqParser extends ReqParser {
             }
 
             if (name.equalsIgnoreCase(IRequest.ERRORS)) {
-                Vector errorStrings = req.getExtDataInStringVector(name);
+                Vector<String> errorStrings = req.getExtDataInStringVector(name);
                 if (errorStrings != null) {
                     StringBuffer errInfo = new StringBuffer();
 
@@ -346,10 +346,10 @@ public class CertReqParser extends ReqParser {
                         } catch (Exception e) {
                         }
                         if (extensions != null) {
-                            Enumeration exts = extensions.getElements();
+                            Enumeration<Extension> exts = extensions.getAttributes();
 
                             while (exts.hasMoreElements()) {
-                                Extension ext = (Extension) exts.nextElement();
+                                Extension ext = exts.nextElement();
 
                                 // only know about ns cert type
                                 if (ext instanceof NSCertTypeExtension) {
@@ -526,16 +526,16 @@ public class CertReqParser extends ReqParser {
                 }
             }
             if (name.equalsIgnoreCase(IRequest.FINGERPRINTS) && mDetails) {
-                Hashtable fingerprints =
+                Hashtable<String, String> fingerprints =
                         req.getExtDataInHashtable(IRequest.FINGERPRINTS);
 
                 if (fingerprints != null) {
                     String namesAndHashes = null;
-                    Enumeration enumFingerprints = fingerprints.keys();
+                    Enumeration<String> enumFingerprints = fingerprints.keys();
 
                     while (enumFingerprints.hasMoreElements()) {
-                        String hashname = (String) enumFingerprints.nextElement();
-                        String hashvalue = (String) fingerprints.get(hashname);
+                        String hashname = enumFingerprints.nextElement();
+                        String hashvalue = fingerprints.get(hashname);
                         byte[] fingerprint = CMS.AtoB(hashvalue);
                         String ppFingerprint = pp.toHexString(fingerprint, 0);
 
@@ -568,7 +568,8 @@ public class CertReqParser extends ReqParser {
                 int j = 0;
 
                 StringBuffer sb = new StringBuffer();
-                for (Enumeration n = ((Vector) v).elements(); n.hasMoreElements(); j++) {
+                for (@SuppressWarnings("unchecked")
+                Enumeration<String> n = ((Vector<String>) v).elements(); n.hasMoreElements(); j++) {
                     sb.append(";\n");
                     sb.append(valuename);
                     sb.append(LB);
@@ -678,7 +679,7 @@ public class CertReqParser extends ReqParser {
         }
 
         int saCounter = 0;
-        Enumeration enum1 = req.getExtDataKeys();
+        Enumeration<String> enum1 = req.getExtDataKeys();
 
         // gross hack
         String prefix = "record.";
@@ -692,16 +693,16 @@ public class CertReqParser extends ReqParser {
             if (mDetails) {
                 // show all http parameters stored in request.
                 if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) {
-                    Hashtable http_params = req.getExtDataInHashtable(name);
+                    Hashtable<String, String> http_params = req.getExtDataInHashtable(name);
                     // show certType specially 
-                    String certType = (String) http_params.get(IRequest.CERT_TYPE);
+                    String certType = http_params.get(IRequest.CERT_TYPE);
 
                     if (certType != null) {
                         arg.addStringValue(IRequest.CERT_TYPE, certType);
                     }
                     // show all http parameters in request
                     int counter = 0;
-                    Enumeration elms = http_params.keys();
+                    Enumeration<String> elms = http_params.keys();
 
                     while (elms.hasMoreElements()) {
                         String parami =
@@ -719,15 +720,15 @@ public class CertReqParser extends ReqParser {
                     }
                 } // show all http headers stored in request.
                 else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) {
-                    Hashtable http_hdrs = req.getExtDataInHashtable(name);
-                    Enumeration elms = http_hdrs.keys();
+                    Hashtable<String, String> http_hdrs = req.getExtDataInHashtable(name);
+                    Enumeration<String> elms = http_hdrs.keys();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
                         String parami =
                                 IRequest.HTTP_HEADERS + LB + String.valueOf(counter++) + RB;
                         // hack
-                        String n = (String) elms.nextElement();
+                        String n = elms.nextElement();
                         String rawJS = "new Object;\n\r" +
                                 prefix + parami + ".name=\"" +
                                 CMSTemplate.escapeJavaScriptString(n) + "\";\n\r" +
@@ -740,7 +741,7 @@ public class CertReqParser extends ReqParser {
                 } // show all auth token stored in request.
                 else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) {
                     IAuthToken auth_token = req.getExtDataInAuthToken(name);
-                    Enumeration elms = auth_token.getElements();
+                    Enumeration<String> elms = auth_token.getElements();
                     int counter = 0;
 
                     while (elms.hasMoreElements()) {
@@ -801,7 +802,7 @@ public class CertReqParser extends ReqParser {
             }
 
             if (name.equalsIgnoreCase(IRequest.ERRORS)) {
-                Vector errorsVector = req.getExtDataInStringVector(name);
+                Vector<String> errorsVector = req.getExtDataInStringVector(name);
                 if (errorsVector != null) {
                     StringBuffer errInfo = new StringBuffer();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/CheckRequest.java b/pki/base/common/src/com/netscape/cms/servlet/request/CheckRequest.java
index b0a70ffc15dc8ae0540cab2ddb7e833927a75dee..1d04952d156eb88a32e19c64b64468b5fd1f8d8a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/CheckRequest.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/CheckRequest.java
@@ -502,7 +502,8 @@ public class CheckRequest extends CMSServlet {
                                         ByteArrayInputStream issuer1 = new
                                                 ByteArrayInputStream(((X500Name) cert.getIssuerDN()).getEncoded());
                                         Name issuer = (Name) Name.getTemplate().decode(issuer1);
-                                        IssuerAndSerialNumber ias = new
+                                        IssuerAndSerialNumber ias =
+                                                new
                                                 IssuerAndSerialNumber(issuer, new INTEGER(cert.getSerialNumber()
                                                         .toString()));
                                         SignerIdentifier si = new
@@ -511,8 +512,8 @@ public class CheckRequest extends CMSServlet {
                                         // SHA1 is the default digest Alg for now.
                                         DigestAlgorithm digestAlg = null;
                                         SignatureAlgorithm signAlg = null;
-                                        org.mozilla.jss.crypto.PrivateKey privKey = CryptoManager.getInstance()
-                                                .findPrivKeyByCert(x509cert);
+                                        org.mozilla.jss.crypto.PrivateKey privKey =
+                                                CryptoManager.getInstance().findPrivKeyByCert(x509cert);
                                         org.mozilla.jss.crypto.PrivateKey.Type keyType = privKey.getType();
 
                                         if (keyType.equals(org.mozilla.jss.crypto.PrivateKey.RSA))
@@ -557,7 +558,8 @@ public class CheckRequest extends CMSServlet {
                                         for (int j = 0; j < certsInChain.length; j++) {
                                             ByteArrayInputStream is = new
                                                     ByteArrayInputStream(certsInChain[j].getEncoded());
-                                            org.mozilla.jss.pkix.cert.Certificate certJss = (org.mozilla.jss.pkix.cert.Certificate)
+                                            org.mozilla.jss.pkix.cert.Certificate certJss =
+                                                    (org.mozilla.jss.pkix.cert.Certificate)
                                                     org.mozilla.jss.pkix.cert.Certificate.getTemplate().decode(is);
 
                                             jsscerts.addElement(certJss);
@@ -566,7 +568,8 @@ public class CheckRequest extends CMSServlet {
                                         SignedData fResponse = new
                                                 SignedData(digestAlgs, ci,
                                                         jsscerts, null, signInfos);
-                                        org.mozilla.jss.pkix.cms.ContentInfo fullResponse = new
+                                        org.mozilla.jss.pkix.cms.ContentInfo fullResponse =
+                                                new
                                                 org.mozilla.jss.pkix.cms.ContentInfo(
                                                         org.mozilla.jss.pkix.cms.ContentInfo.SIGNED_DATA, fResponse);
                                         ByteArrayOutputStream ostream = new
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
index cbed8ae6b60173d3389db48aea6e2cbe30f5f31f..cbe73c79f8cf2f259dad8bdbe9dbdfc107414972 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessCertReq.java
@@ -615,7 +615,7 @@ public class ProcessCertReq extends CMSServlet {
                             String addExts = req.getParameter("addExts");
 
                             if (addExts != null && !addExts.trim().equals("")) {
-                                Vector extsToBeAdded = new Vector();
+                                Vector<Extension> extsToBeAdded = new Vector<Extension>();
 
                                 byte[] b = (byte[]) (com.netscape.osutil.OSUtil.AtoB(addExts));
 
@@ -683,7 +683,8 @@ public class ProcessCertReq extends CMSServlet {
                                                         new BasicConstraintsExtension(isCA.booleanValue(), pathLen);
 
                                                 extensions.delete(BasicConstraintsExtension.NAME);
-                                                extensions.set(BasicConstraintsExtension.NAME, (Extension) bcExt0);
+                                                extensions.set(BasicConstraintsExtension.NAME,
+                                                        (Extension) bcExt0);
                                                 alterationCounter++;
                                             }
                                         }
@@ -753,22 +754,24 @@ public class ProcessCertReq extends CMSServlet {
                                     } catch (Exception e1) {
                                     }
                                     // create extension
-                                    PresenceServerExtension pseExt = new PresenceServerExtension(Critical, Version,
-                                            StreetAddress, TelephoneNumber, RFC822Name, IMID, HostName, PortNumber,
-                                            MaxUsers, ServiceLevel);
+                                    PresenceServerExtension pseExt =
+                                            new PresenceServerExtension(Critical, Version, StreetAddress,
+                                                    TelephoneNumber, RFC822Name, IMID, HostName, PortNumber, MaxUsers,
+                                                    ServiceLevel);
 
                                     extensions.set(pseExt.getExtensionId().toString(), pseExt);
                                 }
 
                                 if (mExtraAgentParams) {
-                                    Enumeration extraparams = req.getParameterNames();
+                                    @SuppressWarnings("unchecked")
+                                    Enumeration<String> extraparams = req.getParameterNames();
                                     int l = IRequest.AGENT_PARAMS.length() + 1;
                                     int ap_counter = 0;
-                                    Hashtable agentparamsargblock = new Hashtable();
+                                    Hashtable<String, String> agentparamsargblock = new Hashtable<String, String>();
 
                                     if (extraparams != null) {
                                         while (extraparams.hasMoreElements()) {
-                                            String s = (String) extraparams.nextElement();
+                                            String s = extraparams.nextElement();
 
                                             if (s.startsWith(IRequest.AGENT_PARAMS)) {
                                                 String param_value = req.getParameter(s);
@@ -933,7 +936,8 @@ public class ProcessCertReq extends CMSServlet {
                                                 authMgr,
                                                 "completed",
                                                 issuedCerts[i].getSubjectDN(),
-                                                "cert issued serial number: 0x" +
+                                                "cert issued serial number: 0x"
+                                                        +
                                                         issuedCerts[i].getSerialNumber().toString(16) + " time: "
                                                         + (endTime - startTime) }
                                         );
diff --git a/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java b/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
index 715a2baf87f7603dcb89af57fe2466aa6dd5263c..fc45395e9121a30e7758259849c360fdde08a334 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
@@ -396,10 +396,11 @@ public class TokenServlet extends CMSServlet {
 
                 try {
 
-                    byte macKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
-                            + keySet + ".mac_key"));
-                    CMS.debug("TokenServlet about to try ComputeSessionKey selectedToken=" + selectedToken
-                            + " keyNickName=" + keyNickName);
+                    byte macKeyArray[] =
+                            com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
+                                    + keySet + ".mac_key"));
+                    CMS.debug("TokenServlet about to try ComputeSessionKey selectedToken="
+                            + selectedToken + " keyNickName=" + keyNickName);
                     session_key = SessionKey.ComputeSessionKey(
                             selectedToken, keyNickName, card_challenge,
                             host_challenge, keyInfo, CUID, macKeyArray, useSoftToken_s, keySet, transportKeyName);
@@ -410,8 +411,9 @@ public class TokenServlet extends CMSServlet {
 
                     }
 
-                    byte encKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
-                            + keySet + ".auth_key"));
+                    byte encKeyArray[] =
+                            com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
+                                    + keySet + ".auth_key"));
                     enc_session_key = SessionKey.ComputeEncSessionKey(
                             selectedToken, keyNickName, card_challenge,
                             host_challenge, keyInfo, CUID, encKeyArray, useSoftToken_s, keySet);
@@ -433,8 +435,9 @@ public class TokenServlet extends CMSServlet {
                          **/
                         CMS.debug("TokenServlet: calling ComputeKekKey");
 
-                        byte kekKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
-                                + keySet + ".kek_key"));
+                        byte kekKeyArray[] =
+                                com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
+                                        + keySet + ".kek_key"));
 
                         kek_key = SessionKey.ComputeKekKey(
                                 selectedToken, keyNickName, card_challenge,
@@ -545,8 +548,9 @@ public class TokenServlet extends CMSServlet {
 
                     } // if (serversideKeygen == true)
 
-                    byte authKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
-                            + keySet + ".auth_key"));
+                    byte authKeyArray[] =
+                            com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks."
+                                    + keySet + ".auth_key"));
                     host_cryptogram = SessionKey.ComputeCryptogram(
                             selectedToken, keyNickName, card_challenge,
                             host_challenge, keyInfo, CUID, 0, authKeyArray, useSoftToken_s, keySet);
@@ -869,8 +873,8 @@ public class TokenServlet extends CMSServlet {
                     " oldKeyNickName=" + oldKeyNickName + " newKeyNickName=" +
                     newKeyNickName);
 
-            byte kekKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks." + keySet
-                    + ".kek_key"));
+            byte kekKeyArray[] =
+                    com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks." + keySet + ".kek_key"));
             KeySetData = SessionKey.DiversifyKey(oldSelectedToken,
                      newSelectedToken, oldKeyNickName,
                     newKeyNickName, rnewKeyInfo, CUID, kekKeyArray, useSoftToken_s, keySet);
@@ -1074,8 +1078,8 @@ public class TokenServlet extends CMSServlet {
                 keyNickName = st.nextToken();
             }
 
-            byte kekKeyArray[] = com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks." + keySet
-                    + ".kek_key"));
+            byte kekKeyArray[] =
+                    com.netscape.cmsutil.util.Utils.SpecialDecode(sconfig.getString("tks." + keySet + ".kek_key"));
             encryptedData = SessionKey.EncryptData(
                        selectedToken, keyNickName, data, keyInfo, CUID, kekKeyArray, useSoftToken_s, keySet);
 
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
index 7f85b6040a42616122d845c72f9d8c8a46e5f0a6..384b4cd67e37aed5f33e93fcfb4b234c2b7499db 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
@@ -118,6 +118,7 @@ import com.netscape.certsrv.ra.IRegistrationAuthority;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.RequestStatus;
+import com.netscape.cms.servlet.common.CMSRequest;
 import com.netscape.cms.servlet.csadmin.LDAPSecurityDomainSessionTable;
 import com.netscape.cms.servlet.csadmin.SecurityDomainSessionTable;
 import com.netscape.cms.servlet.csadmin.SessionTimer;
@@ -1521,7 +1522,7 @@ public class CMSEngine implements ICMSEngine {
     }
 
     public void terminateRequests() {
-        Enumeration e = CommandQueue.mCommandQueue.keys();
+        Enumeration<CMSRequest> e = CommandQueue.mCommandQueue.keys();
 
         while (e.hasMoreElements()) {
             Object thisRequest = e.nextElement();
@@ -1840,10 +1841,10 @@ public class CMSEngine implements ICMSEngine {
                         RequestStatus status = checkRevReq.getRequestStatus();
 
                         if (status == RequestStatus.COMPLETE) {
-                            Enumeration enum1 = checkRevReq.getExtDataKeys();
+                            Enumeration<String> enum1 = checkRevReq.getExtDataKeys();
 
                             while (enum1.hasMoreElements()) {
-                                String name = (String) enum1.nextElement();
+                                String name = enum1.nextElement();
 
                                 if (name.equals(IRequest.REVOKED_CERTS)) {
                                     revoked = true;
@@ -1920,7 +1921,7 @@ class WarningListener implements ILogEventListener {
      * and from source "source". If the parameter is omitted. All entries
      * are sent back.
      */
-    public synchronized NameValuePairs retrieveLogContent(Hashtable req) throws ServletException,
+    public synchronized NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws ServletException,
             IOException, EBaseException {
         return null;
     }
@@ -1928,7 +1929,7 @@ class WarningListener implements ILogEventListener {
     /**
      * Retrieve log file list.
      */
-    public synchronized NameValuePairs retrieveLogList(Hashtable req) throws ServletException,
+    public synchronized NameValuePairs retrieveLogList(Hashtable<String, String> req) throws ServletException,
             IOException, EBaseException {
         return null;
     }
@@ -1941,14 +1942,14 @@ class WarningListener implements ILogEventListener {
         return "ConsoleLog";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/Setup.java b/pki/base/common/src/com/netscape/cmscore/apps/Setup.java
index 5ce0c6d2dcb20a70eb2afa772a9dd925e82348a2..3486ec40e511ed58cdcd15e4ec7d706bcb9577ed 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/Setup.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/Setup.java
@@ -47,7 +47,7 @@ public class Setup {
             { "auths.impl.PortalEnroll.class", "com.netscape.cms.authentication.PortalEnroll"
             },
             { "auths.revocationChecking.bufferSize", "50" },
-        };
+    };
 
     public static void installAuthImpls(IConfigStore c)
             throws EBaseException {
@@ -331,12 +331,18 @@ public class Setup {
             { "ca.publish.mapper.impl.LdapSubjAttrMap.class", "com.netscape.cms.publish.LdapCertSubjMap" },
             { "ca.publish.mapper.impl.LdapDNExactMap.class", "com.netscape.cms.publish.LdapCertExactMap" },
             //{"ca.publish.mapper.impl.LdapCrlIssuerCompsMap.class","com.netscape.cms.publish.LdapCrlIssuerCompsMap"},
-            { "ca.publish.publisher.impl.LdapUserCertPublisher.class", "com.netscape.cms.publish.LdapUserCertPublisher" },
-            { "ca.publish.publisher.impl.LdapCaCertPublisher.class", "com.netscape.cms.publish.LdapCaCertPublisher" },
+            {
+                    "ca.publish.publisher.impl.LdapUserCertPublisher.class",
+                    "com.netscape.cms.publish.LdapUserCertPublisher" },
+            {
+                    "ca.publish.publisher.impl.LdapCaCertPublisher.class",
+                    "com.netscape.cms.publish.LdapCaCertPublisher" },
             { "ca.publish.publisher.impl.LdapCrlPublisher.class", "com.netscape.cms.publish.LdapCrlPublisher" },
-            { "ca.publish.publisher.impl.FileBasedPublisher.class", "com.netscape.cms.publish.FileBasedPublisher" },
+            {
+                    "ca.publish.publisher.impl.FileBasedPublisher.class",
+                    "com.netscape.cms.publish.FileBasedPublisher" },
             { "ca.publish.publisher.impl.OCSPPublisher.class", "com.netscape.cms.publish.OCSPPublisher" },
             { "ca.publish.rule.impl.Rule.class", "com.netscape.cmscore.ldap.LdapRule" },
-        };
+    };
 
 }
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 ad5dd55eeb4788498f584cd2f355f24b3e2b6a5d..c66d8a71db2af64dff208aaa903ab67037e0c0f9 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CertUtils.java
@@ -390,8 +390,8 @@ public class CertUtils {
         sb.append("\n");
         sb.append("Encryption Certificate Serial No: " + encryptionCert.getSerialNumber().toString(16).toUpperCase());
         sb.append("\n");
-        sb.append("Validity: From: " + signingCert.getNotBefore().toString() + "  To: "
-                + signingCert.getNotAfter().toString());
+        sb.append("Validity: From: "
+                + signingCert.getNotBefore().toString() + "  To: " + signingCert.getNotAfter().toString());
         sb.append("\n");
         return new String(sb);
     }
@@ -919,8 +919,8 @@ public class CertUtils {
             }
             String certusage = config.getString(subsysType + ".cert." + tag + ".certusage", "");
             if (certusage.equals("")) {
-                CMS.debug("CertUtils: verifySystemCertByTag() certusage for cert tag " + tag
-                        + " undefined in CS.cfg, getting current certificate usage");
+                CMS.debug("CertUtils: verifySystemCertByTag() certusage for cert tag "
+                        + tag + " undefined in CS.cfg, getting current certificate usage");
             }
             r = verifySystemCertByNickname(nickname, certusage);
             if (r == true) {
@@ -1032,8 +1032,8 @@ public class CertUtils {
             }
             String certlist = config.getString(subsysType + ".cert.list", "");
             if (certlist.equals("")) {
-                CMS.debug("CertUtils: verifySystemCerts() " + subsysType
-                        + ".cert.list not defined in CS.cfg. System certificates verification not done");
+                CMS.debug("CertUtils: verifySystemCerts() "
+                        + subsysType + ".cert.list not defined in CS.cfg. System certificates verification not done");
                 auditMessage = CMS.getLogMessage(
                             LOGGING_SIGNED_AUDIT_CIMC_CERT_VERIFICATION,
                             ILogger.SYSTEM_UID,
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java b/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
index 42ee8f7fd58a286484e65c68d18e45fb8b6ee033..6d838b70d80c58941a238842f611da459654b534 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/CrlCachePrettyPrint.java
@@ -26,7 +26,7 @@ import java.util.TimeZone;
 
 import netscape.security.x509.CRLExtensions;
 import netscape.security.x509.Extension;
-import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.ICRLPrettyPrint;
@@ -181,14 +181,15 @@ public class CrlCachePrettyPrint implements ICRLPrettyPrint {
                 }
                 sb.append("\n");
 
-                Set revokedCerts = mIP.getRevokedCertificates((int) (pageStart - 1), (int) upperLimit);
+                Set<RevokedCertificate> revokedCerts =
+                        mIP.getRevokedCertificates((int) (pageStart - 1), (int) upperLimit);
 
                 if (revokedCerts != null) {
-                    Iterator i = revokedCerts.iterator();
+                    Iterator<RevokedCertificate> i = revokedCerts.iterator();
                     long l = 1;
 
                     while ((i.hasNext()) && ((crlSize == 0) || (upperLimit - pageStart + 1 >= l))) {
-                        RevokedCertImpl revokedCert = (RevokedCertImpl) i.next();
+                        RevokedCertificate revokedCert = i.next();
 
                         if ((crlSize == 0) || (upperLimit - pageStart + 1 >= l)) {
                             sb.append(pp.indent(16) + resource.getString(
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
index 81d0da20e7bffe5b04c40c77c94f5e916edca39a..dfd7dbab8e5f840abb55c9679e004d82838b66c5 100644
--- a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java
@@ -133,7 +133,7 @@ public class OidLoaderSubsystem implements ISubsystem {
         }
         mConfig = config;
 
-        Enumeration names = mConfig.getSubStoreNames();
+        Enumeration<String> names = mConfig.getSubStoreNames();
 
         // load static (build-in) extensions
 
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java b/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
index d32cf283cf9b3bd9231ab80fc5503938f5718067..af72fee45d0c2a4f212f47a707ef72188fcc81e8 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
@@ -69,8 +69,8 @@ public class HttpPKIMessage implements IHttpPKIMessage {
         reqId = r.getRequestId().toString();
         reqStatus = r.getRequestStatus().toString();
 
-        CMS.debug("HttpPKIMessage.fromRequest: requestId=" + r.getRequestId().toString() + " requestStatus="
-                + reqStatus + " instance=" + r);
+        CMS.debug("HttpPKIMessage.fromRequest: requestId="
+                + r.getRequestId().toString() + " requestStatus=" + reqStatus + " instance=" + r);
 
         String attrs[] = RequestTransfer.getTransferAttributes(r);
         int len = attrs.length;
@@ -114,7 +114,7 @@ public class HttpPKIMessage implements IHttpPKIMessage {
                 if (value instanceof String) {
                     r.setExtData(key, (String) value);
                 } else if (value instanceof Hashtable) {
-                    r.setExtData(key, (Hashtable) value);
+                    r.setExtData(key, (Hashtable<String, String>) value);
                 } else {
                     CMS.debug("HttpPKIMessage.toRequest(): key: " + key +
                             " has unexpected type " + value.getClass().toString());
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 806ca57c396e53fe3e9cc3636f69e592a6020e16..5898e3228308f534c8b67c258a66031f44a423fb 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/LocalConnector.java
@@ -59,8 +59,9 @@ public class LocalConnector implements IConnector {
      */
     public boolean send(IRequest r) throws EBaseException {
         if (Debug.ON) {
-            Debug.print("send request type " + r.getRequestType() + " status=" + r.getRequestStatus() + " to "
-                    + mDest.getId() + " id=" + r.getRequestId() + "\n");
+            Debug.print("send request type "
+                    + r.getRequestType() + " status=" + r.getRequestStatus() + " to " + mDest.getId() + " id="
+                    + r.getRequestId() + "\n");
         }
         CMS.debug("send request type " + r.getRequestType() +
                 " to " + mDest.getId());
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 f80889d9198b5266ddc5fcfa2d287200e63b731c..9ee5be524489f0ccc18d741f96e64bddcb43c857 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -105,11 +105,11 @@ public class CertificateRepository extends Repository
     public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound)
             throws EBaseException {
 
-        CMS.debug("CertificateRepository:  in getLastSerialNumberInRange: low " + serial_low_bound + " high "
-                + serial_upper_bound);
+        CMS.debug("CertificateRepository:  in getLastSerialNumberInRange: low "
+                + serial_low_bound + " high " + serial_upper_bound);
 
-        if (serial_low_bound == null || serial_upper_bound == null
-                || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
+        if (serial_low_bound == null
+                || serial_upper_bound == null || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
             return null;
 
         }
@@ -118,8 +118,8 @@ public class CertificateRepository extends Repository
 
         String[] attrs = null;
 
-        ICertRecordList recList = findCertRecordsInList(ldapfilter, attrs, serial_upper_bound.toString(10), "serialno",
-                5 * -1);
+        ICertRecordList recList =
+                findCertRecordsInList(ldapfilter, attrs, serial_upper_bound.toString(10), "serialno", 5 * -1);
 
         int size = recList.getSize();
 
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 b9cb2bdf2e0317b7cc1599797f65f9e6df7b3eb8..269a94c9d312e3e4831a74224d8dc0cea5f4b760 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
@@ -449,19 +449,20 @@ public class KeyRepository extends Repository implements IKeyRepository {
     public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound) throws
             EBaseException {
 
-        CMS.debug("KeyRepository:  in getLastSerialNumberInRange: low " + serial_low_bound + " high "
-                + serial_upper_bound);
+        CMS.debug("KeyRepository:  in getLastSerialNumberInRange: low "
+                + serial_low_bound + " high " + serial_upper_bound);
 
-        if (serial_low_bound == null || serial_upper_bound == null
-                || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
+        if (serial_low_bound == null
+                || serial_upper_bound == null || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
             return null;
         }
 
         String ldapfilter = "(" + "serialno" + "=*" + ")";
         String[] attrs = null;
 
-        KeyRecordList recList = (KeyRecordList) findKeyRecordsInList(ldapfilter, attrs,
-                serial_upper_bound.toString(10), "serialno", 5 * -1);
+        KeyRecordList recList =
+                (KeyRecordList) findKeyRecordsInList(ldapfilter, attrs, serial_upper_bound.toString(10), "serialno",
+                        5 * -1);
 
         int size = recList.getSize();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
index 87f962faa5e27f16f142874c94335bbbcafae95a..46ab073850955aa05f76aab52cff425a54ede8da 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
@@ -54,10 +54,10 @@ public class ReplicaIDRepository extends Repository
      */
     public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound)
             throws EBaseException {
-        CMS.debug("ReplicaIDReposoitory: in getLastSerialNumberInRange: low " + serial_low_bound + " high "
-                + serial_upper_bound);
-        if (serial_low_bound == null || serial_upper_bound == null
-                || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
+        CMS.debug("ReplicaIDReposoitory: in getLastSerialNumberInRange: low "
+                + serial_low_bound + " high " + serial_upper_bound);
+        if (serial_low_bound == null
+                || serial_upper_bound == null || serial_low_bound.compareTo(serial_upper_bound) >= 0) {
             return null;
         }
         BigInteger ret = new BigInteger(getMinSerial());
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
index 06ea075e866a3760562bf1745c417854052bf64e..7cf39dcef8eb987fc63cb5387d65e417dd6c609d 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
@@ -46,7 +46,7 @@ import com.netscape.cmscore.util.Debug;
  */
 public class RevocationInfoMapper implements IDBAttrMapper {
 
-    protected static Vector mNames = new Vector();
+    protected static Vector<String> mNames = new Vector<String>();
     static {
         mNames.addElement(CertDBSchema.LDAP_ATTR_REVO_INFO);
     }
@@ -57,7 +57,7 @@ public class RevocationInfoMapper implements IDBAttrMapper {
     public RevocationInfoMapper() {
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
         return mNames.elements();
     }
 
@@ -74,10 +74,10 @@ public class RevocationInfoMapper implements IDBAttrMapper {
             CRLExtensions exts = info.getCRLEntryExtensions();
             // CRLExtension's DER encoding and decoding does not work!
             // That is why we need to do our own serialization.
-            Enumeration e = exts.getElements();
+            Enumeration<Extension> e = exts.getElements();
 
             while (e.hasMoreElements()) {
-                Extension ext = (Extension) e.nextElement();
+                Extension ext = e.nextElement();
 
                 if (ext instanceof CRLReasonExtension) {
                     RevocationReason reason =
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 ddbc2cd07eb2886bab20866b65cb01892f5f26ac..856a8c59193740db53d61aa1ada8e8246a51183b 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/X509CertImplMapper.java
@@ -54,8 +54,8 @@ public class X509CertImplMapper implements IDBAttrMapper {
     public X509CertImplMapper() {
     }
 
-    public Enumeration getSupportedLDAPAttributeNames() {
-        Vector v = new Vector();
+    public Enumeration<String> getSupportedLDAPAttributeNames() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement(CertDBSchema.LDAP_ATTR_NOT_BEFORE);
         v.addElement(CertDBSchema.LDAP_ATTR_NOT_AFTER);
@@ -90,11 +90,11 @@ public class X509CertImplMapper implements IDBAttrMapper {
                     cert.getSubjectDN().getName()));
             attrs.add(new LDAPAttribute(CertDBSchema.LDAP_ATTR_PUBLIC_KEY_DATA, cert.getPublicKey().getEncoded()));
             // make extension searchable
-            Set nonCritSet = cert.getNonCriticalExtensionOIDs();
+            Set<String> nonCritSet = cert.getNonCriticalExtensionOIDs();
 
             if (nonCritSet != null) {
-                for (Iterator i = nonCritSet.iterator(); i.hasNext();) {
-                    String oid = (String) i.next();
+                for (Iterator<String> i = nonCritSet.iterator(); i.hasNext();) {
+                    String oid = i.next();
 
                     if (oid.equals("2.16.840.1.113730.1.1")) {
                         String extVal = getCertTypeExtensionInfo(cert);
@@ -113,11 +113,11 @@ public class X509CertImplMapper implements IDBAttrMapper {
                             CertDBSchema.LDAP_ATTR_EXTENSION, oid));
                 }
             }
-            Set critSet = cert.getCriticalExtensionOIDs();
+            Set<String> critSet = cert.getCriticalExtensionOIDs();
 
             if (critSet != null) {
-                for (Iterator i = critSet.iterator(); i.hasNext();) {
-                    String oid = (String) i.next();
+                for (Iterator<String> i = critSet.iterator(); i.hasNext();) {
+                    String oid = i.next();
 
                     if (oid.equals("2.16.840.1.113730.1.1")) {
                         String extVal = getCertTypeExtensionInfo(cert);
diff --git a/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java b/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
index f03b81f3d32f4ed634c14a4ee19b6bc5ed00bccb..213772882ef39a9f330370caf514bfe93b4b54dc 100644
--- a/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
+++ b/pki/base/common/src/com/netscape/cmscore/extensions/CMSExtensionsMap.java
@@ -47,8 +47,8 @@ public class CMSExtensionsMap implements ISubsystem {
 
     private static final String PROP_CLASS = "class";
 
-    private Hashtable mName2Ext = new Hashtable();
-    private Hashtable mOID2Ext = new Hashtable();
+    private Hashtable<String, ICMSExtension> mName2Ext = new Hashtable<String, ICMSExtension>();
+    private Hashtable<String, ICMSExtension> mOID2Ext = new Hashtable<String, ICMSExtension>();
     private ISubsystem mOwner = null;
     private IConfigStore mConfig = null;
 
@@ -62,7 +62,7 @@ public class CMSExtensionsMap implements ISubsystem {
         mOwner = owner;
         mConfig = config;
 
-        Enumeration sstores = mConfig.getSubStoreNames();
+        Enumeration<String> sstores = mConfig.getSubStoreNames();
 
         while (sstores.hasMoreElements()) {
             String name = (String) sstores.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java b/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java
index 0fca2ba9c3b28beab2bf5444027a1eb7cba3542d..164c1250e95ae9b5b4331a867cfd9e6677e82e26 100644
--- a/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java
+++ b/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java
@@ -135,16 +135,16 @@ public class JobCron implements IJobCron {
          * the '*' one will remain empty (no elements)
          */
         // day-of-week
-        if ((sDayOMonth != null) && sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null)
-                && !sDayOWeek.equals(CronItem.ALL)) {
+        if ((sDayOMonth != null)
+                && sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null) && !sDayOWeek.equals(CronItem.ALL)) {
             try {
                 cDOW.set(sDayOWeek);
             } catch (EBaseException e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INVALID_DAY_OF_WEEK", e.toString()));
                 throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON"));
             }
-        } else if ((sDayOMonth != null) && !sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null)
-                && sDayOWeek.equals(CronItem.ALL)) {
+        } else if ((sDayOMonth != null)
+                && !sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null) && sDayOWeek.equals(CronItem.ALL)) {
             try {
                 cDOM.set(sDayOMonth);
             } catch (EBaseException e) {
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapRule.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
index f3d2bd17fc8d03041e938199643bbe6b548cef1d..0f0c3a3b9cbf9ed9db56cf8f81b058c28d55f9ec 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
@@ -83,13 +83,14 @@ public class LdapRule implements ILdapRule, IExtendedPluginInfo {
         }
 
         epi_params = new String[] {
-                    "type;choice(cacert,crl, certs);The publishing object type",
-                    "mapper;choice(" + map + ");Use the mapper to find the ldap dn \nto publish the certificate or crl",
-                    "publisher;choice(" + publish
-                            + ");Use the publisher to publish the certificate or crl a directory etc",
-                    "enable;boolean;Enable this publishing rule",
-                    "predicate;string;Filter describing when this publishing rule shoule be used"
-                };
+                "type;choice(cacert,crl, certs);The publishing object type",
+                "mapper;choice("
+                        + map + ");Use the mapper to find the ldap dn \nto publish the certificate or crl",
+                "publisher;choice("
+                        + publish + ");Use the publisher to publish the certificate or crl a directory etc",
+                "enable;boolean;Enable this publishing rule",
+                "predicate;string;Filter describing when this publishing rule shoule be used"
+        };
 
         // Read the predicate expression if any associated
         // with the rule
@@ -115,12 +116,12 @@ public class LdapRule implements ILdapRule, IExtendedPluginInfo {
         mConfig = config;
 
         epi_params = new String[] {
-                    "type;choice(cacert, crl, certs);The publishing object type",
-                    "mapper;choice(null,LdapUserCertMap,LdapServerCertMap,LdapCrlMap,LdapCaCertMap);Use the mapper to find the ldap dn to publish the certificate or crl",
-                    "publisher;choice(LdapUserCertPublisher,LdapServerCertPublisher,LdapCrlPublisher,LdapCaCertPublisher);Use the publisher to publish the certificate or crl a directory etc",
-                    "enable;boolean;",
-                    "predicate;string;"
-                };
+                "type;choice(cacert, crl, certs);The publishing object type",
+                "mapper;choice(null,LdapUserCertMap,LdapServerCertMap,LdapCrlMap,LdapCaCertMap);Use the mapper to find the ldap dn to publish the certificate or crl",
+                "publisher;choice(LdapUserCertPublisher,LdapServerCertPublisher,LdapCrlPublisher,LdapCaCertPublisher);Use the publisher to publish the certificate or crl a directory etc",
+                "enable;boolean;",
+                "predicate;string;"
+        };
 
         // Read the predicate expression if any associated
         // with the rule
diff --git a/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java b/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
index 83cd0c99c601dded6427069b2291f3613bb96387..8ac304f8c7d04f5d3258bfd15c8a4d1310e9b38b 100644
--- a/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
@@ -139,8 +139,8 @@ public class LogSubsystem implements ILogSubsystem {
                 throw new EBaseException(insName + ":Failed to instantiate class " + className);
             } catch (Throwable e) {
                 e.printStackTrace();
-                throw new EBaseException(insName + ":Failed to instantiate class " + className + " error: "
-                        + e.getMessage());
+                throw new EBaseException(insName
+                        + ":Failed to instantiate class " + className + " error: " + e.getMessage());
             }
 
             if (insName == null) {
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java b/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
index 5bedafbe088e039b4ec6b040a3e43ddef5eca4a6..68556dfc00d083ce677ccf8d7f3800f80f98a885 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/ReqCertSANameEmailResolver.java
@@ -24,7 +24,6 @@ import java.security.cert.X509Certificate;
 import java.util.Enumeration;
 
 import netscape.security.x509.CertificateExtensions;
-import netscape.security.x509.GeneralName;
 import netscape.security.x509.GeneralNameInterface;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.RevokedCertImpl;
@@ -187,18 +186,15 @@ public class ReqCertSANameEmailResolver implements IEmailResolver {
                             GeneralNames gn =
                                     (GeneralNames) ext.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
 
-                            Enumeration e = gn.elements();
+                            Enumeration<GeneralNameInterface> e = gn.elements();
 
                             while (e.hasMoreElements()) {
-                                Object g = (Object) e.nextElement();
-
-                                GeneralName gni =
-                                        (GeneralName) g;
+                                GeneralNameInterface gni = e.nextElement();
 
                                 if (gni.getType() == GeneralNameInterface.NAME_RFC822) {
                                     CMS.debug("got an subjectalternatename email");
 
-                                    String nameString = g.toString();
+                                    String nameString = gni.toString();
 
                                     // "RFC822Name: " + name
                                     mEmail =
diff --git a/pki/base/common/src/com/netscape/cmscore/registry/PluginRegistry.java b/pki/base/common/src/com/netscape/cmscore/registry/PluginRegistry.java
index 936a466ccf594ef2ba718d3520411b57ac3808dd..42bb3e68e43b62ef723a12d5ad07875219a0fd39 100644
--- a/pki/base/common/src/com/netscape/cmscore/registry/PluginRegistry.java
+++ b/pki/base/common/src/com/netscape/cmscore/registry/PluginRegistry.java
@@ -42,7 +42,8 @@ public class PluginRegistry implements IPluginRegistry {
     private IConfigStore mConfig = null;
     private IConfigStore mFileConfig = null;
     private ISubsystem mOwner = null;
-    private Hashtable<String, Hashtable<String, IPluginInfo>> mTypes = new Hashtable<String, Hashtable<String, IPluginInfo>>();
+    private Hashtable<String, Hashtable<String, IPluginInfo>> mTypes =
+            new Hashtable<String, Hashtable<String, IPluginInfo>>();
 
     public PluginRegistry() {
     }
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 bd47f3ce68a386928fe617d8f87f93a52c03d982..82739debf8db57044bd70a8760520f02b2097742 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -30,6 +30,7 @@ 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;
 
@@ -168,7 +169,7 @@ public abstract class ARequestQueue
      * @return
      *         an Enumeration that generates RequestId objects.
      */
-    abstract protected Enumeration getRawList();
+    abstract protected Enumeration<RequestId> getRawList();
 
     /**
      * protected access for setting the current state of a request.
@@ -435,7 +436,7 @@ public abstract class ARequestQueue
             throw new EBaseException("Missing agent information");
 
         aas.addApproval(agentName);
-        r.setExtData(AgentApprovals.class.getName(), aas.toStringVector());
+        r.setExtData(AgentApprovals.class.getName(), (Vector<?>) aas.toStringVector());
 
         PolicyResult pr = mPolicy.apply(r);
 
@@ -878,7 +879,9 @@ class Request
             if (!((key instanceof String) && isValidExtDataKey((String) key))) {
                 return false;
             }
-
+            /*
+             * 	TODO  should the Value type be String?
+             */
             Object value = hash.get(key);
             if (!(value instanceof String)) {
                 return false;
@@ -900,12 +903,13 @@ class Request
         return true;
     }
 
-    public boolean setExtData(String key, Hashtable value) {
+    @SuppressWarnings("unchecked")
+    public boolean setExtData(String key, Hashtable<String, String> value) {
         if (!(isValidExtDataKey(key) && isValidExtDataHashtableValue(value))) {
             return false;
         }
 
-        mExtData.put(key, new ExtDataHashtable(value));
+        mExtData.put(key, new ExtDataHashtable<String>(value));
         return true;
     }
 
@@ -924,7 +928,7 @@ class Request
         return (String) value;
     }
 
-    public Hashtable getExtDataInHashtable(String key) {
+    public Hashtable<String, String> getExtDataInHashtable(String key) {
         Object value = mExtData.get(key);
         if (value == null) {
             return null;
@@ -932,10 +936,10 @@ class Request
         if (!(value instanceof Hashtable)) {
             return null;
         }
-        return new ExtDataHashtable((Hashtable) value);
+        return new ExtDataHashtable<String>((Hashtable<String, String>) value);
     }
 
-    public Enumeration getExtDataKeys() {
+    public Enumeration<String> getExtDataKeys() {
         return mExtData.keys();
     }
 
@@ -954,9 +958,10 @@ class Request
             return false;
         }
 
-        Hashtable existingValue = (Hashtable) mExtData.get(key);
+        @SuppressWarnings("unchecked")
+        Hashtable<String, String> existingValue = (Hashtable<String, String>) mExtData.get(key);
         if (existingValue == null) {
-            existingValue = new ExtDataHashtable();
+            existingValue = new ExtDataHashtable<String>();
             mExtData.put(key, existingValue);
         }
         existingValue.put(subkey, value);
@@ -964,11 +969,11 @@ class Request
     }
 
     public String getExtDataInString(String key, String subkey) {
-        Hashtable value = getExtDataInHashtable(key);
+        Hashtable<String, String> value = getExtDataInHashtable(key);
         if (value == null) {
             return null;
         }
-        return (String) value.get(subkey);
+        return value.get(subkey);
     }
 
     public boolean setExtData(String key, Integer value) {
@@ -1226,7 +1231,7 @@ class Request
         return certArray;
     }
 
-    public boolean setExtData(String key, Vector stringVector) {
+    public boolean setExtData(String key, Vector<?> stringVector) {
         String[] stringArray;
         if (stringVector == null) {
             return false;
@@ -1239,12 +1244,12 @@ class Request
         return setExtData(key, stringArray);
     }
 
-    public Vector getExtDataInStringVector(String key) {
+    public Vector<String> getExtDataInStringVector(String key) {
         String[] stringArray = getExtDataInStringArray(key);
         if (stringArray == null) {
             return null;
         }
-        return new Vector(Arrays.asList(stringArray));
+        return new Vector<String>(Arrays.asList(stringArray));
     }
 
     public boolean getExtDataInBoolean(String key, boolean defVal) {
@@ -1265,11 +1270,11 @@ class Request
         if (data == null) {
             return false;
         }
-        Hashtable hash = new Hashtable();
-        Enumeration keys = data.getElements();
+        Hashtable<String, String> hash = new Hashtable<String, String>();
+        Enumeration<String> keys = data.getElements();
         while (keys.hasMoreElements()) {
             try {
-                String authKey = (String) keys.nextElement();
+                String authKey = keys.nextElement();
                 hash.put(authKey, data.getInString(authKey));
             } catch (ClassCastException e) {
                 return false;
@@ -1279,12 +1284,12 @@ class Request
     }
 
     public IAuthToken getExtDataInAuthToken(String key) {
-        Hashtable hash = getExtDataInHashtable(key);
+        Hashtable<String, String> hash = getExtDataInHashtable(key);
         if (hash == null) {
             return null;
         }
         AuthToken authToken = new AuthToken(null);
-        Enumeration keys = hash.keys();
+        Enumeration<String> keys = hash.keys();
         while (keys.hasMoreElements()) {
             try {
                 String hashKey = (String) keys.nextElement();
@@ -1360,7 +1365,7 @@ class Request
         if (values == null) {
             return false;
         }
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         for (int index = 0; index < values.length; index++) {
             hashValue.put(Integer.toString(index), values[index]);
         }
@@ -1370,7 +1375,7 @@ class Request
     public String[] getExtDataInStringArray(String key) {
         int index;
 
-        Hashtable hashValue = getExtDataInHashtable(key);
+        Hashtable<String, String> hashValue = getExtDataInHashtable(key);
         if (hashValue == null) {
             String s = getExtDataInString(key);
             if (s == null) {
@@ -1380,10 +1385,10 @@ class Request
                 return sa;
             }
         }
-        Set arrayKeys = hashValue.keySet();
-        Vector listValue = new Vector(arrayKeys.size());
-        for (Iterator iter = arrayKeys.iterator(); iter.hasNext();) {
-            String arrayKey = (String) iter.next();
+        Set<String> arrayKeys = hashValue.keySet();
+        Vector<Object> listValue = new Vector<Object>(arrayKeys.size());
+        for (Iterator<String> iter = arrayKeys.iterator(); iter.hasNext();) {
+            String arrayKey = iter.next();
             try {
                 index = Integer.parseInt(arrayKey);
             } catch (NumberFormatException e) {
@@ -1395,7 +1400,7 @@ class Request
             listValue.set(index,
                     hashValue.get(arrayKey));
         }
-        return (String[]) listValue.toArray(new String[0]);
+        return listValue.toArray(new String[0]);
     }
 
     public IAttrSet asIAttrSet() {
@@ -1415,7 +1420,7 @@ class Request
     protected String mOwner;
     protected String mRequestType;
     protected String mContext; // string for now.
-    protected ExtDataHashtable mExtData = new ExtDataHashtable();
+    protected ExtDataHashtable<Object> mExtData = new ExtDataHashtable<Object>();
 
     Date mCreationTime = CMS.getCurrentDate();
     Date mModificationTime = CMS.getCurrentDate();
@@ -1448,7 +1453,7 @@ class RequestIAttrSetWrapper implements IAttrSet {
         mRequest.deleteExtData(name);
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getElements() {
         return mRequest.getExtDataKeys();
     }
 }
@@ -1478,7 +1483,7 @@ class RequestListByStatus
         return null;
     }
 
-    public Object nextElement() {
+    public RequestId nextElement() {
         RequestId next = mNext;
 
         update();
@@ -1494,7 +1499,7 @@ class RequestListByStatus
         return next;
     }
 
-    public RequestListByStatus(Enumeration e, RequestStatus s, IRequestQueue q) {
+    public RequestListByStatus(Enumeration<RequestId> e, RequestStatus s, IRequestQueue q) {
         mEnumeration = e;
         mStatus = s;
         mQueue = q;
@@ -1511,7 +1516,7 @@ class RequestListByStatus
             if (!mEnumeration.hasMoreElements())
                 break;
 
-            rId = (RequestId) mEnumeration.nextElement();
+            rId = mEnumeration.nextElement();
 
             try {
                 IRequest r = mQueue.findRequest(rId);
@@ -1527,7 +1532,7 @@ class RequestListByStatus
 
     protected RequestStatus mStatus;
     protected IRequestQueue mQueue;
-    protected Enumeration mEnumeration;
+    protected Enumeration<RequestId> mEnumeration;
     protected RequestId mNext;
 }
 
@@ -1537,7 +1542,7 @@ class RequestList
         return mEnumeration.hasMoreElements();
     }
 
-    public Object nextElement() {
+    public RequestId nextElement() {
         return mEnumeration.nextElement();
     }
 
@@ -1553,11 +1558,11 @@ class RequestList
         return null;
     }
 
-    public RequestList(Enumeration e) {
+    public RequestList(Enumeration<RequestId> e) {
         mEnumeration = e;
     }
 
-    protected Enumeration mEnumeration;
+    protected Enumeration<RequestId> mEnumeration;
 }
 
 class RecoverThread extends Thread {
diff --git a/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java b/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
index f21503a21006760eb12cf13eb7089d6347be06cd..86e6c0530b6db66c208d489e384de9268b288d36 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ExtDataHashtable.java
@@ -10,7 +10,7 @@ import java.util.Set;
  * purpose is to hide the fact that LDAP doesn't preserve the case of keys.
  * It does this by lowercasing all keys used to access the Hashtable.
  */
-public class ExtDataHashtable extends Hashtable {
+public class ExtDataHashtable<V> extends Hashtable<String, V> {
 
     /**
      *
@@ -29,7 +29,7 @@ public class ExtDataHashtable extends Hashtable {
         super(i, v);
     }
 
-    public ExtDataHashtable(Map map) {
+    public ExtDataHashtable(Map<? extends String, ? extends V> map) {
         // the super constructor seems to call putAll, but I can't
         // rely on that behaviour
         super();
@@ -44,7 +44,7 @@ public class ExtDataHashtable extends Hashtable {
         return super.containsKey(o);
     }
 
-    public Object get(Object o) {
+    public V get(Object o) {
         if (o instanceof String) {
             String key = (String) o;
             return super.get(key.toLowerCase());
@@ -52,7 +52,7 @@ public class ExtDataHashtable extends Hashtable {
         return super.get(o);
     }
 
-    public Object put(Object oKey, Object val) {
+    public V put(String oKey, V val) {
         if (oKey instanceof String) {
             String key = (String) oKey;
             return super.put(key.toLowerCase(), val);
@@ -60,15 +60,15 @@ public class ExtDataHashtable extends Hashtable {
         return super.put(oKey, val);
     }
 
-    public void putAll(Map map) {
-        Set keys = map.keySet();
-        for (Iterator i = keys.iterator(); i.hasNext();) {
+    public void putAll(Map<? extends String, ? extends V> map) {
+        Set<? extends String> keys = map.keySet();
+        for (Iterator<? extends String> i = keys.iterator(); i.hasNext();) {
             Object key = i.next();
-            put(key, map.get(key));
+            put((String) key, map.get(key));
         }
     }
 
-    public Object remove(Object o) {
+    public V remove(Object o) {
         if (o instanceof String) {
             String key = (String) o;
             return super.remove(key.toLowerCase());
diff --git a/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java b/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
index a3637758f411c4b108053f125e4cf2593b060dea..c7f8c493a0e13a82382229fa922cc3fb50364a27 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/RequestRecord.java
@@ -250,7 +250,7 @@ public class RequestRecord
             if (value instanceof String) {
                 r.setExtData(key, (String) value);
             } else if (value instanceof Hashtable) {
-                r.setExtData(key, (Hashtable) value);
+                r.setExtData(key, (Hashtable<String, String>) value);
             } else {
                 throw new EDBException("Illegal data value in RequestRecord: " +
                         r.toString());
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 aa80a3cebb07a75a2f17687c118ce2d83a00e661..a4f6ee9a02cb0e6f1054dab2ccf40d3435872f68 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
@@ -127,8 +127,9 @@ public final class JssSubsystem implements ICryptoSubsystem {
     protected PasswordCallback mPWCB = null;
 
     private static JssSubsystem mInstance = new JssSubsystem();
-    private Hashtable mNicknameMapCertsTable = new Hashtable();
-    private Hashtable mNicknameMapUserCertsTable = new Hashtable();
+    private Hashtable<String, X509Certificate[]> mNicknameMapCertsTable = new Hashtable<String, X509Certificate[]>();
+    private Hashtable<String, X509Certificate[]> mNicknameMapUserCertsTable =
+            new Hashtable<String, X509Certificate[]>();
 
     private FileInputStream devRandomInputStream = null;
 
@@ -144,7 +145,7 @@ public final class JssSubsystem implements ICryptoSubsystem {
     private static final String PROP_SSL_CIPHERPREF = Constants.PR_CIPHER_PREF;
     private static final String PROP_SSL_ECTYPE = Constants.PR_ECTYPE;
 
-    private static Hashtable mCipherNames = new Hashtable();
+    private static Hashtable<String, Integer> mCipherNames = new Hashtable<String, Integer>();
 
     /* default sslv2 and sslv3 cipher suites(all), set if no prefs in config.*/
     private static final String DEFAULT_CIPHERPREF =
@@ -514,12 +515,13 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
     public String getTokenList() throws EBaseException {
         String tokenList = "";
-        Enumeration tokens = mCryptoManager.getExternalTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> tokens = mCryptoManager.getExternalTokens();
         int num = 0;
 
         try {
             while (tokens.hasMoreElements()) {
-                CryptoToken c = (CryptoToken) tokens.nextElement();
+                CryptoToken c = tokens.nextElement();
 
                 // skip builtin object token
                 if (c.getName() != null && c.getName().equals("Builtin Object Token")) {
@@ -603,10 +605,11 @@ public final class JssSubsystem implements ICryptoSubsystem {
         String certNames = "";
 
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+            Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
-                CryptoToken token = (CryptoToken) enums.nextElement();
+                CryptoToken token = enums.nextElement();
                 CryptoStore store = token.getCryptoStore();
                 X509Certificate[] list = store.getCertificates();
 
@@ -1155,12 +1158,13 @@ public final class JssSubsystem implements ICryptoSubsystem {
     public NameValuePairs getRootCerts() throws EBaseException {
         NameValuePairs nvps = new NameValuePairs();
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+            Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
             if (mNicknameMapCertsTable != null)
                 mNicknameMapCertsTable.clear();
 
             // a temp hashtable with vectors
-            Hashtable vecTable = new Hashtable();
+            Hashtable<String, Vector<X509Certificate>> vecTable = new Hashtable<String, Vector<X509Certificate>>();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1183,11 +1187,11 @@ public final class JssSubsystem implements ICryptoSubsystem {
                         X509CertImpl impl = null;
 
                         try {
-                            Vector v;
+                            Vector<X509Certificate> v;
                             if (vecTable.containsKey((Object) nickname) == true) {
-                                v = (Vector) vecTable.get(nickname);
+                                v = vecTable.get(nickname);
                             } else {
-                                v = new Vector();
+                                v = new Vector<X509Certificate>();
                             }
                             v.addElement(list[i]);
                             vecTable.put(nickname, v);
@@ -1208,11 +1212,11 @@ public final class JssSubsystem implements ICryptoSubsystem {
                     }
                 }
                 // convert hashtable of vectors to hashtable of arrays
-                Enumeration elms = vecTable.keys();
+                Enumeration<String> elms = vecTable.keys();
 
                 while (elms.hasMoreElements()) {
                     String key = (String) elms.nextElement();
-                    Vector v = (Vector) vecTable.get((Object) key);
+                    Vector<X509Certificate> v = vecTable.get((Object) key);
                     X509Certificate[] a = new X509Certificate[v.size()];
 
                     v.copyInto((Object[]) a);
@@ -1231,7 +1235,8 @@ public final class JssSubsystem implements ICryptoSubsystem {
     public NameValuePairs getUserCerts() throws EBaseException {
         NameValuePairs nvps = new NameValuePairs();
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+            Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1297,7 +1302,8 @@ public final class JssSubsystem implements ICryptoSubsystem {
             mNicknameMapUserCertsTable.clear();
 
         try {
-            Enumeration enums = mCryptoManager.getAllTokens();
+            @SuppressWarnings("unchecked")
+            Enumeration<CryptoToken> enums = mCryptoManager.getAllTokens();
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
@@ -1378,36 +1384,36 @@ public final class JssSubsystem implements ICryptoSubsystem {
         }
 
         // a temp hashtable with vectors
-        Hashtable vecTable = new Hashtable();
+        Hashtable<String, Vector<X509Certificate>> vecTable = new Hashtable<String, Vector<X509Certificate>>();
 
         for (int i = 0; i < certs.length; i++) {
             String nickname = certs[i].getNickname();
 
             /* build a table of our own */
-            Vector v;
+            Vector<X509Certificate> v;
 
             if (vecTable.containsKey((Object) nickname) == true) {
-                v = (Vector) vecTable.get(nickname);
+                v = vecTable.get(nickname);
             } else {
-                v = new Vector();
+                v = new Vector<X509Certificate>();
             }
             v.addElement(certs[i]);
             vecTable.put(nickname, v);
         }
 
         // convert hashtable of vectors to hashtable of arrays
-        Enumeration elms = vecTable.keys();
+        Enumeration<String> elms = vecTable.keys();
 
         while (elms.hasMoreElements()) {
             String key = (String) elms.nextElement();
-            Vector v = (Vector) vecTable.get((Object) key);
+            Vector<X509Certificate> v = vecTable.get((Object) key);
             X509Certificate[] a = new X509Certificate[v.size()];
 
             v.copyInto((Object[]) a);
             mNicknameMapCertsTable.put(key, a);
         }
 
-        Enumeration keys = mNicknameMapCertsTable.keys();
+        Enumeration<String> keys = mNicknameMapCertsTable.keys();
 
         while (keys.hasMoreElements()) {
             String nickname = (String) keys.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
index 6d7d71b0e440d3b821941524c849662f0d6e6c64..1d03911b45f2be6a225961f4886bab15af932e57 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
@@ -156,7 +156,8 @@ public class KeyCertUtil {
     public static String getTokenNames(CryptoManager manager)
             throws TokenException {
         String tokenList = "";
-        Enumeration tokens = manager.getExternalTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> tokens = manager.getExternalTokens();
         int num = 0;
 
         while (tokens.hasMoreElements()) {
@@ -981,7 +982,7 @@ public class KeyCertUtil {
         String signing = properties.getOCSPSigning();
 
         if ((signing != null) && (signing.equals(Constants.TRUE))) {
-            Vector oidSet = new Vector();
+            Vector<ObjectIdentifier> oidSet = new Vector<ObjectIdentifier>();
             oidSet.addElement(
                     ObjectIdentifier.getObjectIdentifier(
                             ExtendedKeyUsageExtension.OID_OCSPSigning));
diff --git a/pki/base/common/src/com/netscape/cmscore/util/UtilResources.java b/pki/base/common/src/com/netscape/cmscore/util/UtilResources.java
index e8f4d8478b82788e04fdc4c932d3914a0a138800..6955dda506ab8afa5a62dfd6b44ccda8268deaee 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/UtilResources.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/UtilResources.java
@@ -70,5 +70,5 @@ public class UtilResources extends ListResourceBundle {
             { NO_UID_PERMISSION_2, "Can''t change process uid to {0}. Running as {1}" },
             { SHUTDOWN_SIG, "Received shutdown signal" },
             { RESTART_SIG, "Received restart signal" },
-        };
+    };
 }
diff --git a/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java b/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
index c5fb12e22391a3070af348beac6796e1f09856df..f27cabb2c602575f445b692a5bbc0cf81702eabc 100644
--- a/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
+++ b/pki/base/common/test/com/netscape/certsrv/app/CMSEngineDefaultStub.java
@@ -126,11 +126,11 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         return false;
     }
 
-    public Enumeration getSubsystemNames() {
+    public Enumeration<String> getSubsystemNames() {
         return null;
     }
 
-    public Enumeration getSubsystems() {
+    public Enumeration<ISubsystem> getSubsystems() {
         return null;
     }
 
@@ -465,18 +465,6 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         return null;
     }
 
-    public void getGeneralNameConfigDefaultParams(String name, boolean isValueConfigured, Vector params) {
-    }
-
-    public void getGeneralNamesConfigDefaultParams(String name, boolean isValueConfigured, Vector params) {
-    }
-
-    public void getGeneralNameConfigExtendedPluginInfo(String name, boolean isValueConfigured, Vector info) {
-    }
-
-    public void getGeneralNamesConfigExtendedPluginInfo(String name, boolean isValueConfigured, Vector info) {
-    }
-
     public IGeneralNamesConfig createGeneralNamesConfig(String name, IConfigStore config, boolean isValueConfigured,
             boolean isPolicyEnabled) throws EBaseException {
         return null;
@@ -492,12 +480,6 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         return null;
     }
 
-    public void getSubjAltNameConfigDefaultParams(String name, Vector params) {
-    }
-
-    public void getSubjAltNameConfigExtendedPluginInfo(String name, Vector params) {
-    }
-
     public ISubjAltNameConfig createSubjAltNameConfig(String name, IConfigStore config, boolean isValueConfigured)
             throws EBaseException {
         return null;
@@ -537,14 +519,6 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         return null;
     }
 
-    public IArgBlock createArgBlock(String realm, Hashtable httpReq) {
-        return null;
-    }
-
-    public IArgBlock createArgBlock(Hashtable httpReq) {
-        return null;
-    }
-
     public boolean isRevoked(X509Certificate[] certificates) {
         return false;
     }
@@ -600,4 +574,59 @@ public class CMSEngineDefaultStub implements ICMSEngine {
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public void getGeneralNameConfigDefaultParams(String name,
+            boolean isValueConfigured, Vector<String> params) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void getGeneralNamesConfigDefaultParams(String name,
+            boolean isValueConfigured, Vector<String> params) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void getGeneralNameConfigExtendedPluginInfo(String name,
+            boolean isValueConfigured, Vector<String> info) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void getGeneralNamesConfigExtendedPluginInfo(String name,
+            boolean isValueConfigured, Vector<String> info) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void getSubjAltNameConfigDefaultParams(String name,
+            Vector<String> params) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void getSubjAltNameConfigExtendedPluginInfo(String name,
+            Vector<String> params) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public IArgBlock createArgBlock(String realm,
+            Hashtable<String, String> httpReq) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public IArgBlock createArgBlock(Hashtable<String, String> httpReq) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
diff --git a/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java b/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
index 7569ff20ad6afbf32f01232b61f9eb69dd151e50..c349b73d07c1f0c0f7e6d324434f3d2826bfcb47 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/ExtDataHashtableTest.java
@@ -9,14 +9,14 @@ import com.netscape.cmscore.test.CMSBaseTestCase;
 
 public class ExtDataHashtableTest extends CMSBaseTestCase {
 
-    ExtDataHashtable hash;
+    ExtDataHashtable<String> hash;
 
     public ExtDataHashtableTest(String name) {
         super(name);
     }
 
     public void cmsTestSetUp() {
-        hash = new ExtDataHashtable();
+        hash = new ExtDataHashtable<String>();
     }
 
     public void cmsTestTearDown() {
@@ -46,7 +46,7 @@ public class ExtDataHashtableTest extends CMSBaseTestCase {
     }
 
     public void testPutAll() {
-        Hashtable hash2 = new Hashtable();
+        Hashtable<String, String> hash2 = new Hashtable<String, String>();
         hash2.put("KEY1", "VAL1");
         hash2.put("KEY2", "val2");
 
@@ -67,11 +67,11 @@ public class ExtDataHashtableTest extends CMSBaseTestCase {
     }
 
     public void testMapConstructor() {
-        Hashtable hash2 = new Hashtable();
+        Hashtable<String, String> hash2 = new Hashtable<String, String>();
         hash2.put("KEY1", "VAL1");
         hash2.put("KEY2", "val2");
 
-        hash = new ExtDataHashtable(hash2);
+        hash = new ExtDataHashtable<String>(hash2);
 
         assertTrue(hash.containsKey("key1"));
         assertEquals("VAL1", hash.get("key1"));
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java b/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
index f00eb8a748cf943d1398c05c65548dd2e248ab96..fd53c2ea9f0594b33ebe4218316e1e0a093199b5 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestDefaultStub.java
@@ -71,7 +71,7 @@ public class RequestDefaultStub implements IRequest {
         return null;
     }
 
-    public Enumeration getAttrNames() {
+    public Enumeration<String> getAttrNames() {
         return null;
     }
 
@@ -103,7 +103,7 @@ public class RequestDefaultStub implements IRequest {
         return false;
     }
 
-    public boolean setExtData(String key, Hashtable value) {
+    public boolean setExtData(String key, Hashtable<String, String> value) {
         return false;
     }
 
@@ -115,11 +115,11 @@ public class RequestDefaultStub implements IRequest {
         return null;
     }
 
-    public Hashtable getExtDataInHashtable(String key) {
+    public Hashtable<String, String> getExtDataInHashtable(String key) {
         return null;
     }
 
-    public Enumeration getExtDataKeys() {
+    public Enumeration<String> getExtDataKeys() {
         return null;
     }
 
@@ -223,11 +223,11 @@ public class RequestDefaultStub implements IRequest {
         return new RevokedCertImpl[0];
     }
 
-    public boolean setExtData(String key, Vector data) {
+    public boolean setExtData(String key, Vector<?> data) {
         return false;
     }
 
-    public Vector getExtDataInStringVector(String key) {
+    public Vector<String> getExtDataInStringVector(String key) {
         return null;
     }
 
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java b/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
index efdbfc20a72b60b03dd105183247f680dde59e7a..457f91d9bd730c073c8ede6a4edef9c083396f40 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestRecordTest.java
@@ -62,7 +62,7 @@ public class RequestRecordTest extends CMSBaseTestCase {
 
     public void testAddExtData() throws EBaseException {
         request.setExtData("foo", "bar");
-        Hashtable requestHashValue = new Hashtable();
+        Hashtable<String, String> requestHashValue = new Hashtable<String, String>();
         requestHashValue.put("red", "rum");
         requestHashValue.put("blue", "gin");
         request.setExtData("hashkey", requestHashValue);
@@ -74,9 +74,9 @@ public class RequestRecordTest extends CMSBaseTestCase {
     }
 
     public void testReadExtData() throws EBaseException {
-        Hashtable extData = new Hashtable();
+        Hashtable<String, Object> extData = new Hashtable<String, Object>();
         extData.put("foo", "bar");
-        Hashtable extDataHashValue = new Hashtable();
+        Hashtable<String, String> extDataHashValue = new Hashtable<String, String>();
         extDataHashValue.put("red", "rum");
         extDataHashValue.put("blue", "gin");
         extData.put("hashkey", extDataHashValue);
diff --git a/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java b/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
index 2251cc8c81124a75e3142f365b7e3ddc151c971a..3ca589280ef79452ad649c3277fac8e50d720c3f 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
@@ -69,7 +69,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testIsSimpleExtDataValue() {
         request.mExtData.put("simple1", "foo");
-        request.mExtData.put("complex1", new Hashtable());
+        request.mExtData.put("complex1", new Hashtable<String, Object>());
 
         assertTrue(request.isSimpleExtDataValue("simple1"));
         assertFalse(request.isSimpleExtDataValue("complex1"));
@@ -91,8 +91,9 @@ public class RequestTest extends CMSBaseTestCase {
         assertFalse(request.setExtData("key", (String) null));
     }
 
+    @SuppressWarnings({ "rawtypes", "unchecked" })
     public void testVerifyValidExtDataHashtable() {
-        Hashtable valueHash = new Hashtable();
+        Hashtable<String, String> valueHash = new Hashtable<String, String>();
 
         valueHash.put("key1", "val1");
         valueHash.put("key;2", "val2");
@@ -101,26 +102,18 @@ public class RequestTest extends CMSBaseTestCase {
         valueHash.clear();
         valueHash.put("", "bar");
         assertFalse(request.isValidExtDataHashtableValue(valueHash));
-
-        valueHash.clear();
-        valueHash.put(new Integer("0"), "bar");
-        assertFalse(request.isValidExtDataHashtableValue(valueHash));
-
-        valueHash.clear();
-        valueHash.put("okay", new Integer(5));
-        assertFalse(request.isValidExtDataHashtableValue(valueHash));
-
     }
 
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void testSetExtHashtableData() {
-        Hashtable valueHash = new Hashtable();
+        Hashtable<String, String> valueHash = new Hashtable<String, String>();
 
         valueHash.put("key1", "val1");
         valueHash.put("KEY2", "val2");
 
         request.setExtData("TOPKEY", valueHash);
 
-        Hashtable out = request.getExtDataInHashtable("topkey");
+        Hashtable<String, String> out = request.getExtDataInHashtable("topkey");
         assertNotNull(out);
 
         assertTrue(out.containsKey("key1"));
@@ -137,7 +130,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataInString() {
         request.mExtData.put("strkey", "strval");
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("uh", "oh");
         request.mExtData.put("hashkey", hashValue);
 
@@ -150,11 +143,11 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataInHashtable() {
         request.mExtData.put("strkey", "strval");
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("uh", "oh");
         request.mExtData.put("hashkey", hashValue);
 
-        Hashtable out = request.getExtDataInHashtable("HASHKEY");
+        Hashtable<String, String> out = request.getExtDataInHashtable("HASHKEY");
         assertNotNull(out);
         assertNull(request.getExtDataInHashtable("notfound"));
         assertNull(request.getExtDataInHashtable("strkey"));
@@ -171,7 +164,7 @@ public class RequestTest extends CMSBaseTestCase {
 
     public void testGetExtDataKeys() {
         request.setExtData("FOO", "val1");
-        request.setExtData("bar", new Hashtable());
+        request.setExtData("bar", new Hashtable<String, String>());
 
         assertTrue(TestHelper.enumerationContains(request.getExtDataKeys(), "foo"));
         assertTrue(TestHelper.enumerationContains(request.getExtDataKeys(), "bar"));
@@ -181,14 +174,14 @@ public class RequestTest extends CMSBaseTestCase {
         // creates hashtable first time
         assertNull(request.getExtDataInHashtable("topkey"));
         request.setExtData("TOPKEY", "SUBKEY", "value");
-        Hashtable value = request.getExtDataInHashtable("topkey");
+        Hashtable<String, String> value = request.getExtDataInHashtable("topkey");
         assertNotNull(value);
         assertTrue(value.containsKey("subkey"));
         assertEquals("value", value.get("subkey"));
 
         // adds to existing hashtable
         assertNull(request.getExtDataInHashtable("topkey2"));
-        value = new Hashtable();
+        value = new Hashtable<String, String>();
         value.put("subkey2", "value2");
         request.setExtData("topkey2", value);
         request.setExtData("TOPKEY2", "subkey3", "value3");
@@ -219,7 +212,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetExtDataSubkeyValue() {
-        Hashtable value = new Hashtable();
+        Hashtable<String, String> value = new Hashtable<String, String>();
         value.put("subkey", "value");
 
         request.setExtData("topkey", value);
@@ -259,7 +252,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals(data[2], retval[2]);
 
         // invalid conversion
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("0", "5");
         hashValue.put("1", "bar");
         request.setExtData("topkey2", hashValue);
@@ -298,7 +291,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals(data[2], retval[2]);
 
         // invalid conversion
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("0", "5");
         hashValue.put("1", "bar");
         request.setExtData("topkey2", hashValue);
@@ -357,7 +350,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable) request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>) request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
@@ -376,7 +369,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertTrue(request.setExtData("key", value));
 
         assertTrue(request.mExtData.containsKey("key"));
-        Hashtable hashValue = (Hashtable) request.mExtData.get("key");
+        @SuppressWarnings("unchecked")
+        Hashtable<String, String> hashValue = (Hashtable<String, String>) request.mExtData.get("key");
         assertTrue(hashValue.containsKey("0"));
         assertTrue(hashValue.containsKey("1"));
         assertTrue(hashValue.containsKey("2"));
@@ -394,7 +388,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("orange", retval[3]);
 
         // Try with sparse input
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "square");
         hashValue.put("4", "triangle");
         hashValue.put("6", "octogon");
@@ -411,7 +405,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("octogon", retval[6]);
 
         // invalid conversion
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "foo");
         hashValue.put("badkey", "bar");
         request.setExtData("cory", hashValue);
@@ -422,7 +416,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetSetStringVector() {
-        Vector stringVector = new Vector();
+        Vector<String> stringVector = new Vector<String>();
         stringVector.add("blue");
         stringVector.add("green");
         stringVector.add("red");
@@ -431,7 +425,8 @@ public class RequestTest extends CMSBaseTestCase {
         assertTrue(request.setExtData("key", stringVector));
 
         assertTrue(request.mExtData.containsKey("key"));
-        Hashtable hashValue = (Hashtable) request.mExtData.get("key");
+        @SuppressWarnings("unchecked")
+        Hashtable<String, String> hashValue = (Hashtable<String, String>) request.mExtData.get("key");
         assertTrue(hashValue.containsKey("0"));
         assertTrue(hashValue.containsKey("1"));
         assertTrue(hashValue.containsKey("2"));
@@ -441,7 +436,7 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("red", hashValue.get("2"));
         assertEquals("orange", hashValue.get("3"));
 
-        Vector retval = request.getExtDataInStringVector("key");
+        Vector<String> retval = request.getExtDataInStringVector("key");
         assertEquals(4, retval.size());
         assertEquals("blue", retval.elementAt(0));
         assertEquals("green", retval.elementAt(1));
@@ -449,13 +444,13 @@ public class RequestTest extends CMSBaseTestCase {
         assertEquals("orange", retval.elementAt(3));
 
         // invalid conversion
-        hashValue = new Hashtable();
+        hashValue = new Hashtable<String, String>();
         hashValue.put("0", "foo");
         hashValue.put("badkey", "bar");
         request.setExtData("cory", hashValue);
         assertNull(request.getExtDataInStringVector("cory"));
 
-        assertFalse(request.setExtData("key", (Vector) null));
+        assertFalse(request.setExtData("key", (Vector<?>) null));
     }
 
     public void testGetSetCertInfo() {
@@ -482,7 +477,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable) request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>) request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
@@ -493,7 +488,7 @@ public class RequestTest extends CMSBaseTestCase {
     }
 
     public void testGetBoolean() {
-        Hashtable hashValue = new Hashtable();
+        Hashtable<String, String> hashValue = new Hashtable<String, String>();
         hashValue.put("one", "false");
         hashValue.put("two", "true");
         hashValue.put("three", "on");
@@ -532,7 +527,7 @@ public class RequestTest extends CMSBaseTestCase {
         };
 
         assertTrue(request.setExtData("key", vals));
-        Hashtable hashVals = (Hashtable) request.mExtData.get("key");
+        Hashtable<?, ?> hashVals = (Hashtable<?, ?>) request.mExtData.get("key");
         assertEquals(2, hashVals.keySet().size());
 
         assertFalse(cmsStub.aToBCalled);
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
index b7e6502eea187b5ce95ec9762c97dfb50a53b4c5..18bfb51fc434d6687246501450a5eba531418062 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
@@ -237,8 +237,8 @@ public class CMCEnroll {
             // SHA1 is the default digest Alg for now.
             DigestAlgorithm digestAlg = null;
             SignatureAlgorithm signAlg = SignatureAlgorithm.RSASignatureWithSHA1Digest;
-            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType = ((org.mozilla.jss.crypto.PrivateKey) privKey)
-                    .getType();
+            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType =
+                    ((org.mozilla.jss.crypto.PrivateKey) privKey).getType();
 
             if (signingKeyType.equals(org.mozilla.jss.crypto.PrivateKey.Type.DSA))
                 signAlg = SignatureAlgorithm.DSASignatureWithSHA1Digest;
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
index 00ca4709ed14213a20eb561137c808e04045c609..197f29e15992bf6eadcc7fa83538bd6436db537b 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
@@ -246,8 +246,8 @@ public class CMCRequest {
             // SHA1 is the default digest Alg for now.
             DigestAlgorithm digestAlg = null;
             SignatureAlgorithm signAlg = SignatureAlgorithm.RSASignatureWithSHA1Digest;
-            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType = ((org.mozilla.jss.crypto.PrivateKey) privKey)
-                    .getType();
+            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType =
+                    ((org.mozilla.jss.crypto.PrivateKey) privKey).getType();
 
             if (signingKeyType.equals(org.mozilla.jss.crypto.PrivateKey.Type.DSA))
                 signAlg = SignatureAlgorithm.DSASignatureWithSHA1Digest;
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
index bab8b84fd79560944ca6319d063de0c52e323dbd..3be8167a120e03c4ec916e4627155359d5dc2539 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
@@ -145,8 +145,8 @@ public class CMCRevoke {
             // optional parameter
             if (cValue == null)
                 cValue = new String();
-            if (dValue == null || nValue == null || iValue == null || sValue == null || mValue == null
-                    || hValue == null)
+            if (dValue == null
+                    || nValue == null || iValue == null || sValue == null || mValue == null || hValue == null)
                 bWrongParam = true;
             else if (dValue.length() == 0 || nValue.length() == 0 || iValue.length() == 0 ||
                     sValue.length() == 0 || mValue.length() == 0 || hValue.length() == 0)
@@ -331,23 +331,23 @@ public class CMCRevoke {
             }
             String sn = com.netscape.osutil.OSUtil.BtoA(dig);
 
-            TaggedAttribute senderNonce = new TaggedAttribute(new INTEGER(bpid++),
-                    OBJECT_IDENTIFIER.id_cmc_senderNonce,
-                    new OCTET_STRING(sn.getBytes()));
+            TaggedAttribute senderNonce =
+                    new TaggedAttribute(new INTEGER(bpid++), OBJECT_IDENTIFIER.id_cmc_senderNonce,
+                            new OCTET_STRING(sn.getBytes()));
 
             controlSeq.addElement(senderNonce);
 
             Name subjectName = new Name();
 
             subjectName.addCommonName(iValue);
-            org.mozilla.jss.pkix.cmmf.RevRequest lRevokeRequest = new org.mozilla.jss.pkix.cmmf.RevRequest(new ANY(
-                    (new X500Name(iValue)).getEncoded()),
-                    new INTEGER(sValue),
-                    //org.mozilla.jss.pkix.cmmf.RevRequest.unspecified, 
-                    new ENUMERATED((new Integer(mValue)).longValue()),
-                    //new GeneralizedTime(new Date(lValue)), 
-                    new OCTET_STRING(hValue.getBytes()),
-                    new UTF8String(cValue.toCharArray()));
+            org.mozilla.jss.pkix.cmmf.RevRequest lRevokeRequest =
+                    new org.mozilla.jss.pkix.cmmf.RevRequest(new ANY((new X500Name(iValue)).getEncoded()),
+                            new INTEGER(sValue),
+                            //org.mozilla.jss.pkix.cmmf.RevRequest.unspecified,
+                            new ENUMERATED((new Integer(mValue)).longValue()),
+                            //new GeneralizedTime(new Date(lValue)),
+                            new OCTET_STRING(hValue.getBytes()),
+                            new UTF8String(cValue.toCharArray()));
             //byte[] encoded = ASN1Util.encode(lRevokeRequest);
             //org.mozilla.jss.asn1.ASN1Template template = new  org.mozilla.jss.pkix.cmmf.RevRequest.Template();
             //org.mozilla.jss.pkix.cmmf.RevRequest revRequest = (org.mozilla.jss.pkix.cmmf.RevRequest) 
@@ -356,9 +356,9 @@ public class CMCRevoke {
 
             ByteArrayOutputStream os = new ByteArrayOutputStream();
             //lRevokeRequest.encode(os); // khai
-            TaggedAttribute revokeRequestTag = new TaggedAttribute(new INTEGER(bpid++),
-                    OBJECT_IDENTIFIER.id_cmc_revokeRequest,
-                    lRevokeRequest);
+            TaggedAttribute revokeRequestTag =
+                    new TaggedAttribute(new INTEGER(bpid++), OBJECT_IDENTIFIER.id_cmc_revokeRequest,
+                            lRevokeRequest);
 
             controlSeq.addElement(revokeRequestTag);
             PKIData pkidata = new PKIData(controlSeq, new SEQUENCE(), new SEQUENCE(), new SEQUENCE());
@@ -367,8 +367,8 @@ public class CMCRevoke {
             // SHA1 is the default digest Alg for now.
             DigestAlgorithm digestAlg = null;
             SignatureAlgorithm signAlg = SignatureAlgorithm.RSASignatureWithSHA1Digest;
-            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType = ((org.mozilla.jss.crypto.PrivateKey) privKey)
-                    .getType();
+            org.mozilla.jss.crypto.PrivateKey.Type signingKeyType =
+                    ((org.mozilla.jss.crypto.PrivateKey) privKey).getType();
 
             if (signingKeyType.equals(org.mozilla.jss.crypto.PrivateKey.Type.DSA))
                 signAlg = SignatureAlgorithm.DSASignatureWithSHA1Digest;
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
index a38ff8b967c636858131150a857a267c21e7f5ca..73c56ffea3002b71d4a4f8909d44ced06bfa9d00 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
@@ -370,10 +370,11 @@ public class CRMFPopClient {
 
                 certTemplate.setPublicKey(new SubjectPublicKeyInfo(pair.getPublic()));
                 // set extension
-                AlgorithmIdentifier algS = new AlgorithmIdentifier(new OBJECT_IDENTIFIER("1.2.840.113549.3.7"),
-                        new OCTET_STRING(iv));
-                EncryptedValue encValue = new EncryptedValue(null, algS, new BIT_STRING(session_data, 0), null, null,
-                        new BIT_STRING(key_data, 0));
+                AlgorithmIdentifier algS =
+                        new AlgorithmIdentifier(new OBJECT_IDENTIFIER("1.2.840.113549.3.7"), new OCTET_STRING(iv));
+                EncryptedValue encValue =
+                        new EncryptedValue(null, algS, new BIT_STRING(session_data, 0), null, null, new BIT_STRING(
+                                key_data, 0));
                 EncryptedKey key = new EncryptedKey(encValue);
                 PKIArchiveOptions opt = new PKIArchiveOptions(key);
                 SEQUENCE seq = new SEQUENCE();
@@ -493,10 +494,12 @@ public class CRMFPopClient {
 
                 // post PKCS10 
 
-                url = new URL("http://" + HOST + ":" + PORT
-                        + "/ca/ee/ca/profileSubmit?cert_request_type=crmf&cert_request=" + Req + "&renewal=false&uid="
-                        + USER_NAME + "&xmlOutput=false&&profileId=" + profileName + "&sn_uid=" + USER_NAME
-                        + "&SubId=profile&requestor_name=" + REQUESTOR_NAME);
+                url =
+                        new URL("http://"
+                                + HOST + ":" + PORT + "/ca/ee/ca/profileSubmit?cert_request_type=crmf&cert_request="
+                                + Req + "&renewal=false&uid=" + USER_NAME + "&xmlOutput=false&&profileId="
+                                + profileName + "&sn_uid=" + USER_NAME + "&SubId=profile&requestor_name="
+                                + REQUESTOR_NAME);
                 //System.out.println("Posting " + url);
 
                 System.out.println("");
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
index c2d4e869b62db7b43333e510b3ef0c8c2de1df9e..fc3511f27fb212007b7da25d19d38004a3499298 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java
@@ -54,7 +54,7 @@ public class GenExtKeyUsage {
             }
 
             // Generate vector of object identifiers from command line
-            Vector oids = new Vector();
+            Vector<ObjectIdentifier> oids = new Vector<ObjectIdentifier>();
 
             for (int i = 1; i < args.length; i++) {
                 ObjectIdentifier oid = new ObjectIdentifier(args[i]);
@@ -66,7 +66,7 @@ public class GenExtKeyUsage {
             DerOutputStream contents = new DerOutputStream();
 
             for (int i = 0; i < oids.size(); i++) {
-                contents.putOID((ObjectIdentifier) oids.elementAt(i));
+                contents.putOID(oids.elementAt(i));
             }
 
             // stuff the object identifiers into a SEQUENCE
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
index 671a175f7a25c4f46ec5cd8fc0ca97c63b712425..9d91429273fac666a7f9597027012345ec2d1033 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
@@ -190,7 +190,7 @@ public class PrettyPrintCert {
                 CertificateSubjectName csn = (CertificateSubjectName)
                         certinfo.get(X509CertInfo.SUBJECT);
 
-                Enumeration en = csn.getElements();
+                Enumeration<String> en = csn.getAttributeNames();
 
                 X500Name dname = (X500Name) csn.get(CertificateSubjectName.DN_NAME);
 
diff --git a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
index 39a5d14b608b470e48c0c6692aa10760c094d6a0..b9df360b09b6db332228bccb157af9fe4b6f9c3f 100644
--- a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
+++ b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
@@ -522,14 +522,14 @@ public class EnrollmentService implements IService {
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
             if (!publicKeyModulus.equals(privateKeyModulus)) {
-                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus=" + publicKeyModulus + " privateKeyModulus="
-                        + privateKeyModulus);
+                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus="
+                        + publicKeyModulus + " privateKeyModulus=" + privateKeyModulus);
                 return false;
             }
 
             if (!publicKeyExponent.equals(privateKeyExponent)) {
-                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent=" + publicKeyExponent
-                        + " privateKeyExponent=" + privateKeyExponent);
+                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent="
+                        + publicKeyExponent + " privateKeyExponent=" + privateKeyExponent);
                 return false;
             }
 
@@ -679,8 +679,8 @@ public class EnrollmentService implements IService {
         } catch (IOException e) {
             mKRA.log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_KRA_GET_PUBLIC_KEY", e.toString()));
-            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "[" + CertificateX509Key.KEY
-                    + "]" + e.toString()));
+            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "["
+                    + CertificateX509Key.KEY + "]" + e.toString()));
         }
         return pKey;
     }
@@ -715,13 +715,13 @@ public class EnrollmentService implements IService {
         } catch (IOException e) {
             mKRA.log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_KRA_GET_OWNER_NAME", e.toString()));
-            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "[" + X509CertInfo.SUBJECT + "]"
-                    + e.toString()));
+            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "["
+                    + X509CertInfo.SUBJECT + "]" + e.toString()));
         } catch (CertificateException e) {
             mKRA.log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_KRA_GET_OWNER_NAME", e.toString()));
-            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "[" + X509CertInfo.SUBJECT + "]"
-                    + e.toString()));
+            throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", "["
+                    + X509CertInfo.SUBJECT + "]" + e.toString()));
         }
         String owner = pSub.toString();
 
@@ -905,8 +905,9 @@ class ArchiveOptions {
                 EncryptedContentInfo eCI = env_data.getEncryptedContentInfo();
                 symmAlg = eCI.getContentEncryptionAlgorithm();
                 mSymmAlgOID = symmAlg.getOID().toString();
-                mSymmAlgParams = ((OCTET_STRING) ((ANY) symmAlg.getParameters()).decodeWith(OCTET_STRING.getTemplate()))
-                        .toByteArray();
+                mSymmAlgParams =
+                        ((OCTET_STRING) ((ANY) symmAlg.getParameters()).decodeWith(OCTET_STRING.getTemplate()))
+                                .toByteArray();
 
                 SET recipients = env_data.getRecipientInfos();
                 if (recipients.size() <= 0) {
@@ -931,8 +932,9 @@ class ArchiveOptions {
                 val = key.getEncryptedValue();
                 symmAlg = val.getSymmAlg();
                 mSymmAlgOID = symmAlg.getOID().toString();
-                mSymmAlgParams = ((OCTET_STRING) ((ANY) symmAlg.getParameters()).decodeWith(OCTET_STRING.getTemplate()))
-                        .toByteArray();
+                mSymmAlgParams =
+                        ((OCTET_STRING) ((ANY) symmAlg.getParameters()).decodeWith(OCTET_STRING.getTemplate()))
+                                .toByteArray();
                 BIT_STRING encSymmKey = val.getEncSymmKey();
 
                 mEncSymmKey = encSymmKey.getBits();
diff --git a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
index 7f523f3396214343db6bb7b00c1a7ee8d3fcc1aa..4e35d982cd9cd203385a7d5278143311547fc4bd 100644
--- a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
+++ b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
@@ -119,7 +119,8 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
     protected IRequestNotifier mPNotify = null;
     protected ISubsystem mOwner = null;
     protected int mRecoveryIDCounter = 0;
-    protected Hashtable<String, Hashtable<String, Object>> mRecoveryParams = new Hashtable<String, Hashtable<String, Object>>();
+    protected Hashtable<String, Hashtable<String, Object>> mRecoveryParams =
+            new Hashtable<String, Hashtable<String, Object>>();
     protected org.mozilla.jss.crypto.X509Certificate mJssCert = null;
     protected CryptoToken mKeygenToken = null;
 
@@ -1427,8 +1428,9 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
                 IConfigStore rq = nc.getSubStore(PROP_REQ_IN_Q_SUBSTORE);
                 IAuthority cSub = (IAuthority) this;
 
-                String requestInQListenerClassName = nc.getString("certificateIssuedListenerClassName",
-                        "com.netscape.cms.listeners.RequestInQListener");
+                String requestInQListenerClassName =
+                        nc.getString("certificateIssuedListenerClassName",
+                                "com.netscape.cms.listeners.RequestInQListener");
 
                 try {
                     mReqInQListener = (IRequestListener) Class.forName(requestInQListenerClassName).newInstance();
@@ -1481,7 +1483,8 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
     }
     */
 
-    public Hashtable<String, Hashtable<String, Object>> mVolatileRequests = new Hashtable<String, Hashtable<String, Object>>();
+    public Hashtable<String, Hashtable<String, Object>> mVolatileRequests =
+            new Hashtable<String, Hashtable<String, Object>>();
 
     /**
      * Creates a request object to store attributes that
diff --git a/pki/base/kra/src/com/netscape/kra/RecoveryService.java b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
index 719a55d30685b28fe33e58a1093f75fdb6c74fe1..8958695c1c9fabbb335ec05fe9ea68b8e3ee4a27 100644
--- a/pki/base/kra/src/com/netscape/kra/RecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
@@ -350,14 +350,14 @@ public class RecoveryService implements IService {
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
             if (!publicKeyModulus.equals(privateKeyModulus)) {
-                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus=" + publicKeyModulus + " privateKeyModulus="
-                        + privateKeyModulus);
+                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus="
+                        + publicKeyModulus + " privateKeyModulus=" + privateKeyModulus);
                 return false;
             }
 
             if (!publicKeyExponent.equals(privateKeyExponent)) {
-                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent=" + publicKeyExponent
-                        + " privateKeyExponent=" + privateKeyExponent);
+                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent="
+                        + publicKeyExponent + " privateKeyExponent=" + privateKeyExponent);
                 return false;
             }
 
diff --git a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
index 667bb8987f6aff1355d6703e887fdf70ff3cbece..0b84926d1d895532ae656730d9b65abc8025cebb 100644
--- a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
@@ -558,14 +558,14 @@ public class TokenKeyRecoveryService implements IService {
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
             if (!publicKeyModulus.equals(privateKeyModulus)) {
-                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus=" + publicKeyModulus + " privateKeyModulus="
-                        + privateKeyModulus);
+                CMS.debug("verifyKeyPair modulus mismatch publicKeyModulus="
+                        + publicKeyModulus + " privateKeyModulus=" + privateKeyModulus);
                 return false;
             }
 
             if (!publicKeyExponent.equals(privateKeyExponent)) {
-                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent=" + publicKeyExponent
-                        + " privateKeyExponent=" + privateKeyExponent);
+                CMS.debug("verifyKeyPair exponent mismatch publicKeyExponent="
+                        + publicKeyExponent + " privateKeyExponent=" + privateKeyExponent);
                 return false;
             }
 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java b/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
index 3fd9100bab6f71f28a3e08735a91285bb38e0315..d0222897d79fc0edfed2179a028e57410d53c269 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
@@ -464,7 +464,8 @@ public class CMSLDAP {
 
     public boolean TurnOnSSL(String certPrefix, String certName, String sslport) {
         String dn;
-        String CIPHERS = "-rsa_null_md5,+rsa_fips_3des_sha,+rsa_fips_des_sha,+rsa_3des_sha,+rsa_rc4_128_md5,+rsa_des_sha,+rsa_rc2_40_md5,+rsa_rc4_40_md5";
+        String CIPHERS =
+                "-rsa_null_md5,+rsa_fips_3des_sha,+rsa_fips_des_sha,+rsa_3des_sha,+rsa_rc4_128_md5,+rsa_des_sha,+rsa_rc2_40_md5,+rsa_rc4_40_md5";
 
         try {
             boolean found = false;
@@ -558,7 +559,8 @@ public class CMSLDAP {
         String PASSWORD = args[3];
         String BASEDN = args[4];
 
-        String s = "MIICFzCCAYCgAwIBAgIBBjANBgkqhkiG9w0BAQQFADBDMRswGQYDVQQKExJhY2NlcHRhY25ldGVz\ndDEwMjQxFzAVBgNVBAsTDmFjY2VwdGFuY2V0ZXN0MQswCQYDVQQDEwJjYTAeFw0wMzA0MTEyMTUx\nMzZaFw0wNDA0MTAwOTQ2NTVaMFwxCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNTU0wxHTAbBgNVBAsT\nFHNzbHRlc3QxMDUwMDk3ODkzNzQ1MSAwHgYDVQQDExdqdXBpdGVyMi5uc2NwLmFvbHR3Lm5ldDBc\nMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDCsCTIIQ+bJMfPHi6kwa7HF+/xSTVHcpZ5zsodXsNWjPlD\noRu/5KAO8NotfwGnYmALWdYnqXCF0q0gkaJQalQTAgMBAAGjRjBEMA4GA1UdDwEB/wQEAwIFoDAR\nBglghkgBhvhCAQEEBAMCBkAwHwYDVR0jBBgwFoAUzxZkSySZT/Y3SxGMEiNyHnLUOPAwDQYJKoZI\nhvcNAQEEBQADgYEALtpqMOtZt6j5KlghDFgdg/dvf36nWiZwC1ap6+ka22shLkA/RjmOix97btzT\nQ+8LcmdkAW5iap4YbtrCu0wdN6IbIEXoQI1QGZBoKO2o02utssXANmTnRCyH/GX2KefQlp1NSRj9\nZNZ+GRT2Qk/8G5Ds9vVjm1I5+/AkzI9jS14=";
+        String s =
+                "MIICFzCCAYCgAwIBAgIBBjANBgkqhkiG9w0BAQQFADBDMRswGQYDVQQKExJhY2NlcHRhY25ldGVz\ndDEwMjQxFzAVBgNVBAsTDmFjY2VwdGFuY2V0ZXN0MQswCQYDVQQDEwJjYTAeFw0wMzA0MTEyMTUx\nMzZaFw0wNDA0MTAwOTQ2NTVaMFwxCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNTU0wxHTAbBgNVBAsT\nFHNzbHRlc3QxMDUwMDk3ODkzNzQ1MSAwHgYDVQQDExdqdXBpdGVyMi5uc2NwLmFvbHR3Lm5ldDBc\nMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDCsCTIIQ+bJMfPHi6kwa7HF+/xSTVHcpZ5zsodXsNWjPlD\noRu/5KAO8NotfwGnYmALWdYnqXCF0q0gkaJQalQTAgMBAAGjRjBEMA4GA1UdDwEB/wQEAwIFoDAR\nBglghkgBhvhCAQEEBAMCBkAwHwYDVR0jBBgwFoAUzxZkSySZT/Y3SxGMEiNyHnLUOPAwDQYJKoZI\nhvcNAQEEBQADgYEALtpqMOtZt6j5KlghDFgdg/dvf36nWiZwC1ap6+ka22shLkA/RjmOix97btzT\nQ+8LcmdkAW5iap4YbtrCu0wdN6IbIEXoQI1QGZBoKO2o02utssXANmTnRCyH/GX2KefQlp1NSRj9\nZNZ+GRT2Qk/8G5Ds9vVjm1I5+/AkzI9jS14=";
 
         s = "-----BEGIN CERTIFICATE-----" + "\n" + s + "\n"
                 + "-----END CERTIFICATE-----\n";
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/Request.java b/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
index 9b5a88b15e2efb49020374d392e8045b8537b542..9ee7000136cbb4668717870a263cd77b889d7860 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
@@ -476,7 +476,10 @@ public class Request extends TestClient {
         }
         // System.out.println("Debug : Retrieving cert details ");
 
-        sslclient = clientcert = servercert = emailcert = objectsigningcert = sslcacert = objectsigningcacert = emailcacert = "false";
+        sslclient =
+                clientcert =
+                        servercert =
+                                emailcert = objectsigningcert = sslcacert = objectsigningcacert = emailcacert = "false";
         ret = res.indexOf("header.sslclient =");
         if (ret > 0) {
             sslclient = res.substring(ret + "header.sslclient = ".length() + 1,
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java b/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java
index c5744fe6e79a22eed251949ac424e12d91ad6e83..87161d6897260cbbfcc7892d4c64c58384a9143c 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java
@@ -756,7 +756,8 @@ public class TestClient implements SSLCertificateApprovalCallback {
          *************************************************************
          */
 
-        String TransportCert = "MIICJTCCAY6gAwIBAgIBBTANBgkqhkiG9w0BAQQFADBDMRswGQYDVQQKExJhY2NlcHRhY25ldGVzdDEwMjQxFzAVBgNVBAsTDmFjY2VwdGFuY2V0ZXN0MQswCQYDVQQDEwJjYTAeFw0wMzA0MTgyMjMwMDhaFw0wNDA0MTcxMDI2MDhaMDkxETAPBgNVBAoTCHRlc3QxMDI0MRcwFQYDVQQLEw5hY2NlcHRhbmNldGVzdDELMAkGA1UEAxMCcmEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN6sQ3mSU8mL6i6gTZIXDLzOZPhYOkQLpnJjit5hcPZ0JMn0CQVXo4QjKN1xvuZv8qVlZoQw9czmzp/knTa0sCDgFKd0r+u0TnLeZkJMSimgFnma9CnChlaDHnBd8Beu4vyaHmo7rJ0xA4etn7HjhmKbaQZOcv/aP0SW9JXRga7ZAgMBAAGjMzAxMA4GA1UdDwEB/wQEAwIFIDAfBgNVHSMEGDAWgBSC3fsQHb7fddr2vL0UdkM2dAmUWzANBgkqhkiG9w0BAQQFAAOBgQBkAGbgd9HIqwoLKAr+V6bj9oWesDmDH80gPPxj10qyWSQYIs8PofOs/75yGS9nxhydtgSMFoBgCPdroUI31kZQQlFzxtudGoKD+5MWSXho79XzPwpjheOBYgpX6ch+L4tMLFDpqeraB1yZESO5EEeKm20DGVBOKVWxHhddO1BenA==";
+        String TransportCert =
+                "MIICJTCCAY6gAwIBAgIBBTANBgkqhkiG9w0BAQQFADBDMRswGQYDVQQKExJhY2NlcHRhY25ldGVzdDEwMjQxFzAVBgNVBAsTDmFjY2VwdGFuY2V0ZXN0MQswCQYDVQQDEwJjYTAeFw0wMzA0MTgyMjMwMDhaFw0wNDA0MTcxMDI2MDhaMDkxETAPBgNVBAoTCHRlc3QxMDI0MRcwFQYDVQQLEw5hY2NlcHRhbmNldGVzdDELMAkGA1UEAxMCcmEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN6sQ3mSU8mL6i6gTZIXDLzOZPhYOkQLpnJjit5hcPZ0JMn0CQVXo4QjKN1xvuZv8qVlZoQw9czmzp/knTa0sCDgFKd0r+u0TnLeZkJMSimgFnma9CnChlaDHnBd8Beu4vyaHmo7rJ0xA4etn7HjhmKbaQZOcv/aP0SW9JXRga7ZAgMBAAGjMzAxMA4GA1UdDwEB/wQEAwIFIDAfBgNVHSMEGDAWgBSC3fsQHb7fddr2vL0UdkM2dAmUWzANBgkqhkiG9w0BAQQFAAOBgQBkAGbgd9HIqwoLKAr+V6bj9oWesDmDH80gPPxj10qyWSQYIs8PofOs/75yGS9nxhydtgSMFoBgCPdroUI31kZQQlFzxtudGoKD+5MWSXho79XzPwpjheOBYgpX6ch+L4tMLFDpqeraB1yZESO5EEeKm20DGVBOKVWxHhddO1BenA==";
 
         /*
          CRMFClient	CrmfClient = new CRMFClient(s.GetHostName(),s.GetEEPort());
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java b/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
index 75f94261c3046e7cf231853620d0cc58ca4a9b73..9aaf6c4d944b9300fdc52ed2e23ed44751543802 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/Utilities.java
@@ -20,7 +20,6 @@ package com.netscape.pkisilent.common;
 
 import java.io.DataInputStream;
 import java.io.FileInputStream;
-import java.util.Enumeration;
 
 import netscape.security.x509.CertificateSerialNumber;
 import netscape.security.x509.CertificateSubjectName;
@@ -33,10 +32,6 @@ import netscape.security.x509.X509CertInfo;
 import com.netscape.osutil.OSUtil;
 
 public class Utilities {
-    private static final String keyValueSeparators = "=: \t\r\n\f";
-    private static final String strictKeyValueSeparators = "=:";
-    private static final String specialSaveChars = " \t\r\n\f";
-    private static final String whiteSpaceChars = " \t\r\n\f";
 
     public Utilities() {// Do nothing
     }
@@ -328,9 +323,6 @@ public class Utilities {
             CertificateSubjectName csn1 = (CertificateSubjectName)
                     certinfo.get(X509CertInfo.SUBJECT);
 
-            @SuppressWarnings("unchecked")
-            Enumeration<String> en = csn1.getElements();
-
             X500Name dname = (X500Name) csn1.get(CertificateSubjectName.DN_NAME);
 
             String pp = "";
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 e2d5d156a254e1b32c52ec7371c24531c0af632e..cad7d0ae3452617dea6ce7b84c62d838e5154a01 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -945,10 +945,11 @@ public class CryptoUtil {
             throws CryptoManager.NotInitializedException,
                 TokenException {
         CryptoManager cm = CryptoManager.getInstance();
-        Enumeration enums = cm.getAllTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> enums = cm.getAllTokens();
 
         while (enums.hasMoreElements()) {
-            CryptoToken token = (CryptoToken) enums.nextElement();
+            CryptoToken token = enums.nextElement();
             String tokenName = token.getName();
             CryptoStore store = token.getCryptoStore();
             PrivateKey keys[] = store.getPrivateKeys();
@@ -970,9 +971,10 @@ public class CryptoUtil {
     public static X509CertImpl[] getAllUserCerts()
             throws CryptoManager.NotInitializedException,
                 TokenException {
-        Vector certs = new Vector();
+        Vector<X509CertImpl> certs = new Vector<X509CertImpl>();
         CryptoManager cm = CryptoManager.getInstance();
-        Enumeration enums = cm.getAllTokens();
+        @SuppressWarnings("unchecked")
+        Enumeration<CryptoToken> enums = cm.getAllTokens();
 
         while (enums.hasMoreElements()) {
             CryptoToken token = (CryptoToken) enums.nextElement();
diff --git a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
index 2971706fa2e55bd57fe15932e7ac4d581e599ca8..a5dd108ae37b04026af64ffb4a912f18c5d6ddd5 100644
--- a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -25,6 +25,8 @@ import java.security.PublicKey;
 import java.util.Arrays;
 import java.util.Hashtable;
 
+import netscape.security.pkcs.PKCS10;
+
 import org.mozilla.jss.asn1.ANY;
 import org.mozilla.jss.asn1.ASN1Util;
 import org.mozilla.jss.asn1.INTEGER;
@@ -191,16 +193,16 @@ public class CRSPKIMessage {
     private int rsdVersion;
     private byte[] rsdCert; // certificate to send in response
 
-    private Object myP10;
+    private PKCS10 myP10;
 
-    private Hashtable attrs; // miscellanous
+    private Hashtable<String, Object> attrs; // miscellanous
 
     //   *** END *** //
 
     public void debug() {
     }
 
-    public void put(Object a, Object b) {
+    public void put(String a, Object b) {
         attrs.put(a, b);
     }
 
@@ -475,7 +477,7 @@ public class CRSPKIMessage {
                     certs,
                         null, // no CRL's
                     new SET() // empty SignerInfos
-            );
+                    );
             ContentInfo wrap = new ContentInfo(ContentInfo.SIGNED_DATA,
                     crsd);
 
@@ -606,11 +608,11 @@ public class CRSPKIMessage {
         return aa_digest.toByteArray();
     }
 
-    public Object getP10() {
+    public PKCS10 getP10() {
         return myP10;
     }
 
-    public void setP10(Object p10) {
+    public void setP10(PKCS10 p10) {
         myP10 = p10;
     }
 
@@ -717,11 +719,11 @@ public class CRSPKIMessage {
     }
 
     public CRSPKIMessage() {
-        attrs = new Hashtable();
+        attrs = new Hashtable<String, Object>();
     }
 
     public CRSPKIMessage(ByteArrayInputStream bais) throws InvalidBERException, Exception {
-        attrs = new Hashtable();
+        attrs = new Hashtable<String, Object>();
         decodeCRSPKIMessage(bais);
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java b/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
index 1f5aa4e656f7eba68bf689cfc08932151793b296..0bafcedd072ff608c3f1f01426c962216c5b577b 100644
--- a/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/AuthInfoAccessExtension.java
@@ -62,9 +62,6 @@ import netscape.security.x509.URIName;
  * @version $Revision$, $Date$
  */
 public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 7373316523212538446L;
     public static final String NAME = "AuthInfoAccessExtension";
     public static final String NAME2 = "AuthorityInformationAccess";
@@ -80,7 +77,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
     public static final int OID[] = { 1, 3, 6, 1, 5, 5, 7, 1, 1 };
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mDesc = new Vector();
+    private Vector<AccessDescription> mDesc = new Vector<AccessDescription>();
 
     /**
      * Create the extension from the passed DER encoded value of the same.
@@ -136,7 +133,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
@@ -159,7 +156,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
     }
 
     public AccessDescription getAccessDescription(int pos) {
-        return (AccessDescription) mDesc.elementAt(pos);
+        return mDesc.elementAt(pos);
     }
 
     /**
@@ -190,7 +187,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
 
         for (int i = 0; i < mDesc.size(); i++) {
             DerOutputStream tmp0 = new DerOutputStream();
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             tmp0.putOID(ad.getMethod());
             ad.getLocation().encode(tmp0);
@@ -223,7 +220,7 @@ public class AuthInfoAccessExtension extends Extension implements CertAttrSet {
         String s = super.toString() + "AuthInfoAccess [\n";
 
         for (int i = 0; i < mDesc.size(); i++) {
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             s += "(" + i + ")";
             s += " ";
diff --git a/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java b/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
index 2f402ce2fcbe29d6c9f3b13ca59724302a83d916..018fd71c84bec4c1f44b91eaca22116692ebe909 100644
--- a/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/CertificateRenewalWindowExtension.java
@@ -43,9 +43,6 @@ import netscape.security.x509.Extension;
  */
 public class CertificateRenewalWindowExtension extends Extension
         implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 4470220533545299271L;
     public static final String NAME = "CertificateRenewalWindow";
     public static final int OID[] = { 2, 16, 840, 1, 113730, 1, 15 };
@@ -114,7 +111,7 @@ public class CertificateRenewalWindowExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
diff --git a/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java b/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
index b31bd9985cd98b9bcb356564562463cb7f899e94..16641f36bc7d24106c51a5ecffcac0ad95d5c593 100644
--- a/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/CertificateScopeOfUseExtension.java
@@ -54,7 +54,7 @@ public class CertificateScopeOfUseExtension extends Extension
     public static final int OID[] = { 2, 16, 840, 1, 113730, 1, 17 };
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mEntries = null;
+    private Vector<CertificateScopeEntry> mEntries = null;
 
     static {
         try {
@@ -64,7 +64,7 @@ public class CertificateScopeOfUseExtension extends Extension
         }
     }
 
-    public CertificateScopeOfUseExtension(boolean critical, Vector scopeEntries)
+    public CertificateScopeOfUseExtension(boolean critical, Vector<CertificateScopeEntry> scopeEntries)
             throws IOException {
         this.extensionId = ID;
         this.critical = critical;
@@ -91,7 +91,7 @@ public class CertificateScopeOfUseExtension extends Extension
         return NAME;
     }
 
-    public Vector getCertificateScopeEntries() {
+    public Vector<CertificateScopeEntry> getCertificateScopeEntries() {
         return mEntries;
     }
 
@@ -128,7 +128,7 @@ public class CertificateScopeOfUseExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
@@ -139,7 +139,7 @@ public class CertificateScopeOfUseExtension extends Extension
         if (val.tag != DerValue.tag_Sequence) {
             throw new IOException("Invalid encoding of CertificateWindow extension");
         }
-        mEntries = new Vector();
+        mEntries = new Vector<CertificateScopeEntry>();
         while (val.data.available() != 0) {
             mEntries.addElement(new CertificateScopeEntry(
                     val.data.getDerValue()));
diff --git a/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java b/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
index 5b3f06e91a32c3669d7ce56623cd0dffcf152c83..939da036f7d3466e7affd440e7ac44e4cad32a8b 100644
--- a/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/ExtendedKeyUsageExtension.java
@@ -55,13 +55,13 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
     public static final ObjectIdentifier OID_CODE_SIGNING = new
             ObjectIdentifier(OID_OCSP_SIGNING_STR);
 
-    private Vector oidSet = null;
+    private Vector<ObjectIdentifier> oidSet = null;
     private byte mCached[] = null;
 
     static {
         try {
             OIDMap.addAttribute(ExtendedKeyUsageExtension.class.getName(),
-                    OID, NAME);
+                    OID, ExtendedKeyUsageExtension.NAME);
         } catch (CertificateException e) {
         }
     }
@@ -70,7 +70,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         this(false, null);
     }
 
-    public ExtendedKeyUsageExtension(boolean crit, Vector oids) {
+    public ExtendedKeyUsageExtension(boolean crit, Vector<ObjectIdentifier> oids) {
         try {
             extensionId = ObjectIdentifier.getObjectIdentifier(OID);
         } catch (IOException e) {
@@ -78,9 +78,9 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         }
         critical = crit;
         if (oids != null) {
-            oidSet = (Vector) oids.clone();
+            oidSet = new Vector<ObjectIdentifier>(oids);
         } else {
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         }
         encodeExtValue();
     }
@@ -100,7 +100,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         }
     }
 
-    public Enumeration getOIDs() {
+    public Enumeration<ObjectIdentifier> getOIDs() {
         if (oidSet == null)
             return null;
         return oidSet.elements();
@@ -114,7 +114,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
 
     public void addOID(ObjectIdentifier oid) {
         if (oidSet == null) {
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         }
 
         if (oidSet.contains(oid))
@@ -172,7 +172,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
@@ -192,7 +192,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
             throw new IOException("Invalid encoding of AuthInfoAccess extension");
         }
         if (oidSet == null)
-            oidSet = new Vector();
+            oidSet = new Vector<ObjectIdentifier>();
         while (val.data.available() != 0) {
             DerValue oidVal = val.data.getDerValue();
 
@@ -205,7 +205,7 @@ public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
         DerOutputStream temp = new DerOutputStream();
 
         if (!oidSet.isEmpty()) {
-            Enumeration oidList = oidSet.elements();
+            Enumeration<ObjectIdentifier> oidList = oidSet.elements();
 
             try {
                 while (oidList.hasMoreElements()) {
diff --git a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
index 617ebacd845e85c6d14c22ba6b112eb3fd8b82d6..6e28b4a0ee3e691e18e97af21694fc7a5a4a2eba 100644
--- a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
+++ b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
@@ -34,7 +34,6 @@ import netscape.security.util.BigInt;
 import netscape.security.util.DerOutputStream;
 import netscape.security.util.DerValue;
 import netscape.security.util.ObjectIdentifier;
-
 import netscape.security.x509.CertAttrSet;
 import netscape.security.x509.Extension;
 import netscape.security.x509.OIDMap;
@@ -73,9 +72,9 @@ public class GenericASN1Extension extends Extension
      * Identifier for this attribute, to be used with the
      * get, set, delete methods of Certificate, x509 type.
      */
-    public static String NAME = null;
+    private String name;
     public static String OID = null;
-    public static Hashtable mConfig = null;
+    public static Hashtable<String, String> mConfig = null;
     public static String pattern = null;
     private int index = 0;
 
@@ -177,10 +176,11 @@ public class GenericASN1Extension extends Extension
      * 
      * @param the values to be set for the extension.
      */
-    public GenericASN1Extension(String name, String oid, String pattern, boolean critical, Hashtable config)
+    public GenericASN1Extension(String name, String oid, String pattern, boolean critical,
+            Hashtable<String, String> config)
             throws IOException, ParseException {
         ObjectIdentifier tmpid = new ObjectIdentifier(oid);
-        NAME = name;
+        this.name = name;
         OID = oid;
         mConfig = config;
         this.pattern = pattern;
@@ -202,17 +202,17 @@ public class GenericASN1Extension extends Extension
      * 
      * @param the values to be set for the extension.
      */
-    public GenericASN1Extension(Hashtable config)
+    public GenericASN1Extension(Hashtable<String, String> config)
             throws IOException, ParseException {
         mConfig = config;
         ObjectIdentifier tmpid = new ObjectIdentifier((String) mConfig.get(PROP_OID));
-        NAME = (String) mConfig.get(PROP_NAME);
+        name = (String) mConfig.get(PROP_NAME);
         OID = (String) mConfig.get(PROP_OID);
         pattern = (String) mConfig.get(PROP_PATTERN);
 
         try {
             if (OIDMap.getName(tmpid) == null)
-                OIDMap.addAttribute("GenericASN1Extension", OID, NAME);
+                OIDMap.addAttribute("GenericASN1Extension", OID, name);
         } catch (CertificateException e) {
         }
 
@@ -311,14 +311,14 @@ public class GenericASN1Extension extends Extension
      * Return the name of this attribute.
      */
     public String getName() {
-        return (NAME);
+        return name;
     }
 
     /**
      * Set the name of this attribute.
      */
     public void setName(String name) {
-        NAME = name;
+        this.name = name;
     }
 
     /**
@@ -339,7 +339,7 @@ public class GenericASN1Extension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement("octet");
 
diff --git a/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java b/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
index a09e089c36ba1b03218a7f8e5fe9af903c5cec00..81b8cf5b5656d670517b260e0e375086f87944dc 100644
--- a/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/InhibitAnyPolicyExtension.java
@@ -131,7 +131,7 @@ public class InhibitAnyPolicyExtension
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/KerberosName.java b/pki/base/util/src/netscape/security/extensions/KerberosName.java
index 269775d317d174bd6f50ca5d966b49ca82253c53..0a6a6e2133b7a116a5126030c380ba04ffd0ee1c 100644
--- a/pki/base/util/src/netscape/security/extensions/KerberosName.java
+++ b/pki/base/util/src/netscape/security/extensions/KerberosName.java
@@ -53,9 +53,9 @@ public class KerberosName {
 
     private String m_realm = null;
     private int m_name_type = 0;
-    private Vector m_name_strings = null;
+    private Vector<String> m_name_strings = null;
 
-    public KerberosName(String realm, int name_type, Vector name_strings) {
+    public KerberosName(String realm, int name_type, Vector<String> name_strings) {
         m_realm = realm;
         m_name_type = name_type;
         m_name_strings = name_strings;
@@ -119,7 +119,7 @@ public class KerberosName {
     }
 
     public static void main(String[] argv) {
-        Vector strings = new Vector();
+        Vector<String> strings = new Vector<String>();
         strings.addElement("name");
         KerberosName k = new KerberosName("realm", 0, strings);
 
diff --git a/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java b/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
index 1415478bb1710d15bbc29bb40d59b3b0cb3b0697..04b3038e515aa1a6838e9db626015bfa27f0cf12 100644
--- a/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
@@ -114,7 +114,7 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
                 new MapEntry(OBJECT_SIGNING_CA, 7),
         };
 
-    private static Vector mAttributeNames = new Vector();
+    private static Vector<String> mAttributeNames = new Vector<String>();
 
     static {
         for (int i = 0; i < mMapData.length; ++i) {
@@ -361,7 +361,7 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return mAttributeNames.elements();
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java b/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
index 46abc3c1f8a663d4a349cdadef2d70fc9511a4a1..28da8085f787c8cc3b23e00b04e013f4a1bb8444 100644
--- a/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/OCSPNoCheckExtension.java
@@ -137,7 +137,7 @@ public class OCSPNoCheckExtension extends Extension implements CertAttrSet {
         return null;
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
diff --git a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
index 1dafed19a83db57d23b592e93d9b1ffaf91486e1..a90abe7e354accaf442dca2987ec4b0fa8f4ed69 100644
--- a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
@@ -230,7 +230,7 @@ public class PresenceServerExtension extends Extension implements CertAttrSet {
         throw new IOException("Method not to be called directly.");
     }
 
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java b/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
index 2e9d7935dc1c33e41dca4073f75d3709d6f9461d..d78ad0344633c51c441f159dbc8a7cb86ff1202b 100644
--- a/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/SubjectInfoAccessExtension.java
@@ -44,9 +44,6 @@ import netscape.security.x509.URIName;
  * @version $Revision$, $Date$
  */
 public class SubjectInfoAccessExtension extends Extension implements CertAttrSet {
-    /**
-     *
-     */
     private static final long serialVersionUID = 7237321566602583325L;
 
     public static final String NAME = "SubjectInfoAccessExtension";
@@ -62,7 +59,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
     public static final int OID[] = { 1, 3, 6, 1, 5, 5, 7, 1, 11 };
     public static final ObjectIdentifier ID = new ObjectIdentifier(OID);
 
-    private Vector mDesc = new Vector();
+    private Vector<AccessDescription> mDesc = new Vector<AccessDescription>();
 
     /**
      * Create the extension from the passed DER encoded value of the same.
@@ -118,7 +115,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         // NOT USED
         return null;
     }
@@ -141,7 +138,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
     }
 
     public AccessDescription getAccessDescription(int pos) {
-        return (AccessDescription) mDesc.elementAt(pos);
+        return mDesc.elementAt(pos);
     }
 
     /**
@@ -172,7 +169,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
 
         for (int i = 0; i < mDesc.size(); i++) {
             DerOutputStream tmp0 = new DerOutputStream();
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             tmp0.putOID(ad.getMethod());
             ad.getLocation().encode(tmp0);
@@ -205,7 +202,7 @@ public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
         String s = super.toString() + "AuthInfoAccess [\n";
 
         for (int i = 0; i < mDesc.size(); i++) {
-            AccessDescription ad = (AccessDescription) mDesc.elementAt(i);
+            AccessDescription ad = mDesc.elementAt(i);
 
             s += "(" + i + ")";
             s += " ";
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java b/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
index 520b3e9691d046635c44bf7b5c092b638bf8c530..a649c395a972468f7e1eb2186e69987649a689c7 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
@@ -114,17 +114,18 @@ public class PKCS10Attribute implements DerEncoder, Serializable {
             }
         }
         byte[] val = inAttrValue.toByteArray();
-        Class[] params = { Object.class };
+        Class<?>[] params = { Object.class };
         try {
-            Class extClass = OIDMap.getClass(attributeId);
+            @SuppressWarnings("unchecked")
+            Class<CertAttrSet> extClass = (Class<CertAttrSet>) OIDMap.getClass(attributeId);
             if (extClass != null) {
-                Constructor cons = extClass.getConstructor(params);
+                Constructor<CertAttrSet> cons = (Constructor<CertAttrSet>) extClass.getConstructor(params);
                 Object value = Array.newInstance(byte.class, val.length);
                 for (int i = 0; i < val.length; i++) {
                     Array.setByte(value, i, val[i]);
                 }
                 Object[] passed = new Object[] { value };
-                attributeValue = (CertAttrSet) cons.newInstance(passed);
+                attributeValue = cons.newInstance(passed);
             } else {
                 // attribute classes are usable for PKCS10 attributes. 
                 // this is used where the attributes are not actual 
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java b/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
index ef0f6a4819b591524dd5d93777ff0269cd8dad0e..6a6fd7dc9a6cb39e75e845d2c8106c4c0e72c7af 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS9Attribute.java
@@ -100,7 +100,8 @@ public class PKCS9Attribute implements DerEncoder {
      * attributes to their OIDs. This table contains all name forms
      * that occur in PKCS9, in lower case.
      */
-    private static final Hashtable NAME_OID_TABLE = new Hashtable(28);
+    private static final Hashtable<String, ObjectIdentifier> NAME_OID_TABLE = new Hashtable<String, ObjectIdentifier>(
+            28);
 
     static { // static initializer for PCKS9_NAMES
         NAME_OID_TABLE.put("emailaddress", PKCS9_OIDS[1]);
@@ -124,7 +125,8 @@ public class PKCS9Attribute implements DerEncoder {
      * Hashtable mapping attribute OIDs defined in PKCS9 to the
      * corresponding attribute value type.
      */
-    private static final Hashtable OID_NAME_TABLE = new Hashtable(14);
+    private static final Hashtable<ObjectIdentifier, String> OID_NAME_TABLE = new Hashtable<ObjectIdentifier, String>(
+            14);
     static {
         OID_NAME_TABLE.put(PKCS9_OIDS[1], EMAIL_ADDRESS_STR);
         OID_NAME_TABLE.put(PKCS9_OIDS[2], UNSTRUCTURED_NAME_STR);
@@ -167,7 +169,7 @@ public class PKCS9Attribute implements DerEncoder {
             null, //PublicKey
             null, //SigningDescription
             { Byte.valueOf(DerValue.tag_Sequence) } //ExtensionRequest
-    };
+            };
 
     /**
      * Class types required for values for a given PKCS9
@@ -286,35 +288,25 @@ public class PKCS9Attribute implements DerEncoder {
      * 
      * </TABLE>
      */
-    private static final Class[] VALUE_CLASSES = new Class[15];
+    private static final Class<?>[] VALUE_CLASSES = new Class[15];
 
     static {
-        try {
-            Class str = Class.forName("[Ljava.lang.String;");
+        VALUE_CLASSES[0] = null; // not used
+        VALUE_CLASSES[1] = String[].class; // EMailAddress
+        VALUE_CLASSES[2] = String[].class; // UnstructuredName
+        VALUE_CLASSES[3] = ObjectIdentifier.class; // ContentType
+        VALUE_CLASSES[4] = byte[].class; // MessageDigest (byte[])
+        VALUE_CLASSES[5] = Date.class; // SigningTime
+        VALUE_CLASSES[6] = SignerInfo[].class; // Countersignature
+        VALUE_CLASSES[7] = String.class; // ChallengePassword
+        VALUE_CLASSES[8] = String[].class; // UnstructuredAddress
+        VALUE_CLASSES[9] = null; // ExtendedCertificateAttributes
 
-            VALUE_CLASSES[0] = null; // not used
-            VALUE_CLASSES[1] = str; // EMailAddress
-            VALUE_CLASSES[2] = str; // UnstructuredName
-            VALUE_CLASSES[3] = // ContentType
-            Class.forName("netscape.security.util.ObjectIdentifier");
-            VALUE_CLASSES[4] = Class.forName("[B"); // MessageDigest (byte[])
-            VALUE_CLASSES[5] = Class.forName("java.util.Date"); // SigningTime
-            VALUE_CLASSES[6] = // Countersignature
-            Class.forName("[Lnetscape.security.pkcs.SignerInfo;");
-            VALUE_CLASSES[7] = // ChallengePassword
-            Class.forName("java.lang.String");
-            VALUE_CLASSES[8] = str; // UnstructuredAddress
-            VALUE_CLASSES[9] = null; // ExtendedCertificateAttributes
-
-            VALUE_CLASSES[10] = null; // IssuerAndSerialNumber
-            VALUE_CLASSES[11] = null; // PasswordCheck
-            VALUE_CLASSES[12] = null; // PublicKey
-            VALUE_CLASSES[13] = null; // SigningDescription
-            VALUE_CLASSES[14] = // ExtensionRequest
-            Class.forName("netscape.security.x509.CertificateExtensions"); //xxxx
-        } catch (ClassNotFoundException e) {
-            throw new ExceptionInInitializerError(e.toString());
-        }
+        VALUE_CLASSES[10] = null; // IssuerAndSerialNumber
+        VALUE_CLASSES[11] = null; // PasswordCheck
+        VALUE_CLASSES[12] = null; // PublicKey
+        VALUE_CLASSES[13] = null; // SigningDescription
+        VALUE_CLASSES[14] = CertificateExtensions.class; // ExtensionRequest
     }
 
     /**
diff --git a/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java b/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
index 4c5ab00d810657dfa06ab6bde6dfd56418e9ea02..9780983a5b651e63987ff53c85f2e963b4c6dca2 100644
--- a/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
+++ b/pki/base/util/src/netscape/security/provider/X509CertificateFactory.java
@@ -36,7 +36,7 @@ public class X509CertificateFactory extends CertificateFactorySpi {
         return new X509CertImpl(inStream);
     }
 
-    public Collection engineGenerateCertificates(InputStream inStream)
+    public Collection<Certificate> engineGenerateCertificates(InputStream inStream)
             throws CertificateException {
         return null;
     }
@@ -53,7 +53,7 @@ public class X509CertificateFactory extends CertificateFactorySpi {
         return crl;
     }
 
-    public Collection engineGenerateCRLs(InputStream inStream)
+    public Collection<CRL> engineGenerateCRLs(InputStream inStream)
             throws CRLException {
         return null;
     }
diff --git a/pki/base/util/src/netscape/security/util/CertPrettyPrint.java b/pki/base/util/src/netscape/security/util/CertPrettyPrint.java
index 86449c232c83fd794d5d98c6920e2581449c3ffc..3a8c65fd020d40b0c7007700cfa6e88650d92788 100644
--- a/pki/base/util/src/netscape/security/util/CertPrettyPrint.java
+++ b/pki/base/util/src/netscape/security/util/CertPrettyPrint.java
@@ -125,8 +125,8 @@ public class CertPrettyPrint {
                 SET certs = sd.getCertificates();
 
                 for (int i = 0; i < certs.size(); i++) {
-                    org.mozilla.jss.pkix.cert.Certificate cert = (org.mozilla.jss.pkix.cert.Certificate) certs
-                            .elementAt(i);
+                    org.mozilla.jss.pkix.cert.Certificate cert =
+                            (org.mozilla.jss.pkix.cert.Certificate) certs.elementAt(i);
                     X509CertImpl certImpl = null;
                     try {
                         certImpl = new X509CertImpl(
diff --git a/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java b/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
index afb5d352a0ae60b09aa9cf9dc5fd4e99e801598c..edf1217ea7215007f69eae327b03fc25c0b604d1 100644
--- a/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
+++ b/pki/base/util/src/netscape/security/util/CrlPrettyPrint.java
@@ -26,7 +26,7 @@ import java.util.TimeZone;
 
 import netscape.security.x509.CRLExtensions;
 import netscape.security.x509.Extension;
-import netscape.security.x509.RevokedCertImpl;
+import netscape.security.x509.RevokedCertificate;
 import netscape.security.x509.X509CRLImpl;
 
 /**
@@ -174,15 +174,14 @@ public class CrlPrettyPrint {
                 }
                 sb.append("\n");
 
-                Set revokedCerts = mCRL.getRevokedCertificates();
+                Set<RevokedCertificate> revokedCerts = mCRL.getRevokedCertificates();
 
                 if (revokedCerts != null) {
-                    Iterator i = revokedCerts.iterator();
+                    Iterator<RevokedCertificate> i = revokedCerts.iterator();
                     long l = 1;
 
                     while ((i.hasNext()) && ((crlSize == 0) || (pageStart + pageSize > l))) {
-                        RevokedCertImpl revokedCert =
-                                (RevokedCertImpl) i.next();
+                        RevokedCertificate revokedCert = i.next();
 
                         if ((crlSize == 0) || ((pageStart <= l) && (pageStart + pageSize > l))) {
                             sb.append(pp.indent(16) + resource.getString(
diff --git a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
index 51ddf2321c4b59e9de95fd91a08a627e3d0659ef..90d0d094f8b47e1945eed9fcb004eeb37c074bbc 100644
--- a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
+++ b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java
@@ -504,7 +504,7 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(
                     PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + "\n");
             ExtendedKeyUsageExtension usage = (ExtendedKeyUsageExtension) mExt;
-            Enumeration e = usage.getOIDs();
+            Enumeration<ObjectIdentifier> e = usage.getOIDs();
 
             if (e != null) {
                 while (e.hasMoreElements()) {
@@ -589,8 +589,8 @@ public class ExtPrettyPrint {
 
         try {
             sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER));
-            sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_TYPE) + "- "
-                    + mExt.getExtensionId().toString() + "\n");
+            sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_TYPE)
+                    + "- " + mExt.getExtensionId().toString() + "\n");
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL));
             if (mExt.isCritical()) {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n");
@@ -619,8 +619,8 @@ public class ExtPrettyPrint {
                 sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.EMAIL_CA) + "\n");
             }
             if (((Boolean) type.get(NSCertTypeExtension.OBJECT_SIGNING_CA)).booleanValue()) {
-                sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.OBJECT_SIGNING_CA)
-                        + "\n");
+                sb.append(pp.indent(mIndentSize + 8)
+                        + mResource.getString(NSCertTypeExtension.OBJECT_SIGNING_CA) + "\n");
             }
             return sb.toString();
         } catch (Exception e) {
@@ -637,8 +637,8 @@ public class ExtPrettyPrint {
 
         try {
             sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER));
-            sb.append(mResource.getString(PrettyPrintResources.TOKEN_SKI) + "- " + mExt.getExtensionId().toString()
-                    + "\n");
+            sb.append(mResource.getString(PrettyPrintResources.TOKEN_SKI)
+                    + "- " + mExt.getExtensionId().toString() + "\n");
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL));
             if (mExt.isCritical()) {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n");
@@ -666,8 +666,8 @@ public class ExtPrettyPrint {
 
         try {
             sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER));
-            sb.append(mResource.getString(PrettyPrintResources.TOKEN_AKI) + "- " + mExt.getExtensionId().toString()
-                    + "\n");
+            sb.append(mResource.getString(PrettyPrintResources.TOKEN_AKI)
+                    + "- " + mExt.getExtensionId().toString() + "\n");
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL));
             if (mExt.isCritical()) {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n");
@@ -973,12 +973,12 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL));
             CertificateScopeOfUseExtension ext = (CertificateScopeOfUseExtension) mExt;
 
-            if (((Extension) mExt).isCritical()) {
+            if (mExt.isCritical()) {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n");
             } else {
                 sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n");
             }
-            Vector entries = ext.getCertificateScopeEntries();
+            Vector<CertificateScopeEntry> entries = ext.getCertificateScopeEntries();
 
             if (entries != null) {
                 sb.append(pp.indent(mIndentSize + 4) +
@@ -1474,7 +1474,7 @@ public class ExtPrettyPrint {
             }
 
             PolicyMappingsExtension ext = (PolicyMappingsExtension) mExt;
-            Enumeration maps = ext.getMappings();
+            Enumeration<CertificatePolicyMap> maps = ext.getMappings();
 
             sb.append(pp.indent(mIndentSize + 4) +
                     mResource.getString(PrettyPrintResources.TOKEN_MAPPINGS));
@@ -1530,7 +1530,7 @@ public class ExtPrettyPrint {
 
             sb.append(pp.indent(mIndentSize + 4) +
                     mResource.getString(PrettyPrintResources.TOKEN_ATTRIBUTES));
-            Enumeration attrs = ext.getAttributesList();
+            Enumeration<Attribute> attrs = ext.getAttributesList();
 
             if (attrs == null || !attrs.hasMoreElements()) {
                 sb.append(
@@ -1550,7 +1550,7 @@ public class ExtPrettyPrint {
                     sb.append(pp.indent(mIndentSize + 12) +
                             mResource.getString(
                                     PrettyPrintResources.TOKEN_VALUES));
-                    Enumeration values = attr.getValues();
+                    Enumeration<String> values = attr.getValues();
 
                     if (values == null || !values.hasMoreElements()) {
                         sb.append(mResource.getString(
@@ -1593,15 +1593,16 @@ public class ExtPrettyPrint {
             sb.append(pp.indent(mIndentSize + 4) + mResource.getString(
                     PrettyPrintResources.TOKEN_CERT_POLICIES) + "\n");
             CertificatePoliciesExtension cp = (CertificatePoliciesExtension) mExt;
-            Vector cpv = (Vector) cp.get("infos");
-            Enumeration e = cpv.elements();
+            @SuppressWarnings("unchecked")
+            Vector<CertificatePolicyInfo> cpv = (Vector<CertificatePolicyInfo>) cp.get("infos");
+            Enumeration<CertificatePolicyInfo> e = cpv.elements();
 
             if (e != null) {
                 while (e.hasMoreElements()) {
-                    CertificatePolicyInfo cpi = (CertificatePolicyInfo) e.nextElement();
+                    CertificatePolicyInfo cpi = e.nextElement();
 
-                    sb.append(pp.indent(mIndentSize + 8) + "Policy Identifier: "
-                            + cpi.getPolicyIdentifier().getIdentifier().toString() + "\n");
+                    sb.append(pp.indent(mIndentSize + 8)
+                            + "Policy Identifier: " + cpi.getPolicyIdentifier().getIdentifier().toString() + "\n");
                     PolicyQualifiers cpq = cpi.getPolicyQualifiers();
                     if (cpq != null) {
                         for (int i = 0; i < cpq.size(); i++) {
@@ -1611,8 +1612,8 @@ public class ExtPrettyPrint {
                                 sb.append(pp.indent(mIndentSize + 12)
                                         + "Policy Qualifier Identifier: CPS Pointer Qualifier - "
                                         + pq.getId() + "\n");
-                                sb.append(pp.indent(mIndentSize + 12) + "Policy Qualifier Data: "
-                                        + ((CPSuri) q).getURI() + "\n");
+                                sb.append(pp.indent(mIndentSize + 12)
+                                        + "Policy Qualifier Data: " + ((CPSuri) q).getURI() + "\n");
                             } else if (q instanceof UserNotice) {
                                 sb.append(pp.indent(mIndentSize + 12)
                                         + "Policy Qualifier Identifier: CPS User Notice Qualifier - "
@@ -1621,8 +1622,8 @@ public class ExtPrettyPrint {
                                 DisplayText dt = ((UserNotice) q).getDisplayText();
                                 sb.append(pp.indent(mIndentSize + 12) + "Policy Qualifier Data: \n");
                                 if (nref != null) {
-                                    sb.append(pp.indent(mIndentSize + 16) + "Organization: "
-                                            + nref.getOrganization().toString() + "\n");
+                                    sb.append(pp.indent(mIndentSize + 16)
+                                            + "Organization: " + nref.getOrganization().toString() + "\n");
                                     sb.append(pp.indent(mIndentSize + 16) + "Notice Numbers: ");
                                     int[] nums = nref.getNumbers();
                                     for (int k = 0; k < nums.length; k++) {
diff --git a/pki/base/util/src/netscape/security/x509/ACertAttrSet.java b/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
index 57d9445c3a594aa8a264cb13157e25abaace6ea5..8a757d7f5c849ab871dbdf42951e16e51e0721f1 100755
--- a/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
+++ b/pki/base/util/src/netscape/security/x509/ACertAttrSet.java
@@ -126,7 +126,7 @@ public class ACertAttrSet implements CertAttrSet {
      * 
      * @return an enumeration of the attribute names.
      */
-    public Enumeration getElements() {
+    public Enumeration<String> getAttributeNames() {
         return null;
     }
 
diff --git a/pki/base/util/src/netscape/security/x509/AlgorithmId.java b/pki/base/util/src/netscape/security/x509/AlgorithmId.java
index a30d45ca04cfede286fb4ca33f4fc0c35ee56c2a..b0113af4162406585133ada08849879309184107 100644
--- a/pki/base/util/src/netscape/security/x509/AlgorithmId.java
+++ b/pki/base/util/src/netscape/security/x509/AlgorithmId.java
@@ -760,7 +760,8 @@ public class AlgorithmId implements Serializable, DerEncoder {
      * All supported signing algorithms.
      */
     public static final String[] ALL_SIGNING_ALGORITHMS = new String[]
-    { "SHA1withRSA", "MD5withRSA", "MD2withRSA", "SHA1withDSA", "SHA256withRSA", "SHA512withRSA", "SHA1withEC",
+    {
+            "SHA1withRSA", "MD5withRSA", "MD2withRSA", "SHA1withDSA", "SHA256withRSA", "SHA512withRSA", "SHA1withEC",
             "SHA256withEC", "SHA384withEC", "SHA512withEC" };
 
 }
diff --git a/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java b/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
index b7f84f9f7c57fd12de41f1695bd5833d5c5f3a25..91b6c2598d90e137534940557552239753f3dcf4 100644
--- a/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
+++ b/pki/base/util/src/netscape/security/x509/AuthorityKeyIdentifierExtension.java
@@ -322,7 +322,7 @@ public class AuthorityKeyIdentifierExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY_ID);
         elements.addElement(AUTH_NAME);
diff --git a/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
index 5846296d1ace936f870488d6957091c3e1aa9313..2688e961db1ad0c044574a2ca2ed82d60d0d5fd8 100644
--- a/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
@@ -278,7 +278,7 @@ public class BasicConstraintsExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(IS_CA);
         elements.addElement(PATH_LEN);
diff --git a/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java b/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
index a15c1099f3a42cfd9ed6c196e1e7a8fc6056311b..c939a7431718d3d7fc5e5df02f2db034003cbbbd 100644
--- a/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLDistributionPointsExtension.java
@@ -227,8 +227,11 @@ public class CRLDistributionPointsExtension extends Extension
                 "CertAttrSet:CRLDistributionPointsExtension");
     }
 
-    public Enumeration getElements() {
-        return (new Vector()).elements();
+    /*
+     *	TODO use an empty collection to generate these
+     */
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
     public String getName() {
diff --git a/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java b/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
index e3965753c8c43131e537b76c3c718647a2a48234..7c89b179fe8c63054161768a0db18c341889f43e 100755
--- a/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLNumberExtension.java
@@ -211,7 +211,7 @@ public class CRLNumberExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java b/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
index 22fbe894fe5e28abb2c2abbb8db9eb1305a6896c..3c11fc70bcc9c6195150fbd1aaef5f7ad2a5a4b7 100644
--- a/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CRLReasonExtension.java
@@ -207,7 +207,7 @@ public final class CRLReasonExtension extends Extension implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(REASON);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertAttrSet.java b/pki/base/util/src/netscape/security/x509/CertAttrSet.java
index 9584326686faddb786cffab17aa71c9abd185681..7e8d6db82479ef728c31f2a37be51d7c56e61a4d 100755
--- a/pki/base/util/src/netscape/security/x509/CertAttrSet.java
+++ b/pki/base/util/src/netscape/security/x509/CertAttrSet.java
@@ -109,7 +109,7 @@ public interface CertAttrSet {
      * 
      * @return an enumeration of the attribute names.
      */
-    Enumeration getElements();
+    Enumeration<String> getAttributeNames();
 
     /**
      * Returns the name (identifier) of this CertAttrSet.
diff --git a/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java b/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
index 1105dc4fdbcbb96fbc0d996a45bb94295f9fc0a7..41610844e8f02c8bcbdde6bd76b3cdebd7265a5b 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateAlgorithmId.java
@@ -174,7 +174,7 @@ public class CertificateAlgorithmId implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ALGORITHM);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/CertificateExtensions.java b/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
index 7cd2b73c669df1a90111c4b34a56c179a21a7bc5..b9667d8f6a1f5ebb90e7dd8f5a3ee89accd9e4d7 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateExtensions.java
@@ -43,7 +43,7 @@ import netscape.security.util.DerValue;
  * @version 1.11
  * @see CertAttrSet
  */
-public class CertificateExtensions extends Vector
+public class CertificateExtensions extends Vector<Extension>
         implements CertAttrSet, Serializable {
     /**
      *
@@ -59,12 +59,13 @@ public class CertificateExtensions extends Vector
      */
     public static final String NAME = "extensions";
 
-    private Hashtable<String, Object> map;
+    private Hashtable<String, Extension> map;
 
     // Parse the encoded extension
     public void parseExtension(Extension ext) throws IOException {
         try {
-            Class extClass = OIDMap.getClass(ext.getExtensionId());
+            @SuppressWarnings("unchecked")
+            Class<CertAttrSet> extClass = (Class<CertAttrSet>) OIDMap.getClass(ext.getExtensionId());
             if (extClass == null) { // Unsupported extension
                 if (ext.isCritical()) {
                     throw new IOException("Unsupported CRITICAL extension: "
@@ -75,8 +76,8 @@ public class CertificateExtensions extends Vector
                     return;
                 }
             }
-            Class[] params = { Boolean.class, Object.class };
-            Constructor cons = extClass.getConstructor(params);
+            Class<?>[] params = { Boolean.class, Object.class };
+            Constructor<CertAttrSet> cons = extClass.getConstructor(params);
 
             byte[] extData = ext.getExtensionValue();
             int extLen = extData.length;
@@ -87,7 +88,7 @@ public class CertificateExtensions extends Vector
             }
             Object[] passed = new Object[] { new Boolean(ext.isCritical()),
                     value };
-            CertAttrSet certExt = (CertAttrSet) cons.newInstance(passed);
+            CertAttrSet certExt = cons.newInstance(passed);
             if (certExt != null && certExt.getName() != null) {
                 map.put(certExt.getName(), (Extension) certExt);
                 addElement((Extension) certExt);
@@ -105,7 +106,7 @@ public class CertificateExtensions extends Vector
      * Default constructor for the certificate attribute.
      */
     public CertificateExtensions() {
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
     }
 
     /**
@@ -117,7 +118,7 @@ public class CertificateExtensions extends Vector
     public CertificateExtensions(DerInputStream in)
             throws IOException {
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = in.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -136,7 +137,7 @@ public class CertificateExtensions extends Vector
         DerValue val = new DerValue(in);
         DerInputStream str = val.toDerInputStream();
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -160,7 +161,7 @@ public class CertificateExtensions extends Vector
             str = val.toDerInputStream();
         }
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -217,8 +218,8 @@ public class CertificateExtensions extends Vector
      * @exception IOException if the object could not be cached.
      */
     public void set(String name, Object obj) throws IOException {
-        map.put(name, obj);
-        addElement(obj);
+        map.put(name, (Extension) obj);
+        addElement((Extension) obj);
     }
 
     /**
@@ -250,7 +251,7 @@ public class CertificateExtensions extends Vector
         removeElement(obj);
     }
 
-    public Enumeration getNames() {
+    public Enumeration<String> getNames() {
         return map.keys();
     }
 
@@ -258,10 +259,14 @@ public class CertificateExtensions extends Vector
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
+    public Enumeration<Extension> getAttributes() {
         return (map.elements());
     }
 
+    public Enumeration<String> getAttributeNames() {
+        return (map.keys());
+    }
+
     /**
      * Return the name of this attribute.
      */
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
index 490c087bb297eba75ebd3a2d6c720d8e02990f37..774116bcc16ce825132c57d3d19816395601e3cf 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java
@@ -226,7 +226,7 @@ public class CertificateIssuerExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(CERTIFICATE_ISSUER);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
index 83bea856c638e023b1057062108871d0889e9fbb..a2f9026c197d07c075df1432024f4efdb1eb6384 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerName.java
@@ -156,7 +156,7 @@ public class CertificateIssuerName implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DN_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
index f54b1e0b939a2c1d8b8d01041fb5330a354a1d6f..351116ffbcaae80364abd137d74ee257e2b3ab4f 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerUniqueIdentity.java
@@ -169,7 +169,7 @@ public class CertificateIssuerUniqueIdentity implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ID);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java b/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
index d4e1cf86a16635872896098fbb5e5d0c76357e96..1c72e7fa3a3ebac67fb9e8bf700410f3f8297ca6 100644
--- a/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
+++ b/pki/base/util/src/netscape/security/x509/CertificatePoliciesExtension.java
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Vector;
 
@@ -221,15 +223,23 @@ public class CertificatePoliciesExtension extends Extension
     }
 
     /**
-     * Return an enumeration of names of attributes existing within this
+     * Return an enumeration of attributes existing within this
      * attribute.
      */
-    public Enumeration<Vector<CertificatePolicyInfo>> getElements() {
+    public Enumeration<Vector<CertificatePolicyInfo>> getAttributes() {
         Vector<Vector<CertificatePolicyInfo>> elements = new Vector<Vector<CertificatePolicyInfo>>();
         elements.addElement(mInfos);
         return (elements.elements());
     }
 
+    private static final String[] NAMES = { INFOS };
+
+    @Override
+    public Enumeration<String> getAttributeNames() {
+        // TODO Auto-generated method stub
+        return Collections.enumeration(Arrays.asList(NAMES));
+    }
+
     /**
      * Return the name of this attribute.
      */
@@ -322,4 +332,5 @@ public class CertificatePoliciesExtension extends Extension
             System.out.println(e.toString());
         }
     }
+
 }
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java b/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
index de1e794d56ee165c4182038c7e0c6181c3342551..e9655178f4c4733c427ea7018cefed6a1d352ef2 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSerialNumber.java
@@ -175,7 +175,7 @@ public class CertificateSerialNumber implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java b/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
index 227dc41e1fd8891b8ee590a3b905bfca12a7615b..6159638b9843d2c4040b115b0c0f5623502a5f56 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSubjectName.java
@@ -187,7 +187,7 @@ public class CertificateSubjectName implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DN_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java b/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
index c8e06fb385b56691f30d9bdfdff3d185b1d18ce3..51687e86dddfdf6ba43291dad649f2e8c3ca2f00 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateSubjectUniqueIdentity.java
@@ -169,7 +169,7 @@ public class CertificateSubjectUniqueIdentity implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ID);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateValidity.java b/pki/base/util/src/netscape/security/x509/CertificateValidity.java
index c54da58b254ad6bf4a1129176b4986e5706e0ace..0c2c841b020955db59e4e5672ff9208355e5b87b 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateValidity.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateValidity.java
@@ -247,7 +247,7 @@ public class CertificateValidity implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NOT_BEFORE);
         elements.addElement(NOT_AFTER);
diff --git a/pki/base/util/src/netscape/security/x509/CertificateVersion.java b/pki/base/util/src/netscape/security/x509/CertificateVersion.java
index 9b976e2028e58d1d2165b1f2a29985bdbc22f9dd..d3659779f8398bb254048b03b698cc3636aca78c 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateVersion.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateVersion.java
@@ -224,7 +224,7 @@ public class CertificateVersion implements CertAttrSet {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(VERSION);
 
diff --git a/pki/base/util/src/netscape/security/x509/CertificateX509Key.java b/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
index 58c18f084c5d542cf90d102da9ddc236bc0eb2a4..c7003bb8ef5c2cd1e19f9a958b139e5ff24b6b94 100644
--- a/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
+++ b/pki/base/util/src/netscape/security/x509/CertificateX509Key.java
@@ -174,7 +174,7 @@ public class CertificateX509Key implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY);
 
diff --git a/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java b/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
index 6e8f9fa0242014d3ee8894b55b3ecd59d65ede64..da870f4fdf15a9213d083ab25b8b23a0c538301e 100755
--- a/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
+++ b/pki/base/util/src/netscape/security/x509/DeltaCRLIndicatorExtension.java
@@ -224,7 +224,7 @@ public class DeltaCRLIndicatorExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NUMBER);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/Extensions.java b/pki/base/util/src/netscape/security/x509/Extensions.java
index 63856300ee39d5b09d67742f3a821d085417c6a1..622367ab606fedd69aaba84c911cedb0170eadc8 100644
--- a/pki/base/util/src/netscape/security/x509/Extensions.java
+++ b/pki/base/util/src/netscape/security/x509/Extensions.java
@@ -40,7 +40,7 @@ import netscape.security.util.DerValue;
  * @version 1.11
  * @see CertAttrSet
  */
-public class Extensions extends Vector
+public class Extensions extends Vector<Extension>
         implements CertAttrSet {
     /**
      *
@@ -56,12 +56,13 @@ public class Extensions extends Vector
      */
     public static final String NAME = "extensions";
 
-    private Hashtable map;
+    private Hashtable<String, Extension> map;
 
     // Parse the encoded extension
     public void parseExtension(Extension ext) throws IOException {
         try {
-            Class extClass = OIDMap.getClass(ext.getExtensionId());
+            @SuppressWarnings("unchecked")
+            Class<CertAttrSet> extClass = (Class<CertAttrSet>) OIDMap.getClass(ext.getExtensionId());
             if (extClass == null) { // Unsupported extension
                 if (ext.isCritical()) {
                     throw new IOException("Unsupported CRITICAL extension: "
@@ -72,8 +73,8 @@ public class Extensions extends Vector
                     return;
                 }
             }
-            Class[] params = { Boolean.class, Object.class };
-            Constructor cons = extClass.getConstructor(params);
+            Class<?>[] params = { Boolean.class, Object.class };
+            Constructor<CertAttrSet> cons = extClass.getConstructor(params);
 
             byte[] extData = ext.getExtensionValue();
             int extLen = extData.length;
@@ -84,9 +85,9 @@ public class Extensions extends Vector
             }
             Object[] passed = new Object[] { new Boolean(ext.isCritical()),
                                                         value };
-            CertAttrSet certExt = (CertAttrSet) cons.newInstance(passed);
-            map.put(certExt.getName(), certExt);
-            addElement(certExt);
+            CertAttrSet certExt = cons.newInstance(passed);
+            map.put(certExt.getName(), (Extension) certExt);
+            addElement((Extension) certExt);
 
         } catch (NoSuchMethodException nosuch) {
             throw new IOException(nosuch.toString());
@@ -101,7 +102,7 @@ public class Extensions extends Vector
      * Default constructor for the certificate attribute.
      */
     public Extensions() {
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
     }
 
     /**
@@ -113,7 +114,7 @@ public class Extensions extends Vector
     public Extensions(DerInputStream in)
             throws IOException {
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = in.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -132,7 +133,7 @@ public class Extensions extends Vector
         DerValue val = new DerValue(in);
         DerInputStream str = val.toDerInputStream();
 
-        map = new Hashtable();
+        map = new Hashtable<String, Extension>();
         DerValue[] exts = str.getSequence(5);
 
         for (int i = 0; i < exts.length; i++) {
@@ -175,8 +176,8 @@ public class Extensions extends Vector
      * @exception IOException if the object could not be cached.
      */
     public void set(String name, Object obj) throws IOException {
-        map.put(name, obj);
-        addElement(obj);
+        map.put(name, (Extension) obj);
+        addElement((Extension) obj);
     }
 
     /**
@@ -212,8 +213,8 @@ public class Extensions extends Vector
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
-        return (map.elements());
+    public Enumeration<String> getAttributeNames() {
+        return map.keys();
     }
 
     /**
diff --git a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
index 5d7bd50b690370b0f1a207238f9fb3c37a391665..320bbf3df24df42461626b833fc820091ec9baa7 100644
--- a/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
+++ b/pki/base/util/src/netscape/security/x509/FreshestCRLExtension.java
@@ -233,8 +233,11 @@ public class FreshestCRLExtension extends Extension
                 "CertAttrSet:FreshestCRLExtension");
     }
 
-    public Enumeration getElements() {
-        return (new Vector()).elements();
+    /*
+     * TODO replacewith empty collection
+     */
+    public Enumeration<String> getAttributeNames() {
+        return (new Vector<String>()).elements();
     }
 
     public String getName() {
diff --git a/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java b/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
index 80324f8d891c16cbc6175b12d19e61c7bc3c663d..b42bb6ac91268ea49d6d2cc1790508d3a858599a 100644
--- a/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
+++ b/pki/base/util/src/netscape/security/x509/HoldInstructionExtension.java
@@ -339,7 +339,7 @@ public class HoldInstructionExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(HOLD_INSTRUCTION);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java b/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
index 73e76087fccfa1c1a4620bb292af86c8dbd02e49..44c76275f17179bcb129982b1c7202f7c6445308 100755
--- a/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
+++ b/pki/base/util/src/netscape/security/x509/InvalidityDateExtension.java
@@ -226,7 +226,7 @@ public class InvalidityDateExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(INVALIDITY_DATE);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java b/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
index a21d3ac3254a6b0ae5ccc690b3e6137c9c1d194e..df0289f9e008fc059d4bf67dda055df3513e9fe0 100644
--- a/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuerAlternativeNameExtension.java
@@ -224,7 +224,7 @@ public class IssuerAlternativeNameExtension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ISSUER_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
index 9eb9d14a9d21ef48aa80d0bfed29c7b13ede8a48..fc7e837ce9d5b30e131fe0d315cf81c5d01c7783 100644
--- a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
@@ -340,7 +340,7 @@ public class IssuingDistributionPointExtension extends Extension
         }
     }
 
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(ISSUING_DISTRIBUTION_POINT);
         return (elements.elements());
diff --git a/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java b/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
index 043208806f993bbfa6eb767ca16858cb88028b38..56084dbcfd7d83fbc98280af441bda39b22c0ecd 100644
--- a/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/x509/KeyUsageExtension.java
@@ -386,7 +386,7 @@ public class KeyUsageExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(DIGITAL_SIGNATURE);
         elements.addElement(NON_REPUDIATION);
diff --git a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
index 5ac3357cec9bde2fcda8f6e96fc3055214dbb26b..b24ce1158881ee68bc41e6cc9de9b23f9dae4af4 100644
--- a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
+++ b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
@@ -58,7 +58,7 @@ public class NSCCommentExtension extends Extension
     public String mComment = null;
 
     // Private data members 
-    private Vector mInfos;
+    private Vector<Object> mInfos;
 
     private PrettyPrintFormat pp = new PrettyPrintFormat(":");
 
@@ -90,7 +90,7 @@ public class NSCCommentExtension extends Extension
     public NSCCommentExtension(boolean critical) {
         this.extensionId = new ObjectIdentifier("2.16.840.1.113730.1.13");
         this.critical = critical;
-        mInfos = new Vector(1, 1);
+        mInfos = new Vector<Object>(1, 1);
     }
 
     /**
@@ -171,6 +171,7 @@ public class NSCCommentExtension extends Extension
     /**
      * Set the attribute value.
      */
+    @SuppressWarnings("unchecked")
     public void set(String name, Object obj) throws IOException {
         clearValue();
         if (name.equalsIgnoreCase(INFOS)) {
@@ -178,7 +179,7 @@ public class NSCCommentExtension extends Extension
                 throw new IOException("Attribute value should be of" +
                                     " type Vector.");
             }
-            mInfos = (Vector) obj;
+            mInfos = (Vector<Object>) obj;
         } else {
             throw new IOException("Attribute name not recognized by " +
                         "CertAttrSet:NSCCommentExtension.");
@@ -213,9 +214,9 @@ public class NSCCommentExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration getElements() {
-        Vector elements = new Vector();
-        elements.addElement(mInfos);
+    public Enumeration<String> getAttributeNames() {
+        Vector<String> elements = new Vector<String>();
+        elements.addElement(INFOS);
         return (elements.elements());
     }
 
diff --git a/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
index d3ca8c11625b41fad0a834b533fa19cc044624e3..948d0d8c9f519c39a6d26806a2a02bdcfa3bee67 100644
--- a/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/NameConstraintsExtension.java
@@ -298,7 +298,7 @@ public class NameConstraintsExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(PERMITTED_SUBTREES);
         elements.addElement(EXCLUDED_SUBTREES);
diff --git a/pki/base/util/src/netscape/security/x509/OIDMap.java b/pki/base/util/src/netscape/security/x509/OIDMap.java
index d97d060bad536fa02734e8170042073ad5809194..9c732d9386772d2a1c08bb463da6c7743b03be0a 100644
--- a/pki/base/util/src/netscape/security/x509/OIDMap.java
+++ b/pki/base/util/src/netscape/security/x509/OIDMap.java
@@ -78,13 +78,13 @@ public class OIDMap {
     private static final String POLICY_CONSTRAINTS = ROOT + "." +
                                           PolicyConstraintsExtension.NAME;
     private static final String CERT_POLICIES = //ROOT + "." +
-    CertificatePoliciesExtension.NAME;
+            CertificatePoliciesExtension.NAME;
     private static final String SUBJ_DIR_ATTR = //ROOT + "." +
-    SubjectDirAttributesExtension.NAME;
+            SubjectDirAttributesExtension.NAME;
     public static final String EXT_KEY_USAGE_NAME = "ExtendedKeyUsageExtension";
     public static final String EXT_INHIBIT_ANY_POLICY_NAME = "InhibitAnyPolicyExtension";
     private static final String EXT_KEY_USAGE = //ROOT + "." +
-    EXT_KEY_USAGE_NAME;
+            EXT_KEY_USAGE_NAME;
 
     private static final String CRL_NUMBER = ROOT + "." +
                                           CRLNumberExtension.NAME;
diff --git a/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java b/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
index 194903dd590c6b4ebe5861f0ec4296ed31185dcc..7d98b21ba5c68dca2ba825524bd72a9d744ddfcc 100644
--- a/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PolicyConstraintsExtension.java
@@ -275,7 +275,7 @@ public class PolicyConstraintsExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(REQUIRE);
         elements.addElement(INHIBIT);
diff --git a/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java b/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
index 6f2e583bca216ada928131e6526ca60584ec2d3d..9bdfb611bd07edfb41120aa1f00eeb18df83b3fa 100644
--- a/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PolicyMappingsExtension.java
@@ -190,6 +190,7 @@ public class PolicyMappingsExtension extends Extension
     /**
      * Set the attribute value.
      */
+    @SuppressWarnings("unchecked")
     public void set(String name, Object obj) throws IOException {
         clearValue();
         if (name.equalsIgnoreCase(MAP)) {
@@ -232,7 +233,7 @@ public class PolicyMappingsExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(MAP);
 
diff --git a/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java b/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
index a384436445015d2e9e7ce26aee28b199fb079e90..e3ecdb33d49b1dcdc4612996117be56190f972f3 100644
--- a/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
+++ b/pki/base/util/src/netscape/security/x509/PrivateKeyUsageExtension.java
@@ -322,7 +322,7 @@ public class PrivateKeyUsageExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(NOT_BEFORE);
         elements.addElement(NOT_AFTER);
diff --git a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
index 3271768f7925dd328d3717cd9b9ddbb6de65a400..345694fb1d84b77d43b4b179aa7f51064bd9560e 100755
--- a/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/RevokedCertImpl.java
@@ -66,13 +66,13 @@ import netscape.security.util.ObjectIdentifier;
  * @version 1.6 97/12/10
  */
 
-public class RevokedCertImpl extends RevokedCertificate
-        implements Serializable {
+public class RevokedCertImpl extends RevokedCertificate implements Serializable {
 
     /**
      *
      */
     private static final long serialVersionUID = -3449642360223397701L;
+
     private SerialNumber serialNumber;
     private Date revocationDate;
     private CRLExtensions extensions = null;
@@ -86,11 +86,13 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Constructs a revoked certificate entry using the
-     * serial number and revocation date.
+     * Constructs a revoked certificate entry using the serial number and
+     * revocation date.
      * 
-     * @param num the serial number of the revoked certificate.
-     * @param date the Date on which revocation took place.
+     * @param num
+     *            the serial number of the revoked certificate.
+     * @param date
+     *            the Date on which revocation took place.
      */
     public RevokedCertImpl(BigInteger num, Date date) {
         this.serialNumber = new SerialNumber(num);
@@ -98,16 +100,17 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Constructs a revoked certificate entry using the
-     * serial number, revocation date and the entry
-     * extensions.
+     * Constructs a revoked certificate entry using the serial number,
+     * revocation date and the entry extensions.
      * 
-     * @param num the serial number of the revoked certificate.
-     * @param date the Date on which revocation took place.
-     * @param crlEntryExts the extensions for this entry.
+     * @param num
+     *            the serial number of the revoked certificate.
+     * @param date
+     *            the Date on which revocation took place.
+     * @param crlEntryExts
+     *            the extensions for this entry.
      */
-    public RevokedCertImpl(BigInteger num, Date date,
-                           CRLExtensions crlEntryExts) {
+    public RevokedCertImpl(BigInteger num, Date date, CRLExtensions crlEntryExts) {
         this.serialNumber = new SerialNumber(num);
         this.revocationDate = date;
         this.extensions = crlEntryExts;
@@ -120,7 +123,7 @@ public class RevokedCertImpl extends RevokedCertificate
             try {
                 encode(os);
             } catch (Exception e) {
-                //	revokedCert = null;
+                // revokedCert = null;
             }
             revokedCert = os.toByteArray();
         }
@@ -135,7 +138,8 @@ public class RevokedCertImpl extends RevokedCertificate
     /**
      * Sets extensions for this impl.
      * 
-     * @param crlEntryExts CRLExtensions
+     * @param crlEntryExts
+     *            CRLExtensions
      */
     public void setExtensions(CRLExtensions crlEntryExts) {
         this.extensions = crlEntryExts;
@@ -144,12 +148,15 @@ public class RevokedCertImpl extends RevokedCertificate
     /**
      * Unmarshals a revoked certificate from its encoded form.
      * 
-     * @param revokedCert the encoded bytes.
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
+     * @param revokedCert
+     *            the encoded bytes.
+     * @exception CRLException
+     *                on parsing errors.
+     * @exception X509ExtensionException
+     *                on extension handling errors.
      */
-    public RevokedCertImpl(byte[] revokedCert)
-            throws CRLException, X509ExtensionException {
+    public RevokedCertImpl(byte[] revokedCert) throws CRLException,
+            X509ExtensionException {
         try {
             DerValue derValue = new DerValue(revokedCert);
             parse(derValue);
@@ -161,21 +168,23 @@ public class RevokedCertImpl extends RevokedCertificate
     /**
      * Unmarshals a revoked certificate from its encoded form.
      * 
-     * @param derValue the DER value containing the revoked certificate.
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
+     * @param derValue
+     *            the DER value containing the revoked certificate.
+     * @exception CRLException
+     *                on parsing errors.
+     * @exception X509ExtensionException
+     *                on extension handling errors.
      */
-    public RevokedCertImpl(DerValue derValue)
-            throws CRLException, X509ExtensionException {
+    public RevokedCertImpl(DerValue derValue) throws CRLException,
+            X509ExtensionException {
         parse(derValue);
     }
 
     /**
-     * Returns true if this revoked certificate entry has
-     * extensions, otherwise false.
+     * Returns true if this revoked certificate entry has extensions, otherwise
+     * false.
      * 
-     * @return true if this CRL entry has extensions, otherwise
-     *         false.
+     * @return true if this CRL entry has extensions, otherwise false.
      */
     public boolean hasExtensions() {
         if (extensions == null)
@@ -187,13 +196,15 @@ public class RevokedCertImpl extends RevokedCertificate
     /**
      * Decode a revoked certificate from an input stream.
      * 
-     * @param inStrm an input stream holding at least one revoked
-     *            certificate
-     * @exception CRLException on parsing errors.
-     * @exception X509ExtensionException on extension handling errors.
+     * @param inStrm
+     *            an input stream holding at least one revoked certificate
+     * @exception CRLException
+     *                on parsing errors.
+     * @exception X509ExtensionException
+     *                on extension handling errors.
      */
-    public void decode(InputStream inStrm)
-            throws CRLException, X509ExtensionException {
+    public void decode(InputStream inStrm) throws CRLException,
+            X509ExtensionException {
         try {
             DerValue derValue = new DerValue(inStrm);
             parse(derValue);
@@ -205,13 +216,16 @@ public class RevokedCertImpl extends RevokedCertificate
     /**
      * Encodes the revoked certificate to an output stream.
      * 
-     * @param outStrm an output stream to which the encoded revoked
-     *            certificate is written.
-     * @exception CRLException on encoding errors.
-     * @exception X509ExtensionException on extension handling errors.
+     * @param outStrm
+     *            an output stream to which the encoded revoked certificate is
+     *            written.
+     * @exception CRLException
+     *                on encoding errors.
+     * @exception X509ExtensionException
+     *                on extension handling errors.
      */
-    public void encode(DerOutputStream outStrm)
-            throws CRLException, X509ExtensionException {
+    public void encode(DerOutputStream outStrm) throws CRLException,
+            X509ExtensionException {
         try {
             if (revokedCert == null) {
                 DerOutputStream tmp = new DerOutputStream();
@@ -236,8 +250,7 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Gets the serial number for this RevokedCertificate,
-     * the <em>userCertificate</em>.
+     * Gets the serial number for this RevokedCertificate, the <em>userCertificate</em>.
      * 
      * @return the serial number.
      */
@@ -246,8 +259,7 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Gets the revocation date for this RevokedCertificate,
-     * the <em>revocationDate</em>.
+     * Gets the revocation date for this RevokedCertificate, the <em>revocationDate</em>.
      * 
      * @return the revocation date.
      */
@@ -277,8 +289,8 @@ public class RevokedCertImpl extends RevokedCertificate
         if (extensions != null) {
             sb.append("\n");
             for (int i = 0; i < extensions.size(); i++)
-                sb.append("Entry Extension[" + i + "]: " +
-                        ((Extension) (extensions.elementAt(i))).toString());
+                sb.append("Entry Extension[" + i + "]: "
+                        + ((Extension) (extensions.elementAt(i))).toString());
         }
         sb.append("\n");
         return (sb.toString());
@@ -299,7 +311,7 @@ public class RevokedCertImpl extends RevokedCertificate
         for (Enumeration<Extension> e = extensions.getElements(); e.hasMoreElements();) {
             ex = e.nextElement();
             if (ex.isCritical())
-                extSet.add(((ObjectIdentifier) ex.getExtensionId()).toString());
+                extSet.add(ex.getExtensionId().toString());
         }
         return extSet;
     }
@@ -317,9 +329,9 @@ public class RevokedCertImpl extends RevokedCertificate
         Set<String> extSet = new LinkedHashSet<String>();
         Extension ex;
         for (Enumeration<Extension> e = extensions.getElements(); e.hasMoreElements();) {
-            ex = (Extension) e.nextElement();
+            ex = e.nextElement();
             if (!ex.isCritical())
-                extSet.add(((ObjectIdentifier) ex.getExtensionId()).toString());
+                extSet.add(ex.getExtensionId().toString());
         }
         return extSet;
     }
@@ -348,7 +360,7 @@ public class RevokedCertImpl extends RevokedCertificate
                 Extension ex = null;
                 ObjectIdentifier inCertOID;
                 for (Enumeration<Extension> e = extensions.getElements(); e.hasMoreElements();) {
-                    ex = (Extension) e.nextElement();
+                    ex = e.nextElement();
                     inCertOID = ex.getExtensionId();
                     if (inCertOID.equals(findOID)) {
                         crlExt = ex;
@@ -419,10 +431,9 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Serialization write ... X.509 certificates serialize as
-     * themselves, and they're parsed when they get read back.
-     * (Actually they serialize as some type data from the
-     * serialization subsystem, then the cert data.)
+     * Serialization write ... X.509 certificates serialize as themselves, and
+     * they're parsed when they get read back. (Actually they serialize as some
+     * type data from the serialization subsystem, then the cert data.)
      */
     private synchronized void writeObject(ObjectOutputStream stream)
             throws CRLException, X509ExtensionException, IOException {
@@ -432,8 +443,8 @@ public class RevokedCertImpl extends RevokedCertificate
     }
 
     /**
-     * Serialization read ... X.509 certificates serialize as
-     * themselves, and they're parsed when they get read back.
+     * Serialization read ... X.509 certificates serialize as themselves, and
+     * they're parsed when they get read back.
      */
     private synchronized void readObject(ObjectInputStream stream)
             throws CRLException, X509ExtensionException, IOException {
diff --git a/pki/base/util/src/netscape/security/x509/RevokedCertificate.java b/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
index 64eed427e51579f82185e71884f890d96a1c02bd..2087d064ae272379d85ec84d3b3a3491c5a51dbe 100644
--- a/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
+++ b/pki/base/util/src/netscape/security/x509/RevokedCertificate.java
@@ -89,4 +89,7 @@ public abstract class RevokedCertificate extends X509CRLEntry {
      * @return a string representation of this revoked certificate.
      */
     public abstract String toString();
+
+    public abstract CRLExtensions getExtensions();
+
 }
diff --git a/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java b/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
index 779503e60dc3995ae5bf2af236e377130d0098af..c30ae15761b388cb5cb5adb8ac4a9c5588c6150f 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectAlternativeNameExtension.java
@@ -226,7 +226,7 @@ public class SubjectAlternativeNameExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(SUBJECT_NAME);
 
diff --git a/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java b/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
index 40e7a3f0d937b728809023e7270e5f42151d539f..b249ef6005485dd28af4d72f7e1ebff98bb705c4 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectDirAttributesExtension.java
@@ -263,7 +263,7 @@ public class SubjectDirAttributesExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         return (elements.elements());
     }
diff --git a/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java b/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
index fd22b20f02baf55dea1478610893ff97977d1c98..ea0ebae82328e9e19591a89f96ba3efe42c74723 100644
--- a/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
+++ b/pki/base/util/src/netscape/security/x509/SubjectKeyIdentifierExtension.java
@@ -206,7 +206,7 @@ public class SubjectKeyIdentifierExtension extends Extension
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(KEY_ID);
 
diff --git a/pki/base/util/src/netscape/security/x509/X500Name.java b/pki/base/util/src/netscape/security/x509/X500Name.java
index 180ed9a5cfb6be61f76a61d0e5b2adc38b604cde..920b0e1e42c237001c5c5c1e2526d8eda367d692 100644
--- a/pki/base/util/src/netscape/security/x509/X500Name.java
+++ b/pki/base/util/src/netscape/security/x509/X500Name.java
@@ -694,7 +694,7 @@ public class X500Name implements Principal, GeneralNameInterface {
      */
 
     private static final int ipAddress_data[] = // SKIP
-    { 1, 3, 6, 1, 4, 1, 42, 2, 11, 2, 1 };
+            { 1, 3, 6, 1, 4, 1, 42, 2, 11, 2, 1 };
 
     /** OID for "IP=" IP address attributes, used with SKIP. */
     public static final ObjectIdentifier ipAddress_oid = new ObjectIdentifier(ipAddress_data);
diff --git a/pki/base/util/src/netscape/security/x509/X500NameAttrMap.java b/pki/base/util/src/netscape/security/x509/X500NameAttrMap.java
index aac89e21a87747ba47d563e45e75906990063d42..1c87c79b840f82c5a1cd50e1ba7c3a956e5debd3 100644
--- a/pki/base/util/src/netscape/security/x509/X500NameAttrMap.java
+++ b/pki/base/util/src/netscape/security/x509/X500NameAttrMap.java
@@ -206,7 +206,8 @@ public class X500NameAttrMap {
 
     Hashtable<String, ObjectIdentifier> name2OID = new Hashtable<String, ObjectIdentifier>();
     Hashtable<ObjectIdentifier, String> oid2Name = new Hashtable<ObjectIdentifier, String>();
-    Hashtable<ObjectIdentifier, AVAValueConverter> oid2ValueConverter = new Hashtable<ObjectIdentifier, AVAValueConverter>();
+    Hashtable<ObjectIdentifier, AVAValueConverter> oid2ValueConverter =
+            new Hashtable<ObjectIdentifier, AVAValueConverter>();
 
     //
     // global defaults.
diff --git a/pki/base/util/src/netscape/security/x509/X509CertImpl.java b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
index 3600287347a9d13105579ccb563fa8519757d208..d2d77cb3a77f2ffda9da77c584c36862f430f6da 100755
--- a/pki/base/util/src/netscape/security/x509/X509CertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
@@ -912,8 +912,8 @@ public class X509CertImpl extends X509Certificate
                 return null;
             Set<String> extSet = new LinkedHashSet<String>();
             Extension ex;
-            for (Enumeration e = exts.getElements(); e.hasMoreElements();) {
-                ex = (Extension) e.nextElement();
+            for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements();) {
+                ex = e.nextElement();
                 if (ex.isCritical())
                     extSet.add(((ObjectIdentifier) ex.getExtensionId()).toString());
             }
@@ -941,8 +941,8 @@ public class X509CertImpl extends X509Certificate
 
             Set<String> extSet = new LinkedHashSet<String>();
             Extension ex;
-            for (Enumeration e = exts.getElements(); e.hasMoreElements();) {
-                ex = (Extension) e.nextElement();
+            for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements();) {
+                ex = e.nextElement();
                 if (!ex.isCritical())
                     extSet.add(((ObjectIdentifier) ex.getExtensionId()).toString());
             }
@@ -962,8 +962,8 @@ public class X509CertImpl extends X509Certificate
             Extension ex = null;
             ;
             ObjectIdentifier inCertOID;
-            for (Enumeration e = exts.getElements(); e.hasMoreElements();) {
-                ex = (Extension) e.nextElement();
+            for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements();) {
+                ex = e.nextElement();
                 inCertOID = ex.getExtensionId();
                 if (inCertOID.equals(findOID)) {
                     return ex;
@@ -996,8 +996,8 @@ public class X509CertImpl extends X509Certificate
                 Extension ex = null;
                 ;
                 ObjectIdentifier inCertOID;
-                for (Enumeration e = exts.getElements(); e.hasMoreElements();) {
-                    ex = (Extension) e.nextElement();
+                for (Enumeration<Extension> e = exts.getAttributes(); e.hasMoreElements();) {
+                    ex = e.nextElement();
                     inCertOID = ex.getExtensionId();
                     if (inCertOID.equals(findOID)) {
                         certExt = ex;
diff --git a/pki/base/util/src/netscape/security/x509/X509CertInfo.java b/pki/base/util/src/netscape/security/x509/X509CertInfo.java
index 9dd43de3fce0b961ce1b9cd2e7d45de8266068cf..4777cd9588d8700447574776a916417cf3f63540 100644
--- a/pki/base/util/src/netscape/security/x509/X509CertInfo.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertInfo.java
@@ -223,7 +223,7 @@ public class X509CertInfo implements CertAttrSet, Serializable {
      * Return an enumeration of names of attributes existing within this
      * attribute.
      */
-    public Enumeration<String> getElements() {
+    public Enumeration<String> getAttributeNames() {
         Vector<String> elements = new Vector<String>();
         elements.addElement(VERSION);
         elements.addElement(SERIAL_NUMBER);
diff --git a/pki/base/util/test/com/netscape/security/extensions/GenericASN1ExtensionTest.java b/pki/base/util/test/com/netscape/security/extensions/GenericASN1ExtensionTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..74d082f099b8ceb745b40c39cdc338f0b02c1555
--- /dev/null
+++ b/pki/base/util/test/com/netscape/security/extensions/GenericASN1ExtensionTest.java
@@ -0,0 +1,72 @@
+package com.netscape.security.extensions;
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.util.Hashtable;
+
+import netscape.security.extensions.GenericASN1Extension;
+import netscape.security.x509.OIDMap;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class GenericASN1ExtensionTest {
+
+    //@Test
+    public void testConstructorArgs() throws Exception {
+        String name1 = "testExtension1";
+        String oid1 = "1.2.3.4";
+        String pattern = "";
+        Hashtable<String, String> config = new Hashtable<String, String>();
+        GenericASN1Extension extension1 = new GenericASN1Extension(name1, oid1,
+                pattern, false, config);
+        Assert.assertEquals(name1, extension1.getName());
+        Assert.assertNotNull(OIDMap.getClass(name1));
+
+        String name2 = "testExtension2";
+        String oid2 = "2.4.6.8";
+        GenericASN1Extension extension2 = new GenericASN1Extension(name2, oid2,
+                pattern, false, config);
+        Assert.assertEquals(name2, extension2.getName());
+        Assert.assertNotNull(OIDMap.getClass(name2));
+    }
+
+    @Test
+    public void testConstructorJustConfig() throws Exception {
+        String name1 = "testExtension1";
+        String oid1 = "1.2.3.4";
+        String pattern = "";
+        Hashtable<String, String> config = new Hashtable<String, String>();
+        config.put("oid", oid1);
+        config.put("name", name1);
+        config.put("pattern", pattern);
+        config.put("critical", "true");
+
+        GenericASN1Extension extension1 = new GenericASN1Extension(config);
+        Assert.assertEquals(name1, extension1.getName());
+        //Assert.assertNotNull(OIDMap.getClass(name1));
+
+        String name2 = "testExtension2";
+        String oid2 = "2.4.6.8";
+        config.put("oid", oid2);
+        config.put("name", name2);
+
+        GenericASN1Extension extension2 = new GenericASN1Extension(config);
+        Assert.assertEquals(name2, extension2.getName());
+        //Assert.assertNotNull(OIDMap.getClass(name2));
+        OutputStream outputStream = new ByteArrayOutputStream();
+        extension1.encode(outputStream);
+        extension2.encode(outputStream);
+
+    }
+
+    @Test
+    public void testConstructorDER() throws Exception {
+        byte[] value = new byte[0];
+        GenericASN1Extension extension = new GenericASN1Extension(true, value);
+
+        OutputStream outputStream = new ByteArrayOutputStream();
+        extension.encode(outputStream);
+
+    }
+}
-- 
1.7.5.1

