From ef2178524a69303ea4a49d1087160b794fe04481 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Wed, 14 Mar 2012 14:36:25 -0500
Subject: [PATCH] Removed unused variables (part 2).

This patch brings down the warnings from 2394 to 1638.

Ticket #103
---
 pki/base/ca/src/com/netscape/ca/CAService.java     |   14 ---
 .../ca/src/com/netscape/ca/CRLIssuingPoint.java    |    1 -
 .../src/com/netscape/ca/CertificateAuthority.java  |   10 +--
 .../src/com/netscape/certsrv/base/IPluginImpl.java |    4 +-
 .../netscape/certsrv/publish/ILdapCertMapper.java  |    4 +-
 .../netscape/certsrv/request/AgentApprovals.java   |    4 +-
 .../src/com/netscape/certsrv/template/ArgList.java |    2 +-
 .../src/com/netscape/certsrv/util/HttpInput.java   |    2 +-
 .../com/netscape/cms/authentication/CMCAuth.java   |    4 +-
 .../com/netscape/cms/authentication/DNPattern.java |    4 +-
 .../netscape/cms/authentication/PortalEnroll.java  |   15 ++--
 .../netscape/cms/authentication/RDNPattern.java    |    4 +-
 .../com/netscape/cms/authorization/AAclAuthz.java  |    1 -
 .../src/com/netscape/cms/jobs/PublishCertsJob.java |    8 --
 .../netscape/cms/jobs/RenewalNotificationJob.java  |    8 --
 .../com/netscape/cms/jobs/RequestInQueueJob.java   |    3 +-
 .../com/netscape/cms/jobs/UnpublishExpiredJob.java |    7 --
 .../src/com/netscape/cms/logging/LogEntry.java     |    8 +-
 .../common/src/com/netscape/cms/ocsp/DefStore.java |    4 -
 .../src/com/netscape/cms/ocsp/LDAPStore.java       |    4 -
 .../src/com/netscape/cms/policy/APolicyRule.java   |   12 +-
 .../cms/policy/constraints/DSAKeyConstraints.java  |   11 +--
 .../cms/policy/constraints/DefaultRevocation.java  |    4 +-
 .../cms/policy/constraints/IssuerConstraints.java  |    8 +-
 .../constraints/KeyAlgorithmConstraints.java       |    4 +-
 .../policy/constraints/ManualAuthentication.java   |    4 +-
 .../cms/policy/constraints/RenewalConstraints.java |    8 +-
 .../constraints/RenewalValidityConstraints.java    |    8 +-
 .../policy/constraints/RevocationConstraints.java  |    8 +-
 .../constraints/SigningAlgorithmConstraints.java   |   12 +-
 .../policy/constraints/SubCANameConstraints.java   |    8 +-
 .../policy/constraints/ValidityConstraints.java    |    8 +-
 .../cms/policy/extensions/BasicConstraintsExt.java |    1 -
 .../policy/extensions/CertificatePoliciesExt.java  |    4 +-
 .../cms/policy/extensions/KeyUsageExt.java         |    1 -
 .../cms/policy/extensions/NSCertTypeExt.java       |    1 -
 .../extensions/PrivateKeyUsagePeriodExt.java       |    1 -
 .../extensions/RemoveBasicConstraintsExt.java      |    1 -
 .../extensions/SubjectDirectoryAttributesExt.java  |    1 -
 .../netscape/cms/profile/common/BasicProfile.java  |   21 ----
 .../cms/profile/common/CACertCAEnrollProfile.java  |    3 +-
 .../netscape/cms/profile/common/EnrollProfile.java |   10 --
 .../cms/profile/constraint/KeyConstraint.java      |  111 ++++++++++----------
 .../profile/constraint/SigningAlgConstraint.java   |    2 +-
 .../cms/profile/def/AuthInfoAccessExtDefault.java  |    3 +-
 .../def/CRLDistributionPointsExtDefault.java       |    4 -
 .../netscape/cms/profile/def/EnrollDefault.java    |    3 +-
 .../cms/profile/def/FreshestCRLExtDefault.java     |    4 -
 .../cms/profile/def/PolicyMappingsExtDefault.java  |    4 -
 .../cms/profile/def/SubjectAltNameExtDefault.java  |    1 -
 .../profile/def/SubjectInfoAccessExtDefault.java   |    3 +-
 .../cms/publish/mappers/LdapCaSimpleMap.java       |    5 -
 .../cms/publish/mappers/LdapCrlIssuerCompsMap.java |    8 +-
 .../com/netscape/cms/publish/mappers/NoMap.java    |    8 +-
 .../cms/publish/publishers/FileBasedPublisher.java |    3 -
 .../publish/publishers/LdapCaCertPublisher.java    |    8 +-
 .../publish/publishers/LdapCertSubjPublisher.java  |    8 +-
 .../publishers/LdapCertificatePairPublisher.java   |   10 +-
 .../cms/publish/publishers/LdapCrlPublisher.java   |    8 +-
 .../publish/publishers/LdapUserCertPublisher.java  |    8 +-
 .../cms/publish/publishers/PublisherUtils.java     |    2 +-
 .../com/netscape/cms/request/RequestScheduler.java |    2 +-
 .../cms/servlet/admin/ACLAdminServlet.java         |   20 ----
 .../netscape/cms/servlet/admin/AdminServlet.java   |    4 -
 .../cms/servlet/admin/LogAdminServlet.java         |   15 +---
 .../cms/servlet/admin/OCSPAdminServlet.java        |    1 -
 .../cms/servlet/admin/PolicyAdminServlet.java      |    1 -
 .../cms/servlet/admin/PublisherAdminServlet.java   |   15 +--
 .../cms/servlet/admin/RegistryAdminServlet.java    |    1 -
 .../cms/servlet/base/DynamicVariablesServlet.java  |    3 +-
 .../cms/servlet/cert/CMCRevReqServlet.java         |    1 -
 .../netscape/cms/servlet/cert/DisplayBySerial.java |    4 +-
 .../com/netscape/cms/servlet/cert/DoRevoke.java    |    2 +-
 .../com/netscape/cms/servlet/cert/DoRevokeTPS.java |   16 ---
 .../com/netscape/cms/servlet/cert/DoUnrevoke.java  |    2 +-
 .../netscape/cms/servlet/cert/DoUnrevokeTPS.java   |    8 +--
 .../netscape/cms/servlet/cert/EnrollServlet.java   |    8 +--
 .../com/netscape/cms/servlet/cert/GetBySerial.java |    2 -
 .../com/netscape/cms/servlet/cert/GetCAChain.java  |    1 -
 .../src/com/netscape/cms/servlet/cert/GetInfo.java |    2 +-
 .../cms/servlet/cert/HashEnrollServlet.java        |   12 +--
 .../cms/servlet/cert/RevocationServlet.java        |    1 -
 .../com/netscape/cms/servlet/cert/UpdateCRL.java   |    1 -
 .../cms/servlet/cert/scep/CRSEnrollment.java       |    1 -
 .../cms/servlet/common/CMCOutputTemplate.java      |    1 -
 .../netscape/cms/servlet/common/CMSRequest.java    |    2 +-
 .../netscape/cms/servlet/common/CMSTemplate.java   |    4 -
 .../cms/servlet/connector/CloneServlet.java        |    6 -
 .../cms/servlet/connector/ConnectorServlet.java    |    6 -
 .../servlet/connector/GenerateKeyPairServlet.java  |    4 -
 .../servlet/connector/TokenKeyRecoveryServlet.java |   22 ----
 .../servlet/csadmin/AdminAuthenticatePanel.java    |    5 +-
 .../netscape/cms/servlet/csadmin/AdminPanel.java   |   13 ---
 .../netscape/cms/servlet/csadmin/BaseServlet.java  |    1 +
 .../netscape/cms/servlet/csadmin/CAInfoPanel.java  |    2 +-
 .../cms/servlet/csadmin/CertPrettyPrintPanel.java  |    4 +-
 .../cms/servlet/csadmin/CertRequestPanel.java      |    2 -
 .../cms/servlet/csadmin/ConfigHSMLoginPanel.java   |   11 --
 .../cms/servlet/csadmin/ConfigHSMServlet.java      |    6 +-
 .../cms/servlet/csadmin/ConfigRootCAServlet.java   |    8 +-
 .../cms/servlet/csadmin/CreateSubsystemPanel.java  |    3 +-
 .../cms/servlet/csadmin/DisplayCertChainPanel.java |    2 +-
 .../netscape/cms/servlet/csadmin/DonePanel.java    |    7 --
 .../netscape/cms/servlet/csadmin/GetCookie.java    |    5 -
 .../cms/servlet/csadmin/ImportAdminCertPanel.java  |    4 -
 .../cms/servlet/csadmin/ImportTransportCert.java   |    1 -
 .../netscape/cms/servlet/csadmin/NamePanel.java    |    6 +-
 .../cms/servlet/csadmin/RestoreKeyCertPanel.java   |   34 +++----
 .../cms/servlet/csadmin/WizardPanelBase.java       |   39 +++-----
 .../netscape/cms/servlet/key/DisplayTransport.java |    2 -
 .../netscape/cms/servlet/key/ExamineRecovery.java  |    1 -
 .../cms/servlet/key/GetApprovalStatus.java         |    1 -
 .../com/netscape/cms/servlet/key/GetAsyncPk12.java |    1 -
 .../cms/servlet/key/GrantAsyncRecovery.java        |    2 -
 .../netscape/cms/servlet/key/GrantRecovery.java    |    2 -
 .../cms/servlet/profile/ProfileSubmitServlet.java  |    3 +-
 .../netscape/cms/servlet/request/CheckRequest.java |    4 +-
 .../cms/servlet/request/ProcessCertReq.java        |    7 +-
 .../netscape/cms/servlet/request/ProcessReq.java   |    3 +-
 .../com/netscape/cms/servlet/request/QueryReq.java |    2 -
 .../netscape/cms/servlet/request/SearchReqs.java   |    1 -
 .../netscape/cms/servlet/wizard/WizardServlet.java |    1 +
 .../ChallengePhraseAuthentication.java             |    2 -
 .../cmscore/authorization/AuthzSubsystem.java      |    5 +-
 .../com/netscape/cmscore/base/SubsystemLoader.java |    4 +-
 .../netscape/cmscore/connector/HttpConnector.java  |    2 +-
 .../netscape/cmscore/connector/HttpPKIMessage.java |    1 -
 .../src/com/netscape/cmscore/crmf/CRMFParser.java  |    2 +-
 .../com/netscape/cmscore/dbs/CRLRepository.java    |    4 +-
 .../cmscore/dbs/CertificateRepository.java         |    2 -
 .../src/com/netscape/cmscore/dbs/DBSSession.java   |    7 +-
 .../src/com/netscape/cmscore/dbs/DBSubsystem.java  |    1 +
 .../src/com/netscape/cmscore/dbs/Repository.java   |    6 +-
 .../netscape/cmscore/ldap/LdapPredicateParser.java |    6 +-
 .../netscape/cmscore/ldap/PublisherProcessor.java  |    8 --
 .../src/com/netscape/cmscore/logging/LogQueue.java |    4 +-
 .../cmscore/notification/EmailFormProcessor.java   |    1 -
 .../cmscore/policy/PolicyPredicateParser.java      |    6 +-
 .../netscape/cmscore/profile/ProfileSubsystem.java |    2 +-
 .../netscape/cmscore/request/ARequestQueue.java    |    1 -
 .../com/netscape/cmscore/security/KeyCertUtil.java |    1 -
 .../src/com/netscape/cmscore/security/PWCBsdr.java |    4 +-
 .../com/netscape/cmscore/usrgrp/UGSubsystem.java   |    1 -
 .../src/com/netscape/cmscore/util/Debug.java       |    6 +-
 .../com/netscape/cmscore/util/FileAsString.java    |    3 +-
 .../netscape/cmscore/util/FileDialogFilter.java    |    1 -
 .../netscape/cmscore/util/ProfileSubsystem.java    |   20 ++--
 .../certsrv/request/AgentApprovalsTest.java        |    8 +-
 .../com/netscape/cmscore/request/RequestTest.java  |    1 -
 .../src/com/netscape/cmstools/CMCResponse.java     |    2 -
 .../src/com/netscape/cmstools/CRMFPopClient.java   |    7 +-
 .../src/com/netscape/cmstools/HttpClient.java      |    2 -
 .../src/com/netscape/cmstools/OCSPClient.java      |    2 -
 .../src/com/netscape/cmstools/PKCS12Export.java    |    3 +-
 .../kra/src/com/netscape/kra/EncryptionUnit.java   |    1 -
 .../src/com/netscape/kra/KeyRecoveryAuthority.java |   10 +-
 .../kra/src/com/netscape/kra/RecoveryService.java  |    4 +-
 pki/base/migrate/80/MigrateSecurityDomain.java     |    8 +-
 .../src/com/netscape/pkisilent/ConfigureSubCA.java |    8 --
 .../src/com/netscape/pkisilent/ConfigureTKS.java   |   10 +--
 .../src/com/netscape/pkisilent/ConfigureTPS.java   |    7 --
 .../src/com/netscape/pkisilent/CreateInstance.java |    6 +-
 .../pkisilent/argparser/StringScanner.java         |    5 +-
 .../com/netscape/pkisilent/common/CMSConfig.java   |    2 +-
 .../com/netscape/pkisilent/common/Con2Agent.java   |   16 +---
 .../com/netscape/pkisilent/common/ParseXML.java    |    1 -
 .../com/netscape/pkisilent/common/PostQuery.java   |    3 -
 .../com/netscape/pkisilent/common/ServerInfo.java  |   14 +---
 .../com/netscape/pkisilent/common/TestClient.java  |    5 +-
 .../com/netscape/pkisilent/common/UserEnroll.java  |    1 -
 .../com/netscape/pkisilent/http/HTTPClient.java    |    3 -
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |    1 -
 .../src/com/netscape/cmsutil/crypto/Module.java    |    8 +-
 .../src/com/netscape/cmsutil/xml/XMLObject.java    |    4 +-
 .../src/netscape/net/TransferProtocolClient.java   |    4 +-
 .../security/extensions/GenericASN1Extension.java  |    6 +-
 .../extensions/PresenceServerExtension.java        |    4 +
 .../util/src/netscape/security/pkcs/PKCS7.java     |    2 +-
 .../src/netscape/security/util/DerInputStream.java |    2 +-
 .../util/src/netscape/security/x509/Extension.java |    2 +-
 .../security/x509/NSCCommentExtension.java         |    2 +-
 .../util/src/netscape/security/x509/X500Name.java  |    2 -
 182 files changed, 312 insertions(+), 758 deletions(-)

diff --git a/pki/base/ca/src/com/netscape/ca/CAService.java b/pki/base/ca/src/com/netscape/ca/CAService.java
index 88c9dfb8d622453fb45c5f731148b45f2ab0db91..62bae3b5ffe544fcad5772367c33e675daa97cb1 100644
--- a/pki/base/ca/src/com/netscape/ca/CAService.java
+++ b/pki/base/ca/src/com/netscape/ca/CAService.java
@@ -837,7 +837,6 @@ public class CAService implements ICAService, IService {
             try {
 
                 CMS.debug("doUTF8 true, updating subject.");
-                CertificateSubjectName sName = (CertificateSubjectName) certi.get(X509CertInfo.SUBJECT);
 
                 String subject = certi.get(X509CertInfo.SUBJECT).toString();
 
@@ -987,20 +986,7 @@ public class CAService implements ICAService, IService {
                     CMS.getUserMessage("CMS_CA_CANT_FIND_CERT_SERIAL",
                             "0x" + serialno.toString(16)));
         }
-        RevocationInfo revInfo = (RevocationInfo) certRec.getRevocationInfo();
-        CRLExtensions exts = null;
-        CRLReasonExtension reasonext = null;
 
-        if (revInfo != null)
-            exts = revInfo.getCRLEntryExtensions();
-        if (exts != null) {
-            try {
-                reasonext = (CRLReasonExtension)
-                        exts.get(CRLReasonExtension.NAME);
-            } catch (X509ExtensionException e) {
-                // this means no crl reason extension set.
-            }
-        }
         // allow revoking certs that are on hold.
         String certStatus = certRec.getStatus();
 
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index dd6194101a39c4e9cbe66da68a35ea4d5fad97d0..d4b747b32dd9244a5c281652b5682080094210e2 100644
--- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -3029,7 +3029,6 @@ class CertRecProcessor implements IElementProcessor {
             onlySomeReasons = issuingDistributionPoint.getOnlySomeReasons();
 
         boolean applyReasonMatch = false;
-        boolean reasonMatch = true;
 
         if (onlySomeReasons != null) {
             applyReasonMatch = !onlySomeReasons.toString().equals("0000000");
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index 00fcbae0fd1181a94a6f0c75de2b60914267b613..007ebf207f75ac8c0e63e605e8fab3378382d509 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -931,7 +931,6 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
             statsSub.startTiming("signing");
         }
 
-        long startTime = CMS.getCurrentDate().getTime();
         try {
             DerOutputStream out = new DerOutputStream();
             DerOutputStream tmp = new DerOutputStream();
@@ -1006,7 +1005,6 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
             statsSub.startTiming("signing");
         }
 
-        long startTime = CMS.getCurrentDate().getTime();
         try {
             DerOutputStream out = new DerOutputStream();
             DerOutputStream tmp = new DerOutputStream();
@@ -1328,7 +1326,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
         Long l = Long.valueOf(file.length());
         byte[] b = new byte[l.intValue()];
         FileInputStream in = new FileInputStream(path);
-        int num = in.read(b);
+        in.read(b);
         in.close();
 
         return b;
@@ -1589,8 +1587,6 @@ 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");
@@ -1603,9 +1599,6 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
                             CMS.getLogMessage("CMSCORE_CA_CA_REGISTER_REQ_LISTENER", requestInQListenerClassName));
                 }
 
-                // Initialize extra listeners
-                IConfigStore mListenerConfig = null;
-
             } else {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_CA_NOTIFY_NONE"));
             }
@@ -1703,7 +1696,6 @@ 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/IPluginImpl.java b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
index 566fef38f83083f2233db292e680f122f71c1f7a..a7a0560b50eeaffa5d7c8000bbb1529ec7eea897 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
@@ -84,7 +84,7 @@ public interface IPluginImpl {
      * @return nvPairs A Vector of name/value pairs. Each name/value
      *         pair is constructed as a String in name=value format.
      */
-    public Vector getInstanceParams();
+    public Vector<String> getInstanceParams();
 
     /**
      * Retrieves a list of configuration parameter names.
@@ -99,6 +99,6 @@ public interface IPluginImpl {
      * @return nvPairs A Vector of name/value pairs. Each name/value
      *         pair is constructed as a String in name=value.
      */
-    public Vector getDefaultParams();
+    public Vector<String> getDefaultParams();
 
 }
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
index 7e2e1116c88359d1c718252aef7cecd9f27f6cb0..3acaeb580468ef067139bf0125ebd72c32166c5b 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
@@ -44,12 +44,12 @@ public interface ILdapCertMapper extends ILdapPlugin {
     /**
      * Returns the default parameters.
      */
-    public Vector getDefaultParams();
+    public Vector<String> getDefaultParams();
 
     /**
      * Returns the instance parameters.
      */
-    public Vector getInstanceParams();
+    public Vector<String> getInstanceParams();
 
     /**
      * maps a certificate to a LDAP entry.
diff --git a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
index 54277b611d09a319801e7d6db5d3007e77a6578d..d6fa41b8f82638b248a86a7c1f8728e809c02798 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
@@ -127,14 +127,14 @@ public class AgentApprovals
      * @param stringVector The vector of strings to translate
      * @return the AgentApprovals instance or null if it can't be translated.
      */
-    public static AgentApprovals fromStringVector(Vector stringVector) {
+    public static AgentApprovals fromStringVector(Vector<String> stringVector) {
         if (stringVector == null) {
             return null;
         }
         AgentApprovals approvals = new AgentApprovals();
         for (int i = 0; i < stringVector.size(); i++) {
             try {
-                String approvalString = (String) stringVector.get(i);
+                String approvalString = stringVector.get(i);
                 String[] parts = approvalString.split(";", 2);
                 if (parts.length != 2) {
                     return null;
diff --git a/pki/base/common/src/com/netscape/certsrv/template/ArgList.java b/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
index aa0be2d55a31213da79077d02c28b0f3d77e3056..586bf7663486370f71e2b991f00f746a8d77b00b 100644
--- a/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
+++ b/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
@@ -29,7 +29,7 @@ import java.util.Vector;
  */
 public class ArgList implements IArgValue {
 
-    private Vector mList = new Vector();
+    private Vector<IArgValue> mList = new Vector<IArgValue>();
 
     /**
      * Constructs a argument list object.
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 fba601b6c61c580c10556de345ce520d8b51f48a..b7dc1038755828518ba7c4291da4bc5619852628 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
@@ -111,7 +111,7 @@ public class HttpInput {
             throws IOException {
         String v = getString(request, name);
         try {
-            URL u = new URL(v);
+            new URL(v); // throw exception on error
         } catch (Exception e) {
             throw new IOException("Invalid URL " + v);
         }
diff --git a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
index 905efc42a2538738de40227d4c4398f5d3bc64ac..06d4eaa0fe7750e2d813c1cb081d0c46cb4588a2 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
@@ -150,13 +150,13 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
     ////////////////////////////////////
 
     /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
+    protected static Vector<String> mExtendedPluginInfo = null;
     //public static final String AGENT_AUTHMGR_ID = "agentAuthMgr";
     //public static final String AGENT_PLUGIN_ID = "agentAuthPlugin";
 
     /* actual help messages */
     static {
-        mExtendedPluginInfo = new Vector();
+        mExtendedPluginInfo = new Vector<String>();
 
         mExtendedPluginInfo
                 .add(IExtendedPluginInfo.HELP_TEXT +
diff --git a/pki/base/common/src/com/netscape/cms/authentication/DNPattern.java b/pki/base/common/src/com/netscape/cms/authentication/DNPattern.java
index 653a950aa8b5e7ebb4d920239ae8673c3213591b..480b5b9097e83848d0d8236dbb4fc3035537b7a7 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/DNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/DNPattern.java
@@ -153,7 +153,7 @@ public class DNPattern {
 
     private void parse(PushbackReader in)
             throws EAuthException {
-        Vector rdnPatterns = new Vector();
+        Vector<RDNPattern> rdnPatterns = new Vector<RDNPattern>();
         RDNPattern rdnPattern = null;
         int lastChar = -1;
 
@@ -170,7 +170,7 @@ public class DNPattern {
         mRDNPatterns = new RDNPattern[rdnPatterns.size()];
         rdnPatterns.copyInto(mRDNPatterns);
 
-        Vector ldapAttrs = new Vector();
+        Vector<String> ldapAttrs = new Vector<String>();
 
         for (int i = 0; i < mRDNPatterns.length; i++) {
             String[] rdnAttrs = mRDNPatterns[i].getLdapAttrs();
diff --git a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
index fe2c352ec26c077b45ba7dfbe4f9009e9179ffec..38a3e6fcf2df001dcbb0ba67c6d95959b0d6b65b 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
@@ -83,14 +83,14 @@ public class PortalEnroll extends DirBasedAuthentication {
 
     // contains all nested superiors' required attrs in the form of a
     //	vector of "required" attributes in Enumeration
-    Vector mRequiredAttrs = null;
+    Vector<Enumeration<String>> mRequiredAttrs = null;
 
     // contains all nested superiors' optional attrs in the form of a
     //	vector of "optional" attributes in Enumeration
-    Vector mOptionalAttrs = null;
+    Vector<Enumeration<String>> mOptionalAttrs = null;
 
     // contains all the objclasses, including superiors and itself
-    Vector mObjClasses = null;
+    Vector<String> mObjClasses = null;
 
     /* Holds configuration parameters accepted by this implementation.
      * This list is passed to the configuration console so configuration
@@ -324,15 +324,15 @@ public class PortalEnroll extends DirBasedAuthentication {
         String dn = "uid=" + uid + "," + mBaseDN;
 
         /* Specify the attributes of the entry */
-        Vector objectclass_values = null;
+        Vector<String> objectclass_values = null;
 
         LDAPAttributeSet attrs = new LDAPAttributeSet();
         LDAPAttribute attr = new LDAPAttribute("objectclass");
 
         // initialized to new
-        mRequiredAttrs = new Vector();
-        mOptionalAttrs = new Vector();
-        mObjClasses = new Vector();
+        mRequiredAttrs = new Vector<Enumeration<String>>();
+        mOptionalAttrs = new Vector<Enumeration<String>>();
+        mObjClasses = new Vector<String>();
 
         LDAPSchema dirSchema = null;
 
@@ -431,6 +431,7 @@ public class PortalEnroll extends DirBasedAuthentication {
      *  should build up
      *  mRequiredAttrs, mOptionalAttrs, and mObjClasses when returned
      */
+    @SuppressWarnings("unchecked")
     public void initLdapAttrs(LDAPSchema dirSchema, String oclass) {
         CMS.debug("PortalEnroll: in initLdapAttrsAttrs");
         mObjClasses.addElement(oclass);
diff --git a/pki/base/common/src/com/netscape/cms/authentication/RDNPattern.java b/pki/base/common/src/com/netscape/cms/authentication/RDNPattern.java
index 02a8f14382a2bc70cc0530e70e0dda0818b2c3db..722aefbc3abc5f82fde3b7d39839f262357ea54a 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/RDNPattern.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/RDNPattern.java
@@ -158,7 +158,7 @@ class RDNPattern {
     private void parse(PushbackReader in)
             throws EAuthException {
         //System.out.println("_________ begin rdn _________");
-        Vector avaPatterns = new Vector();
+        Vector<AVAPattern> avaPatterns = new Vector<AVAPattern>();
         AVAPattern avaPattern = null;
         int lastChar;
 
@@ -188,7 +188,7 @@ class RDNPattern {
         mAVAPatterns = new AVAPattern[avaPatterns.size()];
         avaPatterns.copyInto(mAVAPatterns);
 
-        Vector ldapAttrs = new Vector();
+        Vector<String> ldapAttrs = new Vector<String>();
 
         for (int i = 0; i < mAVAPatterns.length; i++) {
             String avaAttr = mAVAPatterns[i].getLdapAttr();
diff --git a/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java b/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java
index 73995e6cd46eb74e75e41ddcc0c8d31c589d43fb..570fe3a888c7b8f1839c41e95cfc703bfda41d10 100644
--- a/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java
+++ b/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java
@@ -656,7 +656,6 @@ public abstract class AAclAuthz {
     }
 
     public Vector<String> getNodes(String resourceID) {
-        Enumeration<String> parents = getTargetNames();
         Vector<String> v = new Vector<String>();
 
         if (resourceID != null && !resourceID.equals("")) {
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 2289d7255db50aae41e913af124b3b006ee6193a..28268dfabc2eb05fdbb44b56d0b8e5743acb92bf 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
@@ -21,7 +21,6 @@ import java.text.DateFormat;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Locale;
-import java.util.Vector;
 
 import netscape.security.x509.X509CertImpl;
 
@@ -86,12 +85,6 @@ public class PublishCertsJob extends AJobBase
                     "summary.recipientEmail"
         };
 
-    /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
-    static {
-        mExtendedPluginInfo = new Vector();
-    };
-
     public String[] getExtendedPluginInfo(Locale locale) {
         String s[] = {
                 IExtendedPluginInfo.HELP_TEXT +
@@ -217,7 +210,6 @@ public class PublishCertsJob extends AJobBase
             if (rec == null)
                 break;
             X509CertImpl cert = rec.getCertificate();
-            Date notBefore = cert.getNotBefore();
             Date notAfter = cert.getNotAfter();
 
             // skip CA certs
diff --git a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
index 5a14c6278fd2feef2f1b888d09c667c6a8fbde3d..5ca581445bd7bac754ef21c723acf0329338d985 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
@@ -23,7 +23,6 @@ import java.util.Date;
 import java.util.Enumeration;
 import java.util.Locale;
 import java.util.StringTokenizer;
-import java.util.Vector;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
@@ -195,13 +194,6 @@ public class RenewalNotificationJob
     private int mMaxNotifyCount = 1;
     private String[] mProfileId = null;
 
-    /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
-
-    static {
-        mExtendedPluginInfo = new Vector();
-    };
-
     /**
      * class constructor
      */
diff --git a/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java b/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java
index 775845ca7552186666f6d03f9ab3af01855e8235..b04461941700a02dd6931432f6cac778b057bd03 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java
@@ -33,7 +33,6 @@ import com.netscape.certsrv.jobs.IJobsScheduler;
 import com.netscape.certsrv.notification.IEmailFormProcessor;
 import com.netscape.certsrv.request.IRequestList;
 import com.netscape.certsrv.request.IRequestQueue;
-import com.netscape.certsrv.request.RequestId;
 import com.netscape.certsrv.request.RequestStatus;
 
 /**
@@ -171,7 +170,7 @@ public class RequestInQueueJob extends AJobBase
                 mReqQ.listRequestsByStatus(RequestStatus.PENDING);
 
         while (list != null && list.hasMoreElements()) {
-            RequestId rid = list.nextRequestId();
+            list.nextRequestId();
 
             /*  This is way too slow
              // get request from request id
diff --git a/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java b/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
index 63cae7f30713db50f2cc72316b058ca0d8892059..2f4a6ad75cd9e312f75bce2aff425378e01adf07 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/UnpublishExpiredJob.java
@@ -22,7 +22,6 @@ import java.text.DateFormat;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Locale;
-import java.util.Vector;
 
 import netscape.security.x509.X509CertImpl;
 
@@ -87,12 +86,6 @@ public class UnpublishExpiredJob extends AJobBase
                     "summary.recipientEmail"
         };
 
-    /* Vector of extendedPluginInfo strings */
-    protected static Vector mExtendedPluginInfo = null;
-    static {
-        mExtendedPluginInfo = new Vector();
-    };
-
     public String[] getExtendedPluginInfo(Locale locale) {
         String s[] = {
                 IExtendedPluginInfo.HELP_TEXT +
diff --git a/pki/base/common/src/com/netscape/cms/logging/LogEntry.java b/pki/base/common/src/com/netscape/cms/logging/LogEntry.java
index 759b09379b62d23af4c1961e2f793508948f49cd..d91bd74061156be85d0b83631319c89806e8aeee 100644
--- a/pki/base/common/src/com/netscape/cms/logging/LogEntry.java
+++ b/pki/base/common/src/com/netscape/cms/logging/LogEntry.java
@@ -35,7 +35,7 @@ public class LogEntry {
     private String mDetail;
     private String mDate;
     private String mTime;
-    private Vector mRow;
+    private Vector<String> mRow;
 
     private final String DATE_PATTERN = "dd/MMM/yyyy:HH:mm:ss z";
 
@@ -54,7 +54,7 @@ public class LogEntry {
      * return a vector of the segments of the entry
      */
 
-    public Vector parse() throws ParseException {
+    public Vector<String> parse() throws ParseException {
         int x = mEntry.indexOf("[");
 
         if (x == -1)
@@ -86,7 +86,7 @@ public class LogEntry {
 
         mDetail = temp.substring(x + 2);
 
-        Vector row = new Vector();
+        Vector<String> row = new Vector<String>();
 
         row.addElement(mSource);
         row.addElement(mLevel);
@@ -119,7 +119,7 @@ public class LogEntry {
         return mTime;
     }
 
-    public Vector getRow() {
+    public Vector<String> getRow() {
         return mRow;
     }
 
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 2482d69af26e0866b73f81465e85111931de8395..21f7023d861cd5f94ae80a81313cfe2e51b2184d 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/DefStore.java
@@ -45,7 +45,6 @@ import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.base.ISubsystem;
 import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.common.NameValuePairs;
-import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
 import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
@@ -161,9 +160,6 @@ public class DefStore implements IDefStore, IExtendedPluginInfo {
         mIncludeNextUpdate = mConfig.getBoolean(PROP_INCLUDE_NEXT_UPDATE,
                     false);
 
-        // should move this into DBSubsystem ....
-        IDBRegistry reg = mDBService.getRegistry();
-
         // init web gateway.
         initWebGateway();
 
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 ac6534afd2db454a8dcd43ae2297e0cfbdf20dac..bca02f4a6047f5857769ec26d2c3bf66f3261f1c 100644
--- a/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
+++ b/pki/base/common/src/com/netscape/cms/ocsp/LDAPStore.java
@@ -696,10 +696,6 @@ class TempCRLIssuingPointRecord implements ICRLIssuingPointRecord {
         return null;
     }
 
-    public Vector getSplitTimes() {
-        return null;
-    }
-
     public int isCRLIssuingPointInitialized() {
         return 1;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/APolicyRule.java b/pki/base/common/src/com/netscape/cms/policy/APolicyRule.java
index 1c43d92d41cffed500c97bc65f5fd3d4e0956dca..0faf7591d838fa679a4df2f0c94f2d5473312f02 100644
--- a/pki/base/common/src/com/netscape/cms/policy/APolicyRule.java
+++ b/pki/base/common/src/com/netscape/cms/policy/APolicyRule.java
@@ -148,14 +148,14 @@ public abstract class APolicyRule implements IPolicyRule {
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public abstract Vector getInstanceParams();
+    public abstract Vector<String> getInstanceParams();
 
     /**
      * Return default parameters for a policy implementation.
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public abstract Vector getDefaultParams();
+    public abstract Vector<String> getDefaultParams();
 
     public void setError(IRequest req, String format, Object[] params) {
         setPolicyException(req, format, params);
@@ -178,9 +178,9 @@ public abstract class APolicyRule implements IPolicyRule {
     }
 
     public void setPolicyException(IRequest req, EBaseException ex) {
-        Vector ev = req.getExtDataInStringVector(IRequest.ERRORS);
+        Vector<String> ev = req.getExtDataInStringVector(IRequest.ERRORS);
         if (ev == null) {
-            ev = new Vector();
+            ev = new Vector<String>();
         }
         ev.addElement(ex.toString());
         req.setExtData(IRequest.ERRORS, ev);
@@ -235,9 +235,9 @@ public abstract class APolicyRule implements IPolicyRule {
         else
             ex = new EPolicyException(format, params);
 
-        Vector ev = req.getExtDataInStringVector(IRequest.ERRORS);
+        Vector<String> ev = req.getExtDataInStringVector(IRequest.ERRORS);
         if (ev == null) {
-            ev = new Vector();
+            ev = new Vector<String>();
         }
         ev.addElement(ex.toString());
         req.setExtData(IRequest.ERRORS, ev);
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/DSAKeyConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/DSAKeyConstraints.java
index 9ad322085b409130ff4bfe77844ff1a4d6d0e822..387b702bf71b01c6b2ce7074dbfb25f394dfc4f7 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/DSAKeyConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/DSAKeyConstraints.java
@@ -64,7 +64,7 @@ public class DSAKeyConstraints extends APolicyRule
     private final static String PROP_MIN_SIZE = "minSize";
     private final static String PROP_MAX_SIZE = "maxSize";
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     private IConfigStore mConfig = null;
 
@@ -193,9 +193,6 @@ public class DSAKeyConstraints extends APolicyRule
 
                 if (keyParams == null) {
                     // key parameters could not be parsed.
-                    Object[] params = new Object[] {
-                            getInstanceName(), String.valueOf(i + 1) };
-
                     setError(req,
                             CMS.getUserMessage("CMS_POLICY_NO_KEY_PARAMS", getInstanceName(), String.valueOf(i + 1)),
                             "");
@@ -232,8 +229,8 @@ public class DSAKeyConstraints 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>();
 
         try {
             confParams.addElement(PROP_MIN_SIZE + "=" + mConfig.getInteger(PROP_MIN_SIZE, DEF_MIN_SIZE));
@@ -249,7 +246,7 @@ public class DSAKeyConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/DefaultRevocation.java b/pki/base/common/src/com/netscape/cms/policy/constraints/DefaultRevocation.java
index f341dd224df52ac13d7cc32588d667e323cfcfad..2af14547522a4c515614c835cb52efab7a703b52 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/DefaultRevocation.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/DefaultRevocation.java
@@ -81,7 +81,7 @@ public class DefaultRevocation extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return null;
     }
 
@@ -90,7 +90,7 @@ public class DefaultRevocation extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return null;
     }
 
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 b0e27501e4d576aa5e2a5620edd19627b0315d2b..a08bde78c8449c4e386dfee7682eb50409291fe5 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
@@ -193,8 +193,8 @@ public class IssuerConstraints 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_ISSUER_DN + "=" +
                 mIssuerDNString);
@@ -206,8 +206,8 @@ public class IssuerConstraints 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_ISSUER_DN + "=");
         return defParams;
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java
index 9bb806ebaa8f0f0e8737f9c9c13a20c24886770c..3779b16e39f9a8bb755426098d2ab4e773273686 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/KeyAlgorithmConstraints.java
@@ -58,7 +58,7 @@ public class KeyAlgorithmConstraints extends APolicyRule
     private final static String[] supportedAlgorithms =
         { "RSA", "DSA", "DH" };
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     static {
         defConfParams.addElement(PROP_ALGORITHMS + "=" +
@@ -219,7 +219,7 @@ public class KeyAlgorithmConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/ManualAuthentication.java b/pki/base/common/src/com/netscape/cms/policy/constraints/ManualAuthentication.java
index b93487609d2d3baa133aa173e0206f4802a533a1..3af9e636f4003dde1031aa0287b7dcbedb4874b3 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/ManualAuthentication.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/ManualAuthentication.java
@@ -86,7 +86,7 @@ public class ManualAuthentication extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
+    public Vector<String> getInstanceParams() {
         return null;
     }
 
@@ -95,7 +95,7 @@ public class ManualAuthentication extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return null;
     }
 }
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 185bceed9b1f7185aa319043e341c1b04632944b..f3e5efc9b12d506799c259f53d0f144b228eeb07 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
@@ -62,7 +62,7 @@ public class RenewalConstraints extends APolicyRule
     public final static int DEF_RENEWAL_NOT_AFTER = 30;
     public final static long DAYS_TO_MS_FACTOR = 24L * 3600 * 1000;
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
     static {
         defConfParams.addElement(PROP_ALLOW_EXPIRED_CERTS + "=" + true);
         defConfParams.addElement(PROP_RENEWAL_NOT_AFTER + "=" +
@@ -221,8 +221,8 @@ public class RenewalConstraints 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_ALLOW_EXPIRED_CERTS + "=" + mAllowExpiredCerts);
@@ -236,7 +236,7 @@ public class RenewalConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/RenewalValidityConstraints.java
index 023605db40d25407240f2558939627be2d89628c..0265ff855645a4e6eab9337a399b767ee7d0020d 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
@@ -74,7 +74,7 @@ public class RenewalValidityConstraints extends APolicyRule
     public static final String CERT_HEADER = "-----BEGIN CERTIFICATE-----\n";
     public static final String CERT_TRAILER = "-----END CERTIFICATE-----\n";
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     static {
         defConfParams.addElement(PROP_MIN_VALIDITY + "=" +
@@ -281,8 +281,8 @@ public class RenewalValidityConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector confParams = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> confParams = new Vector<String>();
 
         confParams.addElement(PROP_MIN_VALIDITY + "=" +
                 mMinValidity / DAYS_TO_MS_FACTOR);
@@ -298,7 +298,7 @@ public class RenewalValidityConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/RevocationConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/RevocationConstraints.java
index d4859195d5bb31561d28209928cbaf71f8c8cd6a..513e199c4acc249dd890adb61219dac5a1f4ccab 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/RevocationConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/RevocationConstraints.java
@@ -57,7 +57,7 @@ public class RevocationConstraints extends APolicyRule
     private boolean mAllowExpiredCerts = true;
     private boolean mAllowOnHold = true;
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
     static {
         defConfParams.addElement(PROP_ALLOW_EXPIRED_CERTS + "=" + true);
         defConfParams.addElement(PROP_ALLOW_ON_HOLD + "=" + true);
@@ -194,8 +194,8 @@ public class RevocationConstraints 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_ALLOW_EXPIRED_CERTS + "=" + mAllowExpiredCerts);
@@ -209,7 +209,7 @@ public class RevocationConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/SigningAlgorithmConstraints.java
index 8c2ba0796753ef44bc1e8c299b20bc0ffac5027e..8b504eb50d2df4863b94ef52d42694c341e419cb 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
@@ -62,7 +62,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
     IAuthority mAuthority = null;
     private final static String PROP_ALGORITHMS = "algorithms";
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     static {
         StringBuffer sb = new StringBuffer();
@@ -120,7 +120,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
             if (algNames != null) {
                 // parse alg names into Vector
                 StringTokenizer tok = new StringTokenizer(algNames, ",");
-                Vector algs = new Vector();
+                Vector<String> algs = new Vector<String>();
 
                 while (tok.hasMoreTokens()) {
                     algs.addElement(tok.nextToken().trim());
@@ -211,7 +211,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
         int i, j, goodSize;
 
         // validate the currently-allowed algorithms
-        Vector goodAlgs = new Vector();
+        Vector<String> goodAlgs = new Vector<String>();
 
         for (i = 0; i < mAllowedAlgs.length; i++) {
             for (j = 0; j < allowed.length; j++) {
@@ -324,8 +324,8 @@ public class SigningAlgorithmConstraints 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>();
         StringBuffer sb = new StringBuffer();
 
         for (int i = 0; i < mConfigAlgs.length; i++) {
@@ -343,7 +343,7 @@ public class SigningAlgorithmConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         StringBuffer sb = new StringBuffer();
         sb.append(PROP_ALGORITHMS);
         sb.append("=");
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/SubCANameConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/SubCANameConstraints.java
index 2b13c14af5e997d5ca9f864ecdf10649d2ef63b4..da63f6f2438f25c24d77bd455c5db7cded9718bf 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/SubCANameConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/SubCANameConstraints.java
@@ -176,8 +176,8 @@ public class SubCANameConstraints extends APolicyRule implements IEnrollmentPoli
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
@@ -187,8 +187,8 @@ public class SubCANameConstraints extends APolicyRule implements IEnrollmentPoli
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         return v;
     }
diff --git a/pki/base/common/src/com/netscape/cms/policy/constraints/ValidityConstraints.java b/pki/base/common/src/com/netscape/cms/policy/constraints/ValidityConstraints.java
index 1ebf9a0b8d7f14c5cb6b5f9cee5748da94cd8491..0409f3c3319a61444dd0ea3997ae32b0e2d67614 100644
--- a/pki/base/common/src/com/netscape/cms/policy/constraints/ValidityConstraints.java
+++ b/pki/base/common/src/com/netscape/cms/policy/constraints/ValidityConstraints.java
@@ -73,7 +73,7 @@ public class ValidityConstraints extends APolicyRule
     public final static long DAYS_TO_MS_FACTOR = 24L * 3600 * 1000;
     public final static long MINS_TO_MS_FACTOR = 60L * 1000;
 
-    private final static Vector defConfParams = new Vector();
+    private final static Vector<String> defConfParams = new Vector<String>();
 
     static {
         defConfParams.addElement(PROP_MIN_VALIDITY + "=" +
@@ -260,8 +260,8 @@ public class ValidityConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getInstanceParams() {
-        Vector confParams = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> confParams = new Vector<String>();
 
         confParams.addElement(PROP_MIN_VALIDITY + "=" +
                 mMinValidity / DAYS_TO_MS_FACTOR);
@@ -281,7 +281,7 @@ public class ValidityConstraints extends APolicyRule
      * 
      * @return nvPairs A Vector of name/value pairs.
      */
-    public Vector getDefaultParams() {
+    public Vector<String> getDefaultParams() {
         return defConfParams;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/BasicConstraintsExt.java
index 1d22d48ecb72b6fc1aba893c4b5829712ed6cbba..f830b7e3d59026565c819bf050bdbafaf04dc316 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
@@ -210,7 +210,6 @@ public class BasicConstraintsExt extends APolicyRule
      * @return The policy result object.
      */
     public PolicyResult apply(IRequest req) {
-        PolicyResult res = PolicyResult.ACCEPTED;
 
         // get cert info.
         X509CertInfo[] ci =
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 7ea2d6fb86988b7461485a8017e406679a5493ba..59735731858f90b009fedee8309e03be29500f1f 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
@@ -413,11 +413,9 @@ class CertPolicy {
                         mNameDot + PROP_NOTICE_REF_ORG, msg));
 
         // if a policy id is not null check that it is a valid OID.
-        ObjectIdentifier policyId = null;
 
         if (mPolicyId != null)
-            policyId = CMS.checkOID(
-                        mNameDot + PROP_POLICY_IDENTIFIER, mPolicyId);
+            CMS.checkOID(mNameDot + PROP_POLICY_IDENTIFIER, mPolicyId);
 
         // if enabled, form CertificatePolicyInfo to be encoded in
         // extension. Policy ids should be all set.
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 037206b89e3b6e84ab0151effc33b222fe80f2b4..6594cc4a2b0329816b427e7ecfdb2928c415fdc7 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
@@ -159,7 +159,6 @@ public class KeyUsageExt extends APolicyRule
      * @return The policy result object.
      */
     public PolicyResult apply(IRequest req) {
-        PolicyResult res = PolicyResult.ACCEPTED;
 
         X509CertInfo[] ci =
                 req.getExtDataInCertInfoArray(IRequest.CERT_INFO);
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 2d521e8d578a8eb47860d826388dc69f759f0ca6..2fb09b2b762f9598397da54640add2dc976eddda 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
@@ -159,7 +159,6 @@ public class NSCertTypeExt extends APolicyRule
      */
     public PolicyResult apply(IRequest req) {
         CMS.debug("NSCertTypeExt: Impl: " + NAME + ", Instance: " + getInstanceName() + "::apply()");
-        PolicyResult res = PolicyResult.ACCEPTED;
 
         X509CertInfo[] ci =
                 req.getExtDataInCertInfoArray(IRequest.CERT_INFO);
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 fe2565428a170c5a1b9505f87a66b4ea8cfb8b09..3b80246a9c6f34cff2e85eb7739c56632b6793c3 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
@@ -156,7 +156,6 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
      * @return The policy result object.
      */
     public PolicyResult apply(IRequest req) {
-        PolicyResult res = PolicyResult.ACCEPTED;
 
         // get cert info.
         X509CertInfo[] ci =
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 0af977a2430cda8e72d8bbfeabb85b86b94131b0..2a5af4240e476822f0078cc5c0b29eff7cd69765 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
@@ -61,7 +61,6 @@ public class RemoveBasicConstraintsExt extends APolicyRule
     }
 
     public PolicyResult apply(IRequest req) {
-        PolicyResult res = PolicyResult.ACCEPTED;
 
         // get cert info.
         X509CertInfo[] ci =
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 b4ebb4b4530032c54a7f339041c78587ccba5d89..6b4e7ead9ff3e6910931602b6e9ed932dabb8ccd 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
@@ -123,7 +123,6 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
     }
 
     public PolicyResult apply(IRequest req) {
-        PolicyResult res = PolicyResult.ACCEPTED;
         X509CertInfo[] ci =
                 req.getExtDataInCertInfoArray(IRequest.CERT_INFO);
 
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 7f624cb8b71d193f970745581996a5930f11fa1d..696d0cd136ac87a9909582c4885dc1c6357a5809 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
@@ -550,12 +550,6 @@ public abstract class BasicProfile implements IProfile {
 
     throws EProfileException {
         IConfigStore outputStore = mConfig.getSubStore("output");
-        String output_list = null;
-
-        try {
-            output_list = outputStore.getString(PROP_OUTPUT_LIST, "");
-        } catch (Exception ee) {
-        }
 
         IPluginInfo outputInfo = mRegistry.getPluginInfo("profileOutput",
                 outputId);
@@ -650,13 +644,6 @@ public abstract class BasicProfile implements IProfile {
             throws EProfileException {
         IConfigStore inputStore = mConfig.getSubStore("input");
 
-        String input_list = null;
-
-        try {
-            input_list = inputStore.getString(PROP_INPUT_LIST, "");
-        } catch (Exception ee) {
-        }
-
         IPluginInfo inputInfo = mRegistry.getPluginInfo("profileInput",
                 inputId);
 
@@ -856,14 +843,6 @@ public abstract class BasicProfile implements IProfile {
                     CMS.debug("WARNING, can't get default plugin id!");
                 }
 
-                String constraintRoot = curId + "." + PROP_CONSTRAINT;
-                String curConstraintClassId = null;
-                try {
-                    curConstraintClassId = pStore.getString(constraintRoot + "." + PROP_CLASS_ID);
-                } catch (Exception e) {
-                    CMS.debug("WARNING, can't get constraint plugin id!");
-                }
-
                 //Disallow duplicate defaults  with the following exceptions:
                 // noDefaultImpl, genericExtDefaultImpl
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/CACertCAEnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/CACertCAEnrollProfile.java
index 3ad301b266113c827544ce1ef959b4ee59d2fa09..b95b2233955e1ab455d063f727b6b753a5883613 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/CACertCAEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/CACertCAEnrollProfile.java
@@ -49,8 +49,7 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         createProfileOutput("o1", "certOutputImpl", outputParams1);
 
         // create policies
-        IProfilePolicy policy1 =
-                createProfilePolicy("set1", "p1",
+        createProfilePolicy("set1", "p1",
                         "userSubjectNameDefaultImpl", "noConstraintImpl");
 
         IProfilePolicy policy2 =
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 f2e921a53bc162e342dc03fd95bc7650f0899f73..71641e4d5fc20c7fcad8dafa74c598c517d8070b 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
@@ -379,7 +379,6 @@ public abstract class EnrollProfile extends BasicProfile
             org.mozilla.jss.pkix.cms.SignedData cmcFullReq = 
                 (org.mozilla.jss.pkix.cms.SignedData) cmcReq.getInterpretedContent();
             org.mozilla.jss.pkix.cms.EncapsulatedContentInfo ci = cmcFullReq.getContentInfo();
-            OBJECT_IDENTIFIER id = ci.getContentType();
             OCTET_STRING content = ci.getContent();
 
             ByteArrayInputStream s = new ByteArrayInputStream(content.toByteArray());
@@ -1158,8 +1157,6 @@ public abstract class EnrollProfile extends BasicProfile
 
             /* get SPKAC Algorithm & Signature */
             DerValue derSPKACContent[] = derIn.getSequence(3);
-            AlgorithmId mAlgId = AlgorithmId.parse(derSPKACContent[1]);
-            byte mSignature[] = derSPKACContent[2].getBitString();
 
             /* get PKAC SPKI & Challenge */
             byte mPKAC[] = derSPKACContent[0].toByteArray();
@@ -1167,15 +1164,8 @@ public abstract class EnrollProfile extends BasicProfile
             derIn = new DerInputStream(mPKAC);
             DerValue derPKACContent[] = derIn.getSequence(2);
 
-            DerValue mDerSPKI = derPKACContent[0];
             X509Key mSPKI = X509Key.parse(derPKACContent[0]);
 
-            String mChallenge;
-            DerValue mDerChallenge = derPKACContent[1];
-
-            if (mDerChallenge.length() != 0)
-                mChallenge = derPKACContent[1].getIA5String();
-
             CertificateX509Key certKey = new CertificateX509Key(mSPKI);
             ByteArrayOutputStream certKeyOut = new ByteArrayOutputStream();
             certKey.encode(certKeyOut);
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 558338e7fcdadf9c9388073e3cf0513bc484684e..e6f5019a008e36e19bc8355f9bb391a63b9cb866 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
@@ -72,285 +72,285 @@ public class KeyConstraint extends EnrollConstraint {
             "sect131r1", "sect131r2"
     };
 
-    private final static HashMap<String, Vector> ecOIDs = new HashMap<String, Vector>();
+    private final static HashMap<String, Vector<String>> ecOIDs = new HashMap<String, Vector<String>>();
     static {
-        ecOIDs.put("1.2.840.10045.3.1.7", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.7", new Vector<String>() {
             {
                 add("nistp256");
                 add("secp256r1");
             }
         });
-        ecOIDs.put("1.3.132.0.34", new Vector() {
+        ecOIDs.put("1.3.132.0.34", new Vector<String>() {
             {
                 add("nistp384");
                 add("secp384r1");
             }
         });
-        ecOIDs.put("1.3.132.0.35", new Vector() {
+        ecOIDs.put("1.3.132.0.35", new Vector<String>() {
             {
                 add("nistp521");
                 add("secp521r1");
             }
         });
-        ecOIDs.put("1.3.132.0.1", new Vector() {
+        ecOIDs.put("1.3.132.0.1", new Vector<String>() {
             {
                 add("sect163k1");
                 add("nistk163");
             }
         });
-        ecOIDs.put("1.3.132.0.2", new Vector() {
+        ecOIDs.put("1.3.132.0.2", new Vector<String>() {
             {
                 add("sect163r1");
             }
         });
-        ecOIDs.put("1.3.132.0.15", new Vector() {
+        ecOIDs.put("1.3.132.0.15", new Vector<String>() {
             {
                 add("sect163r2");
                 add("nistb163");
             }
         });
-        ecOIDs.put("1.3.132.0.24", new Vector() {
+        ecOIDs.put("1.3.132.0.24", new Vector<String>() {
             {
                 add("sect193r1");
             }
         });
-        ecOIDs.put("1.3.132.0.25", new Vector() {
+        ecOIDs.put("1.3.132.0.25", new Vector<String>() {
             {
                 add("sect193r2");
             }
         });
-        ecOIDs.put("1.3.132.0.26", new Vector() {
+        ecOIDs.put("1.3.132.0.26", new Vector<String>() {
             {
                 add("sect233k1");
                 add("nistk233");
             }
         });
-        ecOIDs.put("1.3.132.0.27", new Vector() {
+        ecOIDs.put("1.3.132.0.27", new Vector<String>() {
             {
                 add("sect233r1");
                 add("nistb233");
             }
         });
-        ecOIDs.put("1.3.132.0.3", new Vector() {
+        ecOIDs.put("1.3.132.0.3", new Vector<String>() {
             {
                 add("sect239k1");
             }
         });
-        ecOIDs.put("1.3.132.0.16", new Vector() {
+        ecOIDs.put("1.3.132.0.16", new Vector<String>() {
             {
                 add("sect283k1");
                 add("nistk283");
             }
         });
-        ecOIDs.put("1.3.132.0.17", new Vector() {
+        ecOIDs.put("1.3.132.0.17", new Vector<String>() {
             {
                 add("sect283r1");
                 add("nistb283");
             }
         });
-        ecOIDs.put("1.3.132.0.36", new Vector() {
+        ecOIDs.put("1.3.132.0.36", new Vector<String>() {
             {
                 add("sect409k1");
                 add("nistk409");
             }
         });
-        ecOIDs.put("1.3.132.0.37", new Vector() {
+        ecOIDs.put("1.3.132.0.37", new Vector<String>() {
             {
                 add("sect409r1");
                 add("nistb409");
             }
         });
-        ecOIDs.put("1.3.132.0.38", new Vector() {
+        ecOIDs.put("1.3.132.0.38", new Vector<String>() {
             {
                 add("sect571k1");
                 add("nistk571");
             }
         });
-        ecOIDs.put("1.3.132.0.39", new Vector() {
+        ecOIDs.put("1.3.132.0.39", new Vector<String>() {
             {
                 add("sect571r1");
                 add("nistb571");
             }
         });
-        ecOIDs.put("1.3.132.0.9", new Vector() {
+        ecOIDs.put("1.3.132.0.9", new Vector<String>() {
             {
                 add("secp160k1");
             }
         });
-        ecOIDs.put("1.3.132.0.8", new Vector() {
+        ecOIDs.put("1.3.132.0.8", new Vector<String>() {
             {
                 add("secp160r1");
             }
         });
-        ecOIDs.put("1.3.132.0.30", new Vector() {
+        ecOIDs.put("1.3.132.0.30", new Vector<String>() {
             {
                 add("secp160r2");
             }
         });
-        ecOIDs.put("1.3.132.0.31", new Vector() {
+        ecOIDs.put("1.3.132.0.31", new Vector<String>() {
             {
                 add("secp192k1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.1", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.1", new Vector<String>() {
             {
                 add("secp192r1");
                 add("nistp192");
                 add("prime192v1");
             }
         });
-        ecOIDs.put("1.3.132.0.32", new Vector() {
+        ecOIDs.put("1.3.132.0.32", new Vector<String>() {
             {
                 add("secp224k1");
             }
         });
-        ecOIDs.put("1.3.132.0.33", new Vector() {
+        ecOIDs.put("1.3.132.0.33", new Vector<String>() {
             {
                 add("secp224r1");
                 add("nistp224");
             }
         });
-        ecOIDs.put("1.3.132.0.10", new Vector() {
+        ecOIDs.put("1.3.132.0.10", new Vector<String>() {
             {
                 add("secp256k1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.2", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.2", new Vector<String>() {
             {
                 add("prime192v2");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.3", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.3", new Vector<String>() {
             {
                 add("prime192v3");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.4", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.4", new Vector<String>() {
             {
                 add("prime239v1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.5", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.5", new Vector<String>() {
             {
                 add("prime239v2");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.1.6", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.1.6", new Vector<String>() {
             {
                 add("prime239v3");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.1", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.1", new Vector<String>() {
             {
                 add("c2pnb163v1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.2", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.2", new Vector<String>() {
             {
                 add("c2pnb163v2");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.3", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.3", new Vector<String>() {
             {
                 add("c2pnb163v3");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.4", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.4", new Vector<String>() {
             {
                 add("c2pnb176v1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.5", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.5", new Vector<String>() {
             {
                 add("c2tnb191v1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.6", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.6", new Vector<String>() {
             {
                 add("c2tnb191v2");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.7", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.7", new Vector<String>() {
             {
                 add("c2tnb191v3");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.10", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.10", new Vector<String>() {
             {
                 add("c2pnb208w1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.11", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.11", new Vector<String>() {
             {
                 add("c2tnb239v1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.12", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.12", new Vector<String>() {
             {
                 add("c2tnb239v2");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.13", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.13", new Vector<String>() {
             {
                 add("c2tnb239v3");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.16", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.16", new Vector<String>() {
             {
                 add("c2pnb272w1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.17", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.17", new Vector<String>() {
             {
                 add("c2pnb304w1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.19", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.19", new Vector<String>() {
             {
                 add("c2pnb368w1");
             }
         });
-        ecOIDs.put("1.2.840.10045.3.0.20", new Vector() {
+        ecOIDs.put("1.2.840.10045.3.0.20", new Vector<String>() {
             {
                 add("c2tnb431r1");
             }
         });
-        ecOIDs.put("1.3.132.0.6", new Vector() {
+        ecOIDs.put("1.3.132.0.6", new Vector<String>() {
             {
                 add("secp112r1");
             }
         });
-        ecOIDs.put("1.3.132.0.7", new Vector() {
+        ecOIDs.put("1.3.132.0.7", new Vector<String>() {
             {
                 add("secp112r2");
             }
         });
-        ecOIDs.put("1.3.132.0.28", new Vector() {
+        ecOIDs.put("1.3.132.0.28", new Vector<String>() {
             {
                 add("secp128r1");
             }
         });
-        ecOIDs.put("1.3.132.0.29", new Vector() {
+        ecOIDs.put("1.3.132.0.29", new Vector<String>() {
             {
                 add("secp128r2");
             }
         });
-        ecOIDs.put("1.3.132.0.4", new Vector() {
+        ecOIDs.put("1.3.132.0.4", new Vector<String>() {
             {
                 add("sect113r1");
             }
         });
-        ecOIDs.put("1.3.132.0.5", new Vector() {
+        ecOIDs.put("1.3.132.0.5", new Vector<String>() {
             {
                 add("sect113r2");
             }
         });
-        ecOIDs.put("1.3.132.0.22", new Vector() {
+        ecOIDs.put("1.3.132.0.22", new Vector<String>() {
             {
                 add("sect131r1");
             }
         });
-        ecOIDs.put("1.3.132.0.23", new Vector() {
+        ecOIDs.put("1.3.132.0.23", new Vector<String>() {
             {
                 add("sect131r2");
             }
@@ -422,7 +422,6 @@ public class KeyConstraint extends EnrollConstraint {
             }
 
             int keySize = 0;
-            String ecCurve = "";
 
             if (alg.equals("RSA")) {
                 keySize = getRSAKeyLen(key);
@@ -468,7 +467,7 @@ public class KeyConstraint extends EnrollConstraint {
                 }
 
                 CMS.debug("EC key OID: " + params);
-                Vector vect = ecOIDs.get(params);
+                Vector<String> vect = ecOIDs.get(params);
 
                 boolean curveFound = false;
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/SigningAlgConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/SigningAlgConstraint.java
index 2125bb81e45fc19d1c7a02b22b66c221e8635438..4dbe329b32161f143de978124ebd877a94731278 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/SigningAlgConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/SigningAlgConstraint.java
@@ -117,7 +117,7 @@ public class SigningAlgConstraint extends EnrollConstraint {
             AlgorithmId id = (AlgorithmId)
                     algId.get(CertificateAlgorithmId.ALGORITHM);
 
-            Vector mCache = new Vector();
+            Vector<String> mCache = new Vector<String>();
             StringTokenizer st = new StringTokenizer(
                     getConfig(CONFIG_ALGORITHMS_ALLOWED), ",");
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
index 76ea4e1436ddc30ea75305385f82f6d3ee6aa647..4e4f951f7019254328491ac8c1a16744ff39ca16 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/AuthInfoAccessExtDefault.java
@@ -340,7 +340,7 @@ public class AuthInfoAccessExtDefault extends EnrollExtDefault {
             int num = getNumAds();
 
             CMS.debug("AuthInfoAccess num=" + num);
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
             for (int i = 0; i < num; i++) {
                 NameValuePairs np = new NameValuePairs();
@@ -375,7 +375,6 @@ public class AuthInfoAccessExtDefault extends EnrollExtDefault {
 
     public String getText(Locale locale) {
         StringBuffer ads = new StringBuffer();
-        String numAds = getConfig(CONFIG_NUM_ADS);
         int num = getNumAds();
 
         for (int i = 0; i < num; i++) {
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 c7a0f9abd2ebd12e2187b8a925bc6b520e7a2b2e..d1def3d5df7ac2674ad350499ffd1be4bee55028 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
@@ -434,8 +434,6 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
             if (ext == null)
                 return "";
 
-            StringBuffer sb = new StringBuffer();
-
             Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
 
@@ -497,7 +495,6 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
             if (gn != null) {
                 hasFullName = true;
-                int type = gn.getType();
 
                 pairs.put(POINT_TYPE, getGeneralNameType(gn));
                 pairs.put(POINT_NAME, getGeneralNameValue(gn));
@@ -528,7 +525,6 @@ public class CRLDistributionPointsExtDefault extends EnrollExtDefault {
 
             if (gn != null) {
                 hasFullName = true;
-                int type = gn.getType();
 
                 pairs.put(ISSUER_TYPE, getGeneralNameType(gn));
                 pairs.put(ISSUER_NAME, getGeneralNameValue(gn));
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 5310986d543b04eac316f78eacbf4a8675888968..67ebadbe4ea8709397d23d6ae33f37654e1376c8 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
@@ -396,7 +396,6 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         int pos = name.indexOf(':');
         if (pos == -1)
             return false;
-        String nameType = name.substring(0, pos).trim();
         String nameValue = name.substring(pos + 1).trim();
         if (nameValue.equals(""))
             return false;
@@ -480,7 +479,7 @@ public abstract class EnrollDefault implements IPolicyDefault, ICertInfoPolicyDe
         if (nameType.equalsIgnoreCase("OIDName")) {
             try {
                 // check if OID
-                ObjectIdentifier oid = new ObjectIdentifier(nameValue);
+                new ObjectIdentifier(nameValue);
             } catch (Exception e) {
                 return null;
             }
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 739fd3448a890ee16cda9ea4f3b8fd9b7c35d36e..acbbd108956b9840f72c7803b8cefa88c39696d4 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
@@ -379,8 +379,6 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
             if (ext == null)
                 return "";
 
-            StringBuffer sb = new StringBuffer();
-
             Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
             int num = getNumPoints();
             for (int i = 0; i < num; i++) {
@@ -431,7 +429,6 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
             if (gn != null) {
                 hasFullName = true;
-                int type = gn.getType();
 
                 pairs.put(POINT_TYPE, getGeneralNameType(gn));
                 pairs.put(POINT_NAME, getGeneralNameValue(gn));
@@ -453,7 +450,6 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
             if (gn != null) {
                 hasFullName = true;
-                int type = gn.getType();
 
                 pairs.put(ISSUER_TYPE, getGeneralNameType(gn));
                 pairs.put(ISSUER_NAME, getGeneralNameValue(gn));
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 1f05fef3e76368e6330cb0b3e0629b939539b909..712641c0d5accbaef2d46dee8c3b3761f4ff8efd 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
@@ -310,9 +310,6 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
             Enumeration<CertificatePolicyMap> maps = ext.getMappings();
 
-            int num = 0;
-            StringBuffer sb = new StringBuffer();
-
             Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
             for (int i = 0; i < num_mappings; i++) {
@@ -346,7 +343,6 @@ public class PolicyMappingsExtDefault extends EnrollExtDefault {
 
     public String getText(Locale locale) {
         StringBuffer sb = new StringBuffer();
-        String numMappings = getConfig(CONFIG_NUM_POLICY_MAPPINGS);
         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 b205f7df481a30faf9cdc7339efa9b62f0331b1c..d3838577e85bc5f56a3a7456b9bd2e1ef4ef164f 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
@@ -382,7 +382,6 @@ public class SubjectAltNameExtDefault extends EnrollExtDefault {
      */
     public String getText(Locale locale) {
         StringBuffer sb = new StringBuffer();
-        String numGNs = getConfig(CONFIG_NUM_GNS);
         int num = getNumGNs();
 
         for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
index 104b29a083c554040ecf6c573d91eb2c708fc06f..8ea7533cc2e1b88130b245e464a8947538fbb25b 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
@@ -335,7 +335,7 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
             int num = getNumAds();
 
             CMS.debug("SubjectInfoAccess num=" + num);
-            Vector recs = new Vector();
+            Vector<NameValuePairs> recs = new Vector<NameValuePairs>();
 
             for (int i = 0; i < num; i++) {
                 NameValuePairs np = new NameValuePairs();
@@ -370,7 +370,6 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
 
     public String getText(Locale locale) {
         StringBuffer ads = new StringBuffer();
-        String numAds = getConfig(CONFIG_NUM_ADS);
         int num = getNumAds();
 
         for (int i = 0; i < num; i++) {
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
index abdc770baace9aff545ef16e75d37fe1f55f9b22..bbf6415408162b26036a8389a08dd351eeee8c3c 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCaSimpleMap.java
@@ -264,11 +264,6 @@ public class LdapCaSimpleMap implements ILdapMapper, IExtendedPluginInfo {
                 "organizationalPerson",
                 "inetOrgPerson" };
 
-        String oOc[] = { "top",
-                "organization" };
-        String oiOc[] = { "top",
-                "organizationalunit" };
-
         DN dnobj = new DN(dn);
         String attrval[] = dnobj.explodeDN(true);
 
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCrlIssuerCompsMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCrlIssuerCompsMap.java
index 4451706a3102cd48c3953095c0abd7ebbc561649..654de5d302b33b17522c678a94ff17af951bccb6 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCrlIssuerCompsMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCrlIssuerCompsMap.java
@@ -83,15 +83,15 @@ public class LdapCrlIssuerCompsMap
         return "LdapCrlIssuerCompsMap";
     }
 
-    public Vector getDefaultParams() {
-        Vector v = super.getDefaultParams();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = super.getDefaultParams();
 
         //v.addElement("crlAttr=" + LdapCrlPublisher.LDAP_CRL_ATTR);
         return v;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = super.getInstanceParams();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = super.getInstanceParams();
 
         return v;
     }
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/NoMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/NoMap.java
index cddc589bd921aa3f7a7abe7cc84b12e7dc409541..155c54ce085ae0aa2ffa8f5dd5139ae2a829ef4c 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/NoMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/NoMap.java
@@ -91,13 +91,13 @@ public class NoMap implements ILdapMapper, IExtendedPluginInfo {
         return "NoMap";
     }
 
-    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/cms/publish/publishers/FileBasedPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/FileBasedPublisher.java
index 5e8ad1282380e86e27b84090126b0fce5ffd1556..cb13b2452d55318ec46dc51cad3e9545760dd24f 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
@@ -181,7 +181,6 @@ public class FileBasedPublisher implements ILdapPublisher, IExtendedPluginInfo {
     public void init(IConfigStore config) {
         mConfig = config;
         String dir = null;
-        String ext = null;
 
         try {
             dir = mConfig.getString(PROP_DIR, null);
@@ -366,8 +365,6 @@ public class FileBasedPublisher implements ILdapPublisher, IExtendedPluginInfo {
                     if (encodedArray == null)
                         encodedArray = crl.getEncoded();
 
-                    ByteArrayOutputStream os = new ByteArrayOutputStream();
-
                     fos = new FileOutputStream(tempFile);
                     fos.write(Utils.base64encode(encodedArray).getBytes());
                     fos.close();
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCaCertPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCaCertPublisher.java
index 29b874a942d8d353b69279d53cf868fb24dea4da..e47318b7665c169f74dbc1f857d0549859732f51 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCaCertPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCaCertPublisher.java
@@ -93,16 +93,16 @@ public class LdapCaCertPublisher
         return "LdapCaCertPublisher";
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("caCertAttr=" + mCaCertAttr);
         v.addElement("caObjectClass=" + mCaObjectclass);
         return v;
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("caCertAttr=" + mCaCertAttr);
         v.addElement("caObjectClass=" + mCaObjectclass);
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
index 5975872ff4e67e07143450241051e0c45ad43db5..9000f6834ee00d73c52cca306e7976c2405352ee 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertSubjPublisher.java
@@ -74,16 +74,16 @@ public class LdapCertSubjPublisher implements ILdapPublisher {
         return "LdapCertSubjPublisher";
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         v.addElement("subjectNameAttr=" + mSubjNameAttr);
         return v;
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("certAttr=" + mCertAttr);
         v.addElement("subjectNameAttr=" + mSubjNameAttr);
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertificatePairPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertificatePairPublisher.java
index 624cb1478723626f9ca4e0c92621f13bbe0e7dbf..c65ff79d584a7a4df9f470e5314e12ebac090c6f 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertificatePairPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCertificatePairPublisher.java
@@ -91,20 +91,20 @@ public class LdapCertificatePairPublisher
         return "LdapCertificatePairPublisher";
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("crossCertPairAttr=" + mCrossCertPairAttr);
         v.addElement("caObjectClass=" + mCaObjectclass);
         return v;
     }
 
-    public Vector getInstanceParamsWithExtras() {
+    public Vector<String> getInstanceParamsWithExtras() {
         return getInstanceParams();
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("crossCertPairAttr=" + mCrossCertPairAttr);
         v.addElement("caObjectClass=" + mCaObjectclass);
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCrlPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCrlPublisher.java
index 7c069f398cdc7950a38295362f7bf9b5c50e903f..6826cc8015407b0d8b13074036073ca641d8a553 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCrlPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapCrlPublisher.java
@@ -93,16 +93,16 @@ public class LdapCrlPublisher implements ILdapPublisher, IExtendedPluginInfo {
         return params;
     }
 
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("crlAttr=" + mCrlAttr);
         v.addElement("crlObjectClass=" + mCrlObjectClass);
         return v;
     }
 
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         v.addElement("crlAttr=" + mCrlAttr);
         v.addElement("crlObjectClass=" + mCrlObjectClass);
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
index 0eba679adec5499663d3b9c8da165943732f9dbd..e31ce674cd4a08cdb01c84d9b6178cb4ba7f6d24 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/LdapUserCertPublisher.java
@@ -79,15 +79,15 @@ public class LdapUserCertPublisher implements ILdapPublisher, IExtendedPluginInf
 
     }
 
-    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;
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/PublisherUtils.java b/pki/base/common/src/com/netscape/cms/publish/publishers/PublisherUtils.java
index 314e87e63554b9d405b4c9dc2eaa41539d591271..af8d283ddb92e075e6fe92c69500dd16735fb2fc 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/PublisherUtils.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/PublisherUtils.java
@@ -126,7 +126,7 @@ public class PublisherUtils {
      * there'll be trouble if the Vector contains something other
      * than just Strings
      */
-    public static String[] getStringArrayFromVector(Vector v) {
+    public static String[] getStringArrayFromVector(Vector<String> v) {
         String s[] = new String[v.size()];
 
         v.copyInto(s);
diff --git a/pki/base/common/src/com/netscape/cms/request/RequestScheduler.java b/pki/base/common/src/com/netscape/cms/request/RequestScheduler.java
index 089793bbed18241149dea446c0e32e9a8ba1a210..e0ebaefc48f8fda973b91cfff7aadcede0c98a24 100644
--- a/pki/base/common/src/com/netscape/cms/request/RequestScheduler.java
+++ b/pki/base/common/src/com/netscape/cms/request/RequestScheduler.java
@@ -31,7 +31,7 @@ import com.netscape.certsrv.request.IRequestScheduler;
  * @version $Revision$, $Date$
  */
 public class RequestScheduler implements IRequestScheduler {
-    private Vector mRequestThreads = new Vector();
+    private Vector<Thread> mRequestThreads = new Vector<Thread>();
 
     /**
      * Request entered the request queue processing.
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/ACLAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/ACLAdminServlet.java
index bde07533455902376659d0bc6e7c847ce1c49da1..12575675c5cfec81b7c558ba72981f93ef804de0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/ACLAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/ACLAdminServlet.java
@@ -20,7 +20,6 @@ package com.netscape.cms.servlet.admin;
 import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Locale;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -34,7 +33,6 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authorization.IAuthzManager;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
-import com.netscape.certsrv.base.SessionContext;
 import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.common.OpDef;
@@ -42,7 +40,6 @@ import com.netscape.certsrv.common.ScopeDef;
 import com.netscape.certsrv.evaluators.IAccessEvaluator;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.usrgrp.IUGSubsystem;
-import com.netscape.certsrv.usrgrp.IUser;
 
 /**
  * Manage Access Control List configuration
@@ -119,8 +116,6 @@ public class ACLAdminServlet extends AdminServlet {
             return;
         }
 
-        Locale clientLocale = super.getLocale(req);
-
         try {
             super.authenticate(req);
         } catch (IOException e) {
@@ -130,21 +125,6 @@ public class ACLAdminServlet extends AdminServlet {
             return;
         }
 
-        IUser user = null;
-
-        try {
-            SessionContext mSC = SessionContext.getContext();
-
-            user = (IUser)
-                    mSC.get(SessionContext.USER);
-        } catch (Exception e) {
-            log(ILogger.LL_FAILURE, e.toString());
-            sendResponse(ERROR,
-                    CMS.getUserMessage(getLocale(req), "CMS_ADMIN_SRVLT_PERFORM_FAILED"),
-                    null, resp);
-            return;
-        }
-
         try {
             AUTHZ_RES_NAME = "certServer.acl.configuration";
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
index c7d7d619e2b5fe208756c4327bdc3c391ae66340..dbcba085d9e6564e0ad1e88a389410a8216fb87e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/AdminServlet.java
@@ -354,10 +354,6 @@ public class AdminServlet extends HttpServlet {
             SessionContext sc = SessionContext.getContext();
             IAuthToken token = null;
 
-            // a kludge for the desperately pinging console
-            String scope = req.getParameter(Constants.OP_SCOPE);
-            String op = req.getParameter(Constants.OP_TYPE);
-
             log(ILogger.LL_DEBUG, CMS.getLogMessage("ADMIN_SRVLT_ABOUT_AUTH",
                     mServletID));
             try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/LogAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
index be723fcd66e7bdec40ec2b11ab4d0b26f60591d9..bf9f169d61d505a7b95aa1d0e60e620c9ade42ce 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
@@ -339,7 +339,6 @@ public class LogAdminServlet extends AdminServlet {
             IOException, EBaseException {
 
         NameValuePairs params = new NameValuePairs();
-        String insts = null;
         Enumeration<String> e = mSys.getLogInsts().keys();
 
         for (; e.hasMoreElements();) {
@@ -1148,10 +1147,7 @@ public class LogAdminServlet extends AdminServlet {
             // only remove from memory
             // cannot shutdown because we don't keep track of whether it's
             // being used. 
-            ILogEventListener logInst = (ILogEventListener)
-                    mSys.getLogInstance(id);
-
-            mSys.getLogInsts().remove((Object) id);
+            mSys.getLogInsts().remove(id);
 
             // remove the configuration.
             IConfigStore destStore =
@@ -1453,7 +1449,6 @@ public class LogAdminServlet extends AdminServlet {
         // to the signed audit log and stored as failures
         try {
             String id = req.getParameter(Constants.RS_ID);
-            String type = "";
 
             // if this "required" parameter is not present,
             // always log messages to the signed audit log
@@ -1670,10 +1665,6 @@ public class LogAdminServlet extends AdminServlet {
                             val = Integer.toString(60 * 60 * 24 * 365);
                     }
 
-                    if (key.equals(Constants.PR_LOG_TYPE)) {
-                        type = val;
-                    }
-
                     if (val != null) {
                         if (key.equals("fileName")) {
                             String origVal = substore.getString(key);
@@ -1771,11 +1762,9 @@ public class LogAdminServlet extends AdminServlet {
             // Instantiate an object for new implementation
 
             String className = plugin.getClassPath();
-            ILogEventListener newMgrInst = null;
 
             try {
-                newMgrInst = (ILogEventListener)
-                        Class.forName(className).newInstance();
+                Class.forName(className).newInstance();
             } catch (ClassNotFoundException e) {
                 // check to see if the log file path parameter was changed
                 newLogPath = auditCheckLogPath(req);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
index 59eead9df5e763b9714e503e69b366961df8f9a0..0e6784413266147fc77736efc0e1163aca0aa584 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/OCSPAdminServlet.java
@@ -491,7 +491,6 @@ public class OCSPAdminServlet extends AdminServlet {
         try {
             @SuppressWarnings("unchecked")
             Enumeration<String> enum1 = req.getParameterNames();
-            boolean restart = false;
 
             while (enum1.hasMoreElements()) {
                 String key = (String) enum1.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
index 9eb5c3455f51c16fb1b209a5bbe3652feff372dc..f656cbd440ff741a729fc976ecc6df11f0458e7f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/PolicyAdminServlet.java
@@ -465,7 +465,6 @@ public class PolicyAdminServlet extends AdminServlet {
 
         // Assemble name value pairs
         NameValuePairs nvp = new NameValuePairs();
-        String instName, rest;
 
         while (instancesInfo.hasMoreElements()) {
             String info = instancesInfo.nextElement();
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 3774d6e6f44cf244a1ec6b30173747014e3867ae..483ac42ef3a75c5d3a08a36fb07523f842655a49 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
@@ -372,7 +372,6 @@ public class PublisherAdminServlet extends AdminServlet {
 
         if (implType.equals(Constants.PR_EXT_PLUGIN_IMPLTYPE_PUBLISHRULE)) {
             IPublisherProcessor p_processor = mProcessor;
-            RulePlugin plugin = p_processor.getRulePlugins().get(implName);
 
             // Should get the registered rules from processor
             // instead of plugin
@@ -1324,10 +1323,7 @@ public class PublisherAdminServlet extends AdminServlet {
         // only remove from memory
         // cannot shutdown because we don't keep track of whether it's
         // being used. 
-        ILdapMapper mapperInst = (ILdapMapper)
-                mProcessor.getMapperInstance(id);
-
-        mProcessor.getMapperInsts().remove((Object) id);
+        mProcessor.getMapperInsts().remove(id);
 
         // remove the configuration.
         IConfigStore destStore =
@@ -2019,10 +2015,7 @@ public class PublisherAdminServlet extends AdminServlet {
         // only remove from memory
         // cannot shutdown because we don't keep track of whether it's
         // being used. 
-        ILdapRule ruleInst = (ILdapRule)
-                mProcessor.getRuleInsts().get(id);
-
-        mProcessor.getRuleInsts().remove((Object) id);
+        mProcessor.getRuleInsts().remove(id);
 
         // remove the configuration.
         IConfigStore destStore =
@@ -2674,9 +2667,7 @@ public class PublisherAdminServlet extends AdminServlet {
         // only remove from memory
         // cannot shutdown because we don't keep track of whether it's
         // being used. 
-        ILdapPublisher publisherInst = mProcessor.getPublisherInstance(id);
-
-        mProcessor.getPublisherInsts().remove((Object) id);
+        mProcessor.getPublisherInsts().remove(id);
 
         // remove the configuration.
         IConfigStore destStore =
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 aa5494f0d0517055045670090e8b3a2adbbcfdf0..4bebe85d3d9d1f1d1b99d816b91af0ec519bb582 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
@@ -155,7 +155,6 @@ public class RegistryAdminServlet extends AdminServlet {
             throws ServletException, IOException {
         // Get operation type
         String op = req.getParameter(Constants.OP_TYPE);
-        String scope = req.getParameter(Constants.OP_SCOPE);
 
         if (op.equals(OpDef.OP_SEARCH)) {
             if (!readAuthorize(req, resp))
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
index b0a97e9b51ccd7355b1b9770231df7d9eff6ce46..0bf72687992485ad49a4975f5114280b90885091 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java
@@ -34,7 +34,6 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.AuthMgrPlugin;
 import com.netscape.certsrv.authentication.IAuthManager;
 import com.netscape.certsrv.authentication.IAuthSubsystem;
-import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 
@@ -200,7 +199,7 @@ public class DynamicVariablesServlet extends CMSServlet {
 
         if (mAuthMgr != null) {
             try {
-                IAuthToken token = authenticate(httpReq);
+                authenticate(httpReq);
             } catch (EBaseException e) {
                 mServletCtx.log(CMS.getLogMessage("CMSGW_FILE_NO_ACCESS", e.toString()));
                 httpResp.sendError(HttpServletResponse.SC_FORBIDDEN);
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 0dfe4a26cdd48059bb42b2158c54aa3a9001710b..5af09ad0dd615d34730f0d731941a0bafe7bde13 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
@@ -200,7 +200,6 @@ public class CMCRevReqServlet extends CMSServlet {
         if (authToken != null) {
             reasonCode = authToken.getInInteger(REASON_CODE);
         }
-        RevocationReason reason = RevocationReason.fromInt(reasonCode.intValue());
 
         String comments = "";
         Date invalidityDate = null;
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 4c0b56f0b7a1c11889388a84884fe6fb343037a1..5a1e4ed6596c99e3addbc298ab44ef41753cb692 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
@@ -160,7 +160,7 @@ public class DisplayBySerial extends CMSServlet {
             }
 
             serialNumber = getSerialNumber(req);
-            ICertRecord rec = getCertRecord(serialNumber, certType);
+            getCertRecord(serialNumber, certType); //throw exception on error
 
             if (certType[0].equalsIgnoreCase("x509")) {
                 form = getTemplate(mForm1Path, req, locale);
@@ -230,7 +230,7 @@ public class DisplayBySerial extends CMSServlet {
         String certType[] = new String[1];
 
         try {
-            ICertRecord rec = getCertRecord(seq, certType);
+            getCertRecord(seq, certType); // throw exception on error
 
             if (certType[0].equalsIgnoreCase("x509")) {
                 processX509(argSet, header, seq, req, resp, locale);
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 b84f5ace14ba8abe694a76793ebe00a0632a982e..1594c532378d57d392fdf237b77c1792ddeae4c1 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
@@ -291,7 +291,7 @@ public class DoRevoke extends CMSServlet {
                 if (authToken != null) {
 
                     String serialNumber = req.getParameter("serialNumber");
-                    X509CertImpl sslCert = (X509CertImpl) getSSLClientCertificate(req);
+                    getSSLClientCertificate(req); // throw exception on error
 
                     if (serialNumber != null) {
                         eeSerialNumber = serialNumber;
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 853fa1e45b95d0a7bc8d74f4bf93682cbaad049d..c4603dd511045ac8c04708a6750fd445025123ae 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
@@ -27,7 +27,6 @@ import java.math.BigInteger;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -254,8 +253,6 @@ public class DoRevokeTPS extends CMSServlet {
         }
 
         try {
-            ServletOutputStream out = resp.getOutputStream();
-
             if (!authorized) {
                 o_status = "status=3";
                 errorString = "error=unauthorized";
@@ -684,19 +681,6 @@ public class DoRevokeTPS extends CMSServlet {
 
                 if (mPublisherProcessor != null && mPublisherProcessor.ldapEnabled()) {
                     header.addStringValue("dirEnabled", "yes");
-                    Integer[] ldapPublishStatus =
-                            revReq.getExtDataInIntegerArray("ldapPublishStatus");
-                    int certsToUpdate = 0;
-                    int certsUpdated = 0;
-
-                    if (ldapPublishStatus != null) {
-                        certsToUpdate = ldapPublishStatus.length;
-                        for (int i = 0; i < certsToUpdate; i++) {
-                            if (ldapPublishStatus[i] == IRequest.RES_SUCCESS) {
-                                certsUpdated++;
-                            }
-                        }
-                    }
 
                     // add crl publishing status. 
                     String publError =
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
index c5fb568f2d58fb40d54c21db7a8fdaea0d0f2f9c..c6b6065b417a09bddc2e46a089c3b00ad1c4522e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
@@ -577,7 +577,7 @@ public class DoUnrevoke extends CMSServlet {
         String serialNumString = req.getParameter("serialNumber");
 
         StringTokenizer snList = new StringTokenizer(serialNumString, " ");
-        Vector biList = new Vector();
+        Vector<BigInteger> biList = new Vector<BigInteger>();
         while (snList.hasMoreTokens()) {
             String snStr = snList.nextToken();
             if (snStr != null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
index 9696198158e9bb429977172533355024a98fdb69..5d096aff325b6d85996685db1b9e7e66900ced01 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DoUnrevokeTPS.java
@@ -27,7 +27,6 @@ import java.util.Vector;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -51,7 +50,6 @@ import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.certsrv.request.RequestStatus;
 import com.netscape.cms.servlet.base.CMSServlet;
 import com.netscape.cms.servlet.common.CMSRequest;
-import com.netscape.cms.servlet.common.CMSTemplate;
 import com.netscape.cms.servlet.common.ECMSGWException;
 
 /**
@@ -125,8 +123,6 @@ public class DoUnrevokeTPS extends CMSServlet {
         BigInteger[] serialNumbers;
         EBaseException error = null;
 
-        CMSTemplate form = null;
-
         Locale[] locale = new Locale[1];
 
         /*
@@ -195,8 +191,6 @@ public class DoUnrevokeTPS extends CMSServlet {
         }
 
         try {
-            ServletOutputStream out = resp.getOutputStream();
-
             if (error == null) {
                 o_status = "status=0";
                 errorString = "error=";
@@ -530,7 +524,7 @@ public class DoUnrevokeTPS extends CMSServlet {
         String serialNumString = req.getParameter("serialNumber");
 
         StringTokenizer snList = new StringTokenizer(serialNumString, " ");
-        Vector biList = new Vector();
+        Vector<BigInteger> biList = new Vector<BigInteger>();
         while (snList.hasMoreTokens()) {
             String snStr = snList.nextToken();
             if (snStr != null) {
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 b580d7f7922ecd501b779d17f293da8aa6608efa..a73a8146ce2547eb4926a045c013c11dfa237f85 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
@@ -473,7 +473,6 @@ public class EnrollServlet extends CMSServlet {
                 (ICertRecordList) mCa.getCertificateRepository().findCertRecordsInList(filter, null, 10);
         int size = list.getSize();
         Enumeration<ICertRecord> en = list.getCertRecords(0, size - 1);
-        boolean gotEncCert = false;
 
         CMS.debug("EnrollServlet: signing cert filter " + filter);
 
@@ -989,14 +988,9 @@ public class EnrollServlet extends CMSServlet {
                     SUBJECT_KEYGEN_INFO, null);
             PKCS10 pkcs10 = null;
 
-            String certType = null;
-
-            //
-            String test = httpParams.getValueAsString("certNickname", null);
-
             // support Enterprise 3.5.1 server where CERT_TYPE=csrCertType
             // instead of certType
-            certType = httpParams.getValueAsString(OLD_CERT_TYPE, null);
+            String certType = httpParams.getValueAsString(OLD_CERT_TYPE, null);
             CMS.debug("EnrollServlet: certType " + certType);
 
             if (certType == null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetBySerial.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetBySerial.java
index b9a2221f219da412187ecc6d3aee4353414aac22..663397f5424a2ab276ed6af5dcfc24af252123eb 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetBySerial.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetBySerial.java
@@ -122,8 +122,6 @@ public class GetBySerial extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     public void process(CMSRequest cmsReq) throws EBaseException {
-        int serialNumber = -1;
-        boolean noError = true;
 
         HttpServletRequest req = cmsReq.getHttpReq();
         HttpServletResponse response = cmsReq.getHttpResp();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java
index ae75994983fa6a58d546e6584d905c4fd4bb9529..fe55f335bffa8db7ba8595acd88ab14ca5476e53 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java
@@ -255,7 +255,6 @@ public class GetCAChain extends CMSServlet {
             HttpServletResponse httpResp,
             CMSRequest cmsReq)
             throws EBaseException {
-        String outputString = null;
 
         CertificateChain certChain =
                 ((ICertAuthority) mAuthority).getCACertChain();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
index 9db5cb892101874eee84c40c63b27880d17b6aee..6af5c0c39f21c70a29090c175af48ae90f802d23 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetInfo.java
@@ -314,7 +314,7 @@ public class GetInfo extends CMSServlet {
 
                         if (crlSplits.length() > 0)
                             crlSplits.append("+");
-                        Vector splits = ip.getSplitTimes();
+                        Vector<Long> splits = ip.getSplitTimes();
 
                         for (int i = 0; i < splits.size(); i++) {
                             crlSplits.append(splits.elementAt(i));
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 4af8a6a6815884ee0024736c4be7100bf5df37e6..5e6207e1a316bfa1eaa9b56e612ec0515cd00fc4 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
@@ -67,7 +67,6 @@ import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.base.IConfigStore;
-import com.netscape.certsrv.base.KeyGenInfo;
 import com.netscape.certsrv.ca.ICertificateAuthority;
 import com.netscape.certsrv.dbs.certdb.ICertRecord;
 import com.netscape.certsrv.dbs.certdb.ICertRecordList;
@@ -413,18 +412,9 @@ public class HashEnrollServlet extends CMSServlet {
             // }
         }
 
-        // fill certInfo from input types: keygen, cmc, pkcs10 or crmf
-        KeyGenInfo keyGenInfo =
-                httpParams.getValueAsKeyGenInfo(SUBJECT_KEYGEN_INFO, null);
-
-        String certType = null;
-
-        //
-        String test = httpParams.getValueAsString("certNickname", null);
-
         // support Enterprise 3.5.1 server where CERT_TYPE=csrCertType
         // instead of certType
-        certType = httpParams.getValueAsString(OLD_CERT_TYPE, null);
+        String certType = httpParams.getValueAsString(OLD_CERT_TYPE, null);
         if (certType == null) {
             certType = httpParams.getValueAsString(CERT_TYPE, "client");
         } else {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
index 663eaae1a977ea060a9a711e3dc1db1ab048e1f7..22aa29eda9b4de1606da32b9e196b06a7ee6c445 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/RevocationServlet.java
@@ -149,7 +149,6 @@ public class RevocationServlet extends CMSServlet {
 
         BigInteger old_serial_no = null;
         X509CertImpl old_cert = null;
-        String revokeAll = null;
 
         CMSTemplate form = null;
         Locale[] locale = new Locale[1];
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 680886b95dcfc28b69924665ee0ff86efa062856..c0298d1e7bfe86d4f638ef948b70f9e4a377c5e8 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
@@ -121,7 +121,6 @@ public class UpdateCRL extends CMSServlet {
             statsSub.startTiming("crl", true /* main action */);
         }
 
-        long startTime = CMS.getCurrentDate().getTime();
         IAuthToken authToken = authenticate(cmsReq);
         AuthzToken authzToken = null;
 
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 525775d62848bb706482c1c07d244a6040e4a0eb..90a48cb4e802dd8f2943f24c89d18d86a9559d76 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
@@ -1112,7 +1112,6 @@ public class CRSEnrollment extends HttpServlet {
         KeyWrapper kw;
         Cipher cip;
         EncryptionAlgorithm ea;
-        boolean errorInRequest = false;
 
         // Unwrap the session key with the Cert server key
         try {
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 2edfc4f089cd0eaa416d157aec38d36447d572f8..38fcf24f9d11745c7b425bc3ac53975ffd339bd4 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
@@ -631,7 +631,6 @@ public class CMCOutputTemplate {
                         IRequestQueue queue = ca.getRequestQueue();
                         IRequest r = queue.findRequest(new RequestId(requestId));
                         if (r != null) {
-                            Integer result = r.getExtDataInInteger(IRequest.RESULT);
                             RequestStatus status = r.getRequestStatus();
                             if (status.equals(RequestStatus.PENDING)) {
                                 pending_bpids.addElement(reqId);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
index ecc5f45beeaebd92a2e99721d0212b1380ae2bc4..256c01010a3c8c2228bfedcdf7ed5356bc5878f6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSRequest.java
@@ -252,7 +252,7 @@ public class CMSRequest {
     }
 
     // policy errors; set on rejection or possibly deferral. 
-    public Vector getPolicyMessages() {
+    public Vector<String> getPolicyMessages() {
         if (mRequest != null) {
             return mRequest.getExtDataInStringVector(IRequest.ERRORS);
         }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java b/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
index 50feb08639db00f8e6281499b1597d15cc44187a..317bddbcdce1c754aafee726b956a46a8d88aaf8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/common/CMSTemplate.java
@@ -155,7 +155,6 @@ public class CMSTemplate extends CMSFile {
         Enumeration<String> e = null;
         Enumeration<IArgBlock> q = null;
         IArgBlock r = null;
-        boolean headerBlock = false, fixedBlock = false, queryBlock = false;
         CMSTemplateParams data = (CMSTemplateParams) input;
         HTTPOutputStreamWriter http_out = null;
 
@@ -191,7 +190,6 @@ public class CMSTemplate extends CMSFile {
             if (r != null) {
                 e = r.elements();
                 while (e.hasMoreElements()) {
-                    headerBlock = true;
                     String n = e.nextElement();
                     Object v = r.getValue(n);
 
@@ -204,7 +202,6 @@ public class CMSTemplate extends CMSFile {
             if (r != null) {
                 e = r.elements();
                 while (e.hasMoreElements()) {
-                    fixedBlock = true;
                     String n = e.nextElement();
                     Object v = r.getValue(n);
 
@@ -215,7 +212,6 @@ public class CMSTemplate extends CMSFile {
             // Output the query data
             q = data.queryRecords();
             if (q != null && q.hasMoreElements()) {
-                queryBlock = true;
                 out.println("var recordCount = 0;");
                 out.println("var record;");
                 while (q.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/connector/CloneServlet.java b/pki/base/common/src/com/netscape/cms/servlet/connector/CloneServlet.java
index 7defeeac9defeb010cddd83a0aa08871554c7feb..f9085a5bcc5448cc63b8c46da6918ada63144dc7 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/connector/CloneServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/connector/CloneServlet.java
@@ -27,7 +27,6 @@ import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 
 import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -100,8 +99,6 @@ public class CloneServlet extends CMSServlet {
             throw new IOException(
                     "CMS server is not ready to serve.");
 
-        ServletContext servletContext = mConfig.getServletContext();
-
         CMSRequest cmsRequest = newCMSRequest();
 
         // set argblock
@@ -125,8 +122,6 @@ public class CloneServlet extends CMSServlet {
         int len = -1;
         IPKIMessage msg = null;
         IPKIMessage replymsg = null;
-        IRequest r = null;
-        IRequest reply = null;
 
         // NOTE must read all bufer before redoing handshake for 
         // ssl client auth for client auth to work.
@@ -310,7 +305,6 @@ public class CloneServlet extends CMSServlet {
             String source, String sourceUserId, IPKIMessage msg, IAuthToken token)
             throws EBaseException {
         IPKIMessage replymsg = null;
-        IRequest r = null;
         IRequestQueue queue = mAuthority.getRequestQueue();
         String srcid = source + ":" + msg.getReqId();
 
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 4f708f78928117333d6cbfdd9aaa00aaddcddbd0..e8d4f898fcb74876ebbe71d6a3ce5f242bf743aa 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
@@ -31,7 +31,6 @@ import java.security.cert.X509Certificate;
 import java.util.Enumeration;
 
 import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -135,8 +134,6 @@ public class ConnectorServlet extends CMSServlet {
         HttpServletRequest req = (HttpServletRequest) request;
         HttpServletResponse resp = (HttpServletResponse) response;
 
-        ServletContext servletContext = mConfig.getServletContext();
-
         CMSRequest cmsRequest = newCMSRequest();
 
         // set argblock
@@ -160,8 +157,6 @@ public class ConnectorServlet extends CMSServlet {
         int len = -1;
         IPKIMessage msg = null;
         IPKIMessage replymsg = null;
-        IRequest r = null;
-        IRequest reply = null;
 
         // NOTE must read all bufer before redoing handshake for 
         // ssl client auth for client auth to work.
@@ -462,7 +457,6 @@ public class ConnectorServlet extends CMSServlet {
         IPKIMessage replymsg = null;
 
         try {
-            IRequest r = null;
             IRequestQueue queue = mAuthority.getRequestQueue();
             String srcid = source + ":" + msg.getReqId();
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/connector/GenerateKeyPairServlet.java b/pki/base/common/src/com/netscape/cms/servlet/connector/GenerateKeyPairServlet.java
index 0a4ea589e3164008e6bc83430d3e36faf2329db3..bb787c7ad6146f020589bbc2df2557ea4d7b3aa6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/connector/GenerateKeyPairServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/connector/GenerateKeyPairServlet.java
@@ -31,7 +31,6 @@ import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.authority.IAuthority;
 import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IPrettyPrintFormat;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.request.IRequest;
@@ -110,7 +109,6 @@ public class GenerateKeyPairServlet extends CMSServlet {
         IRequestQueue queue = mAuthority.getRequestQueue();
         IRequest thisreq = null;
 
-        IConfigStore sconfig = CMS.getConfigStore();
         boolean missingParam = false;
         String status = "0";
 
@@ -147,8 +145,6 @@ public class GenerateKeyPairServlet extends CMSServlet {
             rArchive = "true";
         }
 
-        String selectedToken = null;
-
         if (!missingParam) {
             thisreq = queue.newRequest(IRequest.NETKEY_KEYGEN_REQUEST);
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/connector/TokenKeyRecoveryServlet.java b/pki/base/common/src/com/netscape/cms/servlet/connector/TokenKeyRecoveryServlet.java
index dfceddd96a802b765587031716c93e83916a9941..337b242592ac1bad068f985c971825ce89e2fa0a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/connector/TokenKeyRecoveryServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/connector/TokenKeyRecoveryServlet.java
@@ -33,7 +33,6 @@ import com.netscape.certsrv.authority.IAuthority;
 import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IPrettyPrintFormat;
-import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
 import com.netscape.cms.servlet.base.CMSServlet;
@@ -179,8 +178,6 @@ public class TokenKeyRecoveryServlet extends CMSServlet {
             missingParam = true;
         }
 
-        String selectedToken = null;
-
         if (!missingParam) {
             thisreq = queue.newRequest(IRequest.NETKEY_KEYRECOVERY_REQUEST);
 
@@ -212,7 +209,6 @@ public class TokenKeyRecoveryServlet extends CMSServlet {
 
         resp.setContentType("text/html");
 
-        String outputString = "";
         String wrappedPrivKeyString = "";
         String publicKeyString = "";
         String ivString = "";
@@ -327,22 +323,4 @@ public class TokenKeyRecoveryServlet extends CMSServlet {
         // end Netkey functions
 
     }
-
-    /**
-     * XXX remember to check peer SSL cert and get RA id later
-     * 
-     * Serves HTTP admin request.
-     * 
-     * @param req HTTP request
-     * @param resp HTTP response
-     */
-    public void service(HttpServletRequest req, HttpServletResponse resp)
-            throws ServletException, IOException {
-        String scope = req.getParameter(Constants.OP_SCOPE);
-        String op = req.getParameter(Constants.OP_TYPE);
-
-        super.service(req, resp);
-
-    }
-
 }
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 b8cc8022e2bc6070c75ecc498c4ab16e6acc69fc..585d444d4f69e0fa66dcadad0b3642c54138fd21 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
@@ -27,8 +27,6 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.velocity.context.Context;
 import org.mozilla.jss.CryptoManager;
-import org.mozilla.jss.crypto.CryptoStore;
-import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.crypto.X509Certificate;
 
 import com.netscape.certsrv.apps.CMS;
@@ -310,8 +308,7 @@ public class AdminAuthenticatePanel extends WizardPanelBase {
             while (st.hasMoreTokens()) {
                 String token = st.nextToken();
                 String tokenname = config.getString("preop.module.token", "");
-                CryptoToken tok = cm.getTokenByName(tokenname);
-                CryptoStore store = tok.getCryptoStore();
+                cm.getTokenByName(tokenname); // throw exception on error
                 String name1 = "preop.master." + token + ".nickname";
                 String nickname = config.getString(name1, "");
                 if (!tokenname.equals("Internal Key Storage Token") &&
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 4e73b8369f0a94fc7e3a39bac8288cfca4836af5..1f5a3327cc057fa3ff37b6f705391e077091bd0f 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
@@ -149,10 +149,8 @@ public class AdminPanel extends WizardPanelBase {
         String info = "";
         context.put("import", "true");
 
-        String subsystemtype = "";
         try {
             type = cs.getString("preop.ca.type", "");
-            subsystemtype = cs.getString("cs.type", "");
         } catch (Exception e) {
         }
 
@@ -254,12 +252,10 @@ public class AdminPanel extends WizardPanelBase {
 
         String type = "";
         String subsystemtype = "";
-        String security_domain_type = "";
         String selected_hierarchy = "";
         try {
             type = config.getString(PRE_CA_TYPE, "");
             subsystemtype = config.getString("cs.type", "");
-            security_domain_type = config.getString("securitydomain.select", "");
             selected_hierarchy = config.getString("preop.hierarchy.select", "");
         } catch (Exception e) {
         }
@@ -277,7 +273,6 @@ public class AdminPanel extends WizardPanelBase {
         String name = HttpInput.getName(request, "name");
 
         CMS.debug("AdminPanel update: email address = " + email);
-        String pwd = HttpInput.getPassword(request, "__pwd");
 
         config.putString("preop.admin.uid", uid);
         config.putString("preop.admin.email", email);
@@ -455,14 +450,6 @@ public class AdminPanel extends WizardPanelBase {
     private void submitRequest(String ca_hostname, int ca_port, HttpServletRequest request,
             HttpServletResponse response, Context context) throws IOException {
         IConfigStore config = CMS.getConfigStore();
-        String sd_hostname = null;
-        int sd_port = -1;
-
-        try {
-            sd_hostname = config.getString("securitydomain.host", "");
-            sd_port = config.getInteger("securitydomain.httpseeport");
-        } catch (Exception e) {
-        }
 
         String profileId = HttpInput.getID(request, "profileId");
         if (profileId == null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
index f619110fd93202a8dc45404b493c1722ea4865a7..9e800b9cc5ebc43d7b10c9c90f5769c0d1b1988f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BaseServlet.java
@@ -60,6 +60,7 @@ public class BaseServlet extends VelocityServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("BaseServlet:service() uri = " + httpReq.getRequestURI());
+        @SuppressWarnings("unchecked")
         Enumeration<String> paramNames = httpReq.getParameterNames();
 
         while (paramNames.hasMoreElements()) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CAInfoPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CAInfoPanel.java
index 5da169915d071741bfb83de54218c0e8b2efbac7..827f0ce9265a4dec96a5e3515c2fd6ea331326ca 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CAInfoPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CAInfoPanel.java
@@ -154,7 +154,7 @@ public class CAInfoPanel extends WizardPanelBase {
         */
 
         CMS.debug("CAInfoPanel: Ready to get url");
-        Vector v = getUrlListFromSecurityDomain(cs, cstype, portType);
+        Vector<String> v = getUrlListFromSecurityDomain(cs, cstype, portType);
         v.addElement("External CA");
         StringBuffer list = new StringBuffer();
         int size = v.size();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertPrettyPrintPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertPrettyPrintPanel.java
index 119dead0c57af1eee937e046096b8847a9b1608d..9c4315c056cac80d58c706d6d1b6b98a7a85412e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertPrettyPrintPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertPrettyPrintPanel.java
@@ -39,7 +39,7 @@ import com.netscape.cms.servlet.wizard.WizardServlet;
 import com.netscape.cmsutil.crypto.CryptoUtil;
 
 public class CertPrettyPrintPanel extends WizardPanelBase {
-    private Vector mCerts = null;
+    private Vector<Cert> mCerts = null;
 
     public CertPrettyPrintPanel() {
     }
@@ -124,7 +124,7 @@ public class CertPrettyPrintPanel extends WizardPanelBase {
         context.put("title", "Certificates Pretty Print");
 
         try {
-            mCerts = new Vector();
+            mCerts = new Vector<Cert>();
 
             IConfigStore config = CMS.getConfigStore();
 
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 04ab4dac813b832ab0fa8293ed19b776a2e8e1ef..20ddf9f2d3273672b75bdec25c5b5717ba422a93 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
@@ -145,11 +145,9 @@ public class CertRequestPanel extends WizardPanelBase {
 
     public void cleanUp() throws IOException {
         IConfigStore cs = CMS.getConfigStore();
-        String select = "";
         String list = "";
         String tokenname = "";
         try {
-            select = cs.getString("preop.subsystem.select", "");
             list = cs.getString("preop.cert.list", "");
             tokenname = cs.getString("preop.module.token", "");
         } catch (Exception e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
index 92e2ee392f717748123d5bd610f5f2d67d07fb6b..e91548d826c11621b01555effb358442186e94ec 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
@@ -32,7 +32,6 @@ import org.mozilla.jss.util.IncorrectPasswordException;
 import org.mozilla.jss.util.Password;
 
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.property.Descriptor;
 import com.netscape.certsrv.property.IDescriptor;
 import com.netscape.certsrv.property.PropertySet;
@@ -214,16 +213,6 @@ public class ConfigHSMLoginPanel extends WizardPanelBase {
             HttpServletResponse response,
             Context context) {
 
-        IConfigStore cs = CMS.getConfigStore();
-        String select = "";
-        try {
-            select = cs.getString("preop.subsystem.select", "");
-        } catch (Exception e) {
-        }
-
-        //        if (select.equals("clone"))
-        //           return;
-
         CMS.debug("ConfigHSMLoginPanel: in update()");
 
         String uTokName = null;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
index ba56505427bd5b931596e908b0aa6b90c2335a6a..9eb1462948fcdd666aaf9e1066f15a82c089b44e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMServlet.java
@@ -45,7 +45,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
     private static final long serialVersionUID = -330521231753992202L;
     private CryptoManager mCryptoManager = null;
     private Vector<Module> mSupportedModules = null;
-    private Vector mOtherModules = null;
+    private Vector<Module> mOtherModules = null;
     private String mDefaultTok = null;
     private Hashtable<String, PK11Module> mCurrModTable = new Hashtable<String, PK11Module>();
 
@@ -80,7 +80,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
     public void loadOtherModules() {
         Enumeration<PK11Module> m = mCurrModTable.elements();
 
-        mOtherModules = new Vector();
+        mOtherModules = new Vector<Module>();
         while (m.hasMoreElements()) {
             PK11Module mod = m.nextElement();
             Enumeration<Module> s = mSupportedModules.elements();
@@ -102,7 +102,7 @@ public class ConfigHSMServlet extends ConfigBaseServlet {
 
                 loadModTokens(module, mod);
                 module.setFound(true);
-                mOtherModules.addElement((Object) module);
+                mOtherModules.addElement(module);
                 break;
             }
         }// while
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigRootCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigRootCAServlet.java
index 44046fdcd2c1dea4063f7b09e5c6b94e0b9143d9..c9618db19b104f6b966960984d0e2dbd85da4d43 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigRootCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigRootCAServlet.java
@@ -66,7 +66,7 @@ public class ConfigRootCAServlet extends ConfigBaseServlet {
         }
     }
 
-    public Vector getProfiles() {
+    public Vector<CertInfoProfile> getProfiles() {
         IConfigStore config = CMS.getConfigStore();
         String instancePath = "";
 
@@ -75,7 +75,7 @@ public class ConfigRootCAServlet extends ConfigBaseServlet {
         } catch (EBaseException e) {
         }
         String p[] = { "caCert.profile" };
-        Vector profiles = new Vector();
+        Vector<CertInfoProfile> profiles = new Vector<CertInfoProfile>();
 
         for (int i = 0; i < p.length; i++) {
             try {
@@ -102,7 +102,7 @@ public class ConfigRootCAServlet extends ConfigBaseServlet {
         if (profile == null) {
             profile = "caCert.profile";
         }
-        Vector profiles = getProfiles();
+        Vector<CertInfoProfile> profiles = getProfiles();
 
         context.put("status", "display");
         context.put("profiles", profiles);
@@ -122,7 +122,7 @@ public class ConfigRootCAServlet extends ConfigBaseServlet {
         }
         context.put("status", "update");
         context.put("error", "");
-        Vector profiles = getProfiles();
+        Vector<CertInfoProfile> profiles = getProfiles();
 
         context.put("profiles", profiles);
         context.put("selected_profile_id", profile);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java
index 377043d52b87cf233c7bd9cf999c13a811c6939f..9e430e2fd8342051d858a37ec35c1bca25820325 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java
@@ -100,7 +100,6 @@ public class CreateSubsystemPanel extends WizardPanelBase {
         }
 
         String errorString = "";
-        String url = "";
 
         if (isPanelDone()) {
             try {
@@ -145,7 +144,7 @@ public class CreateSubsystemPanel extends WizardPanelBase {
         } catch (EBaseException e) {
         }
 
-        Vector v = getUrlListFromSecurityDomain(config, cstype, "SecurePort");
+        Vector<String> v = getUrlListFromSecurityDomain(config, cstype, "SecurePort");
 
         StringBuffer list = new StringBuffer();
         int size = v.size();
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 2f58317946fefa4e87b6cf5248d1788cce0f35be..c6db8a8b7efeffd5deeb94fb6bd738b4e2bd67b8 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
@@ -136,7 +136,7 @@ public class DisplayCertChainPanel extends WizardPanelBase {
         }
 
         int size = 0;
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         if (!certchain_size.equals("")) {
             try {
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 48875c4cc6c9c9bea5f5066e4be0cede3dda3ca7..663435cba41b1c395c95c37eb11deabdae951b57 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
@@ -259,11 +259,9 @@ public class DonePanel extends WizardPanelBase {
 
         // update security domain
         String sdtype = "";
-        String instanceName = "";
         String subsystemName = "";
         try {
             sdtype = cs.getString("securitydomain.select", "");
-            instanceName = cs.getString("instanceId", "");
             subsystemName = cs.getString("preop.subsystem.name", "");
         } catch (Exception e) {
         }
@@ -727,20 +725,15 @@ public class DonePanel extends WizardPanelBase {
         IConfigStore config = CMS.getConfigStore();
         String cahost = "";
         int caport = -1;
-        String sdhost = "";
-        int sdport = -1;
 
         try {
             cahost = config.getString("preop.ca.hostname", "");
             caport = config.getInteger("preop.ca.httpsport", -1);
-            sdhost = config.getString("securitydomain.host", "");
-            sdport = config.getInteger("securitydomain.httpseeport", -1);
         } catch (Exception e) {
         }
 
         String ocsphost = CMS.getAgentHost();
         int ocspport = Integer.parseInt(CMS.getAgentPort());
-        int ocspagentport = Integer.parseInt(CMS.getAgentPort());
         String session_id = CMS.getConfigSDSessionId();
         String content = "xmlOutput=true&sessionID=" + session_id + "&ocsp_host=" + ocsphost + "&ocsp_port=" + ocspport;
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
index 8575658ea18bcc67d6059cbbd7694a0be02aced8..e6810ff4277d9e794466d8759e5921125deec648 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
@@ -93,12 +93,7 @@ public class GetCookie extends CMSServlet {
 
         CMS.debug("GetCookie start");
         IAuthToken authToken = null;
-        int sessionMaxAge = SESSION_MAX_AGE;
         IConfigStore cs = CMS.getConfigStore();
-        try {
-            sessionMaxAge = cs.getInteger("sessionMaxAge", SESSION_MAX_AGE);
-        } catch (Exception e) {
-        }
 
         IArgBlock header = CMS.createArgBlock();
         IArgBlock ctx = CMS.createArgBlock();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportAdminCertPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportAdminCertPanel.java
index 36ced487974798992f4dd1bf8a4ff590a96dcadf..93c26cdf32fad0e5d33e5e47c8cf5f52e1c68a3f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportAdminCertPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportAdminCertPanel.java
@@ -97,11 +97,9 @@ public class ImportAdminCertPanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
 
         String type = "";
-        String subsystemtype = "";
 
         try {
             type = cs.getString("preop.ca.type", "");
-            subsystemtype = cs.getString("cs.type", "");
         } catch (Exception e) {
         }
 
@@ -188,13 +186,11 @@ public class ImportAdminCertPanel extends WizardPanelBase {
 
         String type = "";
         String subsystemtype = "";
-        String security_domain_type = "";
         String selected_hierarchy = "";
 
         try {
             type = cs.getString("preop.ca.type", "");
             subsystemtype = cs.getString("cs.type", "");
-            security_domain_type = cs.getString("securitydomain.select", "");
             selected_hierarchy = cs.getString("preop.hierarchy.select", "");
         } catch (Exception e) {
         }
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportTransportCert.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportTransportCert.java
index 3b8f3b81f7cc75a10562a9d426dee2e248b16e1e..66ca8a8bf3a9c265f1fc4e07cf2fdf4613eeae05 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportTransportCert.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportTransportCert.java
@@ -122,7 +122,6 @@ public class ImportTransportCert extends CMSServlet {
 
         IConfigStore cs = CMS.getConfigStore();
 
-        String name = httpReq.getParameter("name");
         String certsString = httpReq.getParameter("certificate");
 
         try {
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 f0447170efbe6f4728c6640b40e6b5ef51f44a31..916ab199bc61e82feacf1e9d820d70f80b6d8ba6 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
@@ -287,7 +287,7 @@ public class NamePanel extends WizardPanelBase {
         }
 
         CMS.debug("NamePanel: Ready to get SSL EE HTTPS urls");
-        Vector v = getUrlListFromSecurityDomain(config, "CA", "SecurePort");
+        Vector<String> v = getUrlListFromSecurityDomain(config, "CA", "SecurePort");
         v.addElement("External CA");
         StringBuffer list = new StringBuffer();
         int size = v.size();
@@ -782,14 +782,12 @@ public class NamePanel extends WizardPanelBase {
 
         //if no hselect, then not CA
         if (hselect.equals("") || hselect.equals("join")) {
-            String select = null;
             String url = getURL(request, config);
 
             URL urlx = null;
 
             if (url.equals("External CA")) {
                 CMS.debug("NamePanel: external CA selected");
-                select = "otherca";
                 config.putString("preop.ca.type", "otherca");
                 if (subsystem != null) {
                     config.putString(PCERT_PREFIX + "signing.type", "remote");
@@ -801,7 +799,6 @@ public class NamePanel extends WizardPanelBase {
                 CMS.debug("NamePanel: update: this is the external CA.");
             } else {
                 CMS.debug("NamePanel: local CA selected");
-                select = "sdca";
                 // parse URL (CA1 - https://...)
                 url = url.substring(url.indexOf("https"));
                 config.putString("preop.ca.url", url);
@@ -833,7 +830,6 @@ public class NamePanel extends WizardPanelBase {
             while (c.hasMoreElements()) {
                 Cert cert = c.nextElement();
                 String ct = cert.getCertTag();
-                String tokenname = cert.getTokenname();
                 boolean enable = config.getBoolean(PCERT_PREFIX + ct + ".enable", true);
                 if (!enable)
                     continue;
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 ea0e79787046041709269a4a044c79236baa4100..54a5ed3f6e3011e596b18c869a68e8f6e9e2dda3 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
@@ -165,7 +165,6 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
 
             try {
                 String s = config.getString("preop.pk12.path", "");
-                String type = config.getString("preop.subsystem.select", "");
                 context.put("path", s);
             } catch (Exception e) {
                 CMS.debug(e.toString());
@@ -265,8 +264,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
             if (verifypfx) {
                 CMS.debug("RestoreKeyCertPanel verify the PFX.");
                 AuthenticatedSafes safes = pfx.getAuthSafes();
-                Vector pkeyinfo_collection = new Vector();
-                Vector cert_collection = new Vector();
+                Vector<Vector<Object>> pkeyinfo_collection = new Vector<Vector<Object>>();
+                Vector<Vector<Object>> cert_collection = new Vector<Vector<Object>>();
                 for (int i = 0; i < safes.getSize(); i++) {
                     try {
                         SEQUENCE scontent = safes.getSafeContentsAt(null, i);
@@ -276,9 +275,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                             if (oid.equals(SafeBag.PKCS8_SHROUDED_KEY_BAG)) {
                                 EncryptedPrivateKeyInfo privkeyinfo =
                                         (EncryptedPrivateKeyInfo) bag.getInterpretedBagContent();
-                                PasswordConverter passConverter = new PasswordConverter();
                                 PrivateKeyInfo pkeyinfo = privkeyinfo.decrypt(password, new PasswordConverter());
-                                Vector pkeyinfo_v = new Vector();
+                                Vector<Object> pkeyinfo_v = new Vector<Object>();
                                 pkeyinfo_v.addElement(pkeyinfo);
                                 SET bagAttrs = bag.getBagAttributes();
                                 for (int k = 0; k < bagAttrs.size(); k++) {
@@ -288,7 +286,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                                         SET val = attrs.getValues();
                                         ANY ss = (ANY) val.elementAt(0);
                                         ByteArrayInputStream bbis = new ByteArrayInputStream(ss.getEncoded());
-                                        BMPString sss = (BMPString) (new BMPString.Template()).decode(bbis);
+                                        BMPString sss = (BMPString) new BMPString.Template().decode(bbis);
                                         String s = sss.toString();
                                         pkeyinfo_v.addElement(s);
                                     }
@@ -298,7 +296,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                                 CertBag cbag = (CertBag) bag.getInterpretedBagContent();
                                 OCTET_STRING str = (OCTET_STRING) cbag.getInterpretedCert();
                                 byte[] x509cert = str.toByteArray();
-                                Vector cert_v = new Vector();
+                                Vector<Object> cert_v = new Vector<Object>();
                                 cert_v.addElement(x509cert);
                                 SET bagAttrs = bag.getBagAttributes();
 
@@ -374,14 +372,10 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
             cstype = toLowerCaseSubsystemType(cstype);
 
             String session_id = CMS.getConfigSDSessionId();
-            String sd_hostname = "";
-            int sd_port = -1;
             String master_hostname = "";
             int master_port = -1;
             int master_ee_port = -1;
             try {
-                sd_hostname = config.getString("securitydomain.host", "");
-                sd_port = config.getInteger("securitydomain.httpsadminport", -1);
                 master_hostname = config.getString("preop.master.hostname", "");
                 master_port = config.getInteger("preop.master.httpsadminport", -1);
                 master_ee_port = config.getInteger("preop.master.httpsport", -1);
@@ -527,8 +521,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
         return org.mozilla.jss.crypto.PrivateKey.Type.RSA;
     }
 
-    private void importkeycert(Vector pkeyinfo_collection,
-            Vector cert_collection) throws IOException {
+    private void importkeycert(Vector<Vector<Object>> pkeyinfo_collection,
+            Vector<Vector<Object>> cert_collection) throws IOException {
         CryptoManager cm = null;
         try {
             cm = CryptoManager.getInstance();
@@ -540,7 +534,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
 
         for (int i = 0; i < pkeyinfo_collection.size(); i++) {
             try {
-                Vector pkeyinfo_v = (Vector) pkeyinfo_collection.elementAt(i);
+                Vector<Object> pkeyinfo_v = pkeyinfo_collection.elementAt(i);
                 PrivateKeyInfo pkeyinfo = (PrivateKeyInfo) pkeyinfo_v.elementAt(0);
                 String nickname = (String) pkeyinfo_v.elementAt(1);
                 byte[] x509cert = getX509Cert(nickname, cert_collection);
@@ -569,8 +563,7 @@ 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);
+                wrapper.unwrapPrivate(encpkey, getPrivateKeyType(publickey), publickey);
 
             } catch (Exception e) {
                 CMS.debug("RestoreKeyCertPanel importkeycert: Exception=" + e.toString());
@@ -579,7 +572,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
 
         for (int i = 0; i < cert_collection.size(); i++) {
             try {
-                Vector cert_v = (Vector) cert_collection.elementAt(i);
+                Vector<Object> cert_v = cert_collection.elementAt(i);
                 byte[] cert = (byte[]) cert_v.elementAt(0);
                 if (cert_v.size() > 1) {
                     String name = (String) cert_v.elementAt(1);
@@ -658,10 +651,10 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
         return null;
     }
 
-    private byte[] getX509Cert(String nickname, Vector cert_collection)
+    private byte[] getX509Cert(String nickname, Vector<Vector<Object>> cert_collection)
             throws IOException {
         for (int i = 0; i < cert_collection.size(); i++) {
-            Vector v = (Vector) cert_collection.elementAt(i);
+            Vector<Object> v = cert_collection.elementAt(i);
             byte[] b = (byte[]) v.elementAt(0);
             X509CertImpl impl = null;
             try {
@@ -703,8 +696,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
                 if (token.equals("sslserver"))
                     continue;
                 String tokenname = config.getString("preop.module.token", "");
-                CryptoToken tok = cm.getTokenByName(tokenname);
-                CryptoStore store = tok.getCryptoStore();
+                cm.getTokenByName(tokenname); // throw exception if token doesn't exist
                 String name1 = "preop.master." + token + ".nickname";
                 String nickname = config.getString(name1, "");
                 if (!tokenname.equals("Internal Key Storage Token") &&
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 ea47e82edd5e4c123799a1f6ccf0ad69fccea2e1..55f7171ef43a814ead171056456f3f4899e4dc12 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
@@ -739,7 +739,6 @@ public class WizardPanelBase implements IWizardPanel {
                     cs.putString("preop.cookie", cookie);
                     return true;
                 } else {
-                    String error = parser.getValue("Error");
                     return false;
                 }
             } catch (Exception e) {
@@ -990,15 +989,15 @@ public class WizardPanelBase implements IWizardPanel {
 
             int len = nodeList.getLength();
             for (int i = 0; i < len; i++) {
-                Vector v_hostname =
+                Vector<String> v_hostname =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "Host");
 
-                Vector v_https_admin_port =
+                Vector<String> v_https_admin_port =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "SecureAdminPort");
 
-                Vector v_domain_mgr =
+                Vector<String> v_domain_mgr =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "DomainManager");
 
@@ -1014,10 +1013,10 @@ public class WizardPanelBase implements IWizardPanel {
         return dm.equalsIgnoreCase("true");
     }
 
-    public Vector getMasterUrlListFromSecurityDomain(IConfigStore config,
+    public Vector<String> getMasterUrlListFromSecurityDomain(IConfigStore config,
                                                       String type,
                                                       String portType) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         try {
             String hostname = config.getString("securitydomain.host");
@@ -1025,18 +1024,8 @@ public class WizardPanelBase implements IWizardPanel {
 
             CMS.debug("Getting domain.xml from CA...");
             String c = getDomainXML(hostname, httpsadminport, true);
-            String list = "";
 
             CMS.debug("Type " + type);
-            if (type.equals("CA")) {
-                list = "CAList";
-            } else if (type.equals("KRA")) {
-                list = "KRAList";
-            } else if (type.equals("OCSP")) {
-                list = "OCSPList";
-            } else if (type.equals("TKS")) {
-                list = "TKSList";
-            }
 
             CMS.debug("Getting " + portType + " from Security Domain ...");
             if (!portType.equals("UnSecurePort") &&
@@ -1061,16 +1050,16 @@ public class WizardPanelBase implements IWizardPanel {
 
             CMS.debug("Len " + len);
             for (int i = 0; i < len; i++) {
-                Vector v_clone = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_clone = parser.getValuesFromContainer(nodeList.item(i),
                         "Clone");
                 String clone = (String) v_clone.elementAt(0);
                 if (clone.equalsIgnoreCase("true"))
                     continue;
-                Vector v_name = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_name = parser.getValuesFromContainer(nodeList.item(i),
                         "SubsystemName");
-                Vector v_host = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_host = parser.getValuesFromContainer(nodeList.item(i),
                         "Host");
-                Vector v_port = parser.getValuesFromContainer(nodeList.item(i),
+                Vector<String> v_port = parser.getValuesFromContainer(nodeList.item(i),
                         portType);
 
                 v.addElement(v_name.elementAt(0)
@@ -1179,15 +1168,15 @@ public class WizardPanelBase implements IWizardPanel {
 
             int len = nodeList.getLength();
             for (int i = 0; i < len; i++) {
-                Vector v_hostname =
+                Vector<String> v_hostname =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "Host");
 
-                Vector v_https_ee_port =
+                Vector<String> v_https_ee_port =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "SecurePort");
 
-                Vector v_https_admin_port =
+                Vector<String> v_https_admin_port =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "SecureAdminPort");
 
@@ -1234,11 +1223,11 @@ public class WizardPanelBase implements IWizardPanel {
 
             int len = nodeList.getLength();
             for (int i = 0; i < len; i++) {
-                Vector v_admin_port =
+                Vector<String> v_admin_port =
                         parser.getValuesFromContainer(nodeList.item(i),
                                                       "SecureAdminPort");
 
-                Vector v_port = null;
+                Vector<String> v_port = null;
                 if (portType.equals("UnSecurePort")) {
                     v_port = parser.getValuesFromContainer(nodeList.item(i),
                                                             "UnSecurePort");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java b/pki/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
index a86a676b0c23e1f4ea2398c13e88553aa3f66b84..dd224cc8a7bd2aa3ff331ea3f88271a2f2e9eefe 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
@@ -19,7 +19,6 @@ package com.netscape.cms.servlet.key;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.netscape.certsrv.apps.CMS;
@@ -76,7 +75,6 @@ public class DisplayTransport extends CMSServlet {
      */
     public void process(CMSRequest cmsReq) throws EBaseException {
 
-        HttpServletRequest req = cmsReq.getHttpReq();
         HttpServletResponse resp = cmsReq.getHttpResp();
 
         IAuthToken authToken = authenticate(cmsReq);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
index 81ced5290092b8266ed4c22e86ef14c6146ab70c..cd440da0820a88a282368ca93832d5df81c96185 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
@@ -151,7 +151,6 @@ public class ExamineRecovery extends CMSServlet {
         IArgBlock header = CMS.createArgBlock();
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
-        int seq = -1;
 
         EBaseException error = null;
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java b/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
index 0019c95084ec421dc27e79f22339f52b971a09bc..55d79b1aba78eb7971bf2aad00bf610ac67b4433 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
@@ -133,7 +133,6 @@ public class GetApprovalStatus extends CMSServlet {
         IArgBlock header = CMS.createArgBlock();
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
-        int seq = -1;
         int rComplete = 0;
 
         // get status and populate argSet
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java b/pki/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
index 4a96283864ebcfd70b22cae0bf39cac1f0fb1284..9d67cab8debd610c701cbd8507c269d3e62efdc3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
@@ -155,7 +155,6 @@ public class GetAsyncPk12 extends CMSServlet {
         IArgBlock header = CMS.createArgBlock();
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
-        int seq = -1;
 
         // get status and populate argSet
         try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
index a40edee80406fb3f50b90e26b97bb37ad055b14a..7c0c0cb1ce85276a145acae4a8ef9ba2793611d0 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
@@ -154,8 +154,6 @@ public class GrantAsyncRecovery extends CMSServlet {
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
-        int seq = -1;
-
         String agentID = authToken.getInString("uid");
         CMS.debug("GrantAsyncRecovery: process() agent uid=" + agentID);
         CMS.debug("GrantAsyncRecovery: process() request id=" + req.getParameter("reqID"));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
index 9989fafad22e3d9903531108cb2d558897bdd1fd..02aacc31ce7c65ac1b3432bd2108cb5f2b333562 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
@@ -157,8 +157,6 @@ public class GrantRecovery extends CMSServlet {
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
-        int seq = -1;
-
         String agentID = authToken.getInString("uid");
         if (CMS.getConfigStore().getBoolean("kra.keySplitting")) {
             agentID = req.getParameter("agentID");
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 0bb038677ef91db33337550b9f6b6da67fa32f5d..eb3b93eb80bb9a4e21c03b46f73ed4e7194a862c 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
@@ -477,7 +477,6 @@ public class ProfileSubmitServlet extends ProfileServlet {
             statsSub.startTiming("enrollment", true /* main action */);
         }
 
-        long startTime = CMS.getCurrentDate().getTime();
         Locale locale = getLocale(request);
         ArgSet args = new ArgSet();
 
@@ -750,8 +749,8 @@ public class ProfileSubmitServlet extends ProfileServlet {
                             if (origReq != null) {
                                 CMS.debug("ProfileSubmitServlet: renewal: found original enrollment request id:" + rid);
                                 // debug: print the extData keys
-                                Enumeration<String> en = origReq.getExtDataKeys();
                                 /*
+                                Enumeration<String> en = origReq.getExtDataKeys();
                                                                 CMS.debug("ProfileSubmitServlet: renewal: origRequest extdata key print BEGINS");
                                                                 while (en.hasMoreElements()) {
                                                                   String next = (String) en.nextElement();
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 1d04952d156eb88a32e19c64b64468b5fd1f8d8a..b65c90fcaacaf1e695c381f35cdd0ed3a440d49f 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
@@ -148,7 +148,7 @@ public class CheckRequest extends CMSServlet {
      */
     public void process(CMSRequest cmsReq) throws EBaseException {
         CMS.debug("checkRequest: in process!");
-        SET transIds = null, rNonces = null, sNonces = null;
+        SET transIds = null, sNonces = null;
         boolean isCMCReq = false;
         INTEGER bodyPartId = null;
 
@@ -252,7 +252,7 @@ public class CheckRequest extends CMSServlet {
                     } else if (type.equals(OBJECT_IDENTIFIER.id_cmc_transactionId)) {
                         transIds = taggedAttr.getValues();
                     } else if (type.equals(OBJECT_IDENTIFIER.id_cmc_recipientNonce)) {
-                        rNonces = taggedAttr.getValues();
+                        // recipient nonce
                     } else if (type.equals(OBJECT_IDENTIFIER.id_cmc_senderNonce)) {
                         sNonces = taggedAttr.getValues();
                     }
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 ee5581a6d6d042273d37dc81fb947f12b093ad5e..820e9a6542a11844aa43d5588341f3d16f43ada6 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
@@ -275,7 +275,7 @@ public class ProcessCertReq extends CMSServlet {
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
-        CMSTemplate form = null, errorForm = null;
+        CMSTemplate form = null;
         Locale[] locale = new Locale[1];
 
         try {
@@ -342,7 +342,6 @@ public class ProcessCertReq extends CMSServlet {
                 if (xmlOutput != null && xmlOutput.equals("true")) {
                     outputXML(resp, argSet);
                 } else {
-                    String output = form.getOutput(argSet);
                     resp.setContentType("text/html");
                     form.renderOutput(out, argSet);
                     cmsReq.setStatus(CMSRequest.SUCCESS);
@@ -1002,19 +1001,15 @@ public class ProcessCertReq extends CMSServlet {
                         }
 
                         // grant trusted manager or agent privileges  
-                        Object grantError = null;
-
                         try {
                             int res = grant_privileges(
                                     cmsReq, r, issuedCerts, header);
 
                             if (res != 0) {
                                 header.addStringValue(GRANT_ERROR, "SUCCESS");
-                                grantError = "SUCCESS";
                             }
                         } catch (EBaseException e) {
                             header.addStringValue(GRANT_ERROR, e.toString());
-                            grantError = e;
                         }
 
                         // if this is a RA, show the certificate right away
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessReq.java
index a4eb68b1946b66a33d202a7507fa64b4c40e94d6..9c173d8325a22131fa6afb8e297995cb88688c32 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/ProcessReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/ProcessReq.java
@@ -145,7 +145,7 @@ public class ProcessReq extends CMSServlet {
         String doAssign = null;
         EBaseException error = null;
 
-        CMSTemplate form = null, errorForm = null;
+        CMSTemplate form = null;
         Locale[] locale = new Locale[1];
 
         try {
@@ -214,7 +214,6 @@ public class ProcessReq extends CMSServlet {
                 if (xmlOutput != null && xmlOutput.equals("true")) {
                     outputXML(resp, argSet);
                 } else {
-                    String output = form.getOutput(argSet);
                     resp.setContentType("text/html");
                     form.renderOutput(out, argSet);
                     cmsReq.setStatus(CMSRequest.SUCCESS);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
index 181f9f906d11f19fdb21ea536da716d03c16f67e..f6ae634f42d46558182b1e6bc7b5a1d724343c0b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
@@ -435,8 +435,6 @@ public class QueryReq extends CMSServlet {
             header.addIntegerValue(OUT_TOTALCOUNT, totalCount);
             header.addIntegerValue(OUT_CURRENTCOUNT, list.getSize());
 
-            int numEntries = list.getSize() - list.getCurrentIndex();
-
             Vector<IRequest> v = fetchRecords(list, maxCount);
             v = normalizeOrder(v);
             trim(v, id);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/SearchReqs.java b/pki/base/common/src/com/netscape/cms/servlet/request/SearchReqs.java
index 5fc05bb25e0aefc018d5fe7fa9bc674fa23e332f..08d5805b6ed605fe155b1c35ddccad13eb49a78c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/SearchReqs.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/SearchReqs.java
@@ -182,7 +182,6 @@ public class SearchReqs extends CMSServlet {
             return;
         }
 
-        String revokeAll = null;
         EBaseException error = null;
         int maxResults = -1;
         int timeLimit = -1;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java b/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
index a71f26dcfa01f594cc40661a726e1e8286dd70e9..42fa88cd977a86017fb04eb95c246a4cc65ad0bb 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/wizard/WizardServlet.java
@@ -418,6 +418,7 @@ public class WizardServlet extends VelocityServlet {
 
     public void outputHttpParameters(HttpServletRequest httpReq) {
         CMS.debug("WizardServlet:service() uri = " + httpReq.getRequestURI());
+        @SuppressWarnings("unchecked")
         Enumeration<String> paramNames = httpReq.getParameterNames();
         while (paramNames.hasMoreElements()) {
             String pn = paramNames.nextElement();
diff --git a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
index 1c4d9fbcf2049be347d08ae524333d64c871c934..a7d5329c0d86734edac1e9a1e2ca2a5e4d5ab472 100644
--- a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
+++ b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java
@@ -20,7 +20,6 @@ package com.netscape.cmscore.authentication;
 import java.math.BigInteger;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.Vector;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.AuthToken;
@@ -80,7 +79,6 @@ public class ChallengePhraseAuthentication implements IAuthManager {
     private ICertUserLocator mCULocator = null;
     private ILogger mLogger = CMS.getLogger();
     private String mRequestor = null;
-    private Vector mID = null;
     private MessageDigest mSHADigest = null;
 
     // request attributes hacks 
diff --git a/pki/base/common/src/com/netscape/cmscore/authorization/AuthzSubsystem.java b/pki/base/common/src/com/netscape/cmscore/authorization/AuthzSubsystem.java
index 1a1aaa6342ef00d82f1de46dcbb82d58307292da..16bc40e29303d0adae986415caac6fa19c5d7e14 100644
--- a/pki/base/common/src/com/netscape/cmscore/authorization/AuthzSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/authorization/AuthzSubsystem.java
@@ -421,9 +421,8 @@ public class AuthzSubsystem implements IAuthzSubsystem {
 
             IAuthzManager mgr = (IAuthzManager) get((String) e.nextElement());
 
-            String infoMsg =
-                    "Shutting down authz manager instance " + mgr.getName();
-
+            //String infoMsg =
+            //        "Shutting down authz manager instance " + mgr.getName();
             //log(ILogger.LL_INFO, infoMsg);
 
             mgr.shutdown();
diff --git a/pki/base/common/src/com/netscape/cmscore/base/SubsystemLoader.java b/pki/base/common/src/com/netscape/cmscore/base/SubsystemLoader.java
index 0dbeb4b51d201883ff2433d9e53de371712d1228..a9307e858111bf68a0565beb26ebfb65f2e6f1ff 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/SubsystemLoader.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/SubsystemLoader.java
@@ -37,8 +37,8 @@ public class SubsystemLoader {
     private static final String PROP_CLASSNAME = "class";
     private static final String PROP_ID = "id";
 
-    public static Vector load(IConfigStore config) throws EBaseException {
-        Vector v = new Vector();
+    public static Vector<ISubsystem> load(IConfigStore config) throws EBaseException {
+        Vector<ISubsystem> v = new Vector<ISubsystem>();
 
         // load a list of installable subsystems (services)
         for (int i = 0;; i++) {
diff --git a/pki/base/common/src/com/netscape/cmscore/connector/HttpConnector.java b/pki/base/common/src/com/netscape/cmscore/connector/HttpConnector.java
index 8a05c1c74fa9a080fca5217bdfbd685295e46078..cdb3157954823c1a12ceb3026acf84a35e996580 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/HttpConnector.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/HttpConnector.java
@@ -170,7 +170,7 @@ public class HttpConnector implements IConnector {
                 r.setExtData(IRequest.ERROR,
                         new EBaseException(CMS.getUserMessage("CMS_BASE_REMOTE_AUTHORITY_ERROR")));
                 // XXX overload svcerrors for now. 
-                Vector policyErrors = r.getExtDataInStringVector(IRequest.ERRORS);
+                Vector<String> policyErrors = r.getExtDataInStringVector(IRequest.ERRORS);
 
                 if (policyErrors != null && policyErrors.size() > 0) {
                     r.setExtData(IRequest.SVCERRORS, policyErrors);
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 d7024f4ad58520a74846bd7a327e040f205509a8..ea235391d76aa753701ac770baf208361e827c33 100644
--- a/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
+++ b/pki/base/common/src/com/netscape/cmscore/connector/HttpPKIMessage.java
@@ -103,7 +103,6 @@ public class HttpPKIMessage implements IHttpPKIMessage {
         reqStatus = r.getRequestStatus().toString();
         CMS.debug("HttpPKMessage.toRequest: requestStatus=" + reqStatus);
 
-        int len = RequestTransfer.getTransferAttributes(r).length;
         String key;
         Object value;
         Enumeration<Object> enum1 = mNameVals.elements();
diff --git a/pki/base/common/src/com/netscape/cmscore/crmf/CRMFParser.java b/pki/base/common/src/com/netscape/cmscore/crmf/CRMFParser.java
index 962b02a9d5b3acc3829a9088f83f0f33586a19ab..b42bc00f94f74ee5edc30212bb42ea6d721aeb77 100644
--- a/pki/base/common/src/com/netscape/cmscore/crmf/CRMFParser.java
+++ b/pki/base/common/src/com/netscape/cmscore/crmf/CRMFParser.java
@@ -48,7 +48,7 @@ public class CRMFParser {
      */
     public static PKIArchiveOptionsContainer[]
             getPKIArchiveOptions(String crmfBlob) throws IOException {
-        Vector options = new Vector();
+        Vector<PKIArchiveOptionsContainer> options = new Vector<PKIArchiveOptionsContainer>();
 
         byte[] crmfBerBlob = null;
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
index f9c4369a29236168f053304cb74fcbfe1f28f0cb..d1d0fd35534399e5143ce9a3c8742a717c36f436 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CRLRepository.java
@@ -27,7 +27,6 @@ import netscape.security.x509.RevokedCertificate;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.EDBException;
-import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
 import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
@@ -59,9 +58,8 @@ public class CRLRepository extends Repository implements ICRLRepository {
         mBaseDN = baseDN;
         mDBService = dbService;
 
-        IDBRegistry reg = dbService.getRegistry();
-
         /**
+         * IDBRegistry reg = dbService.getRegistry();
          * String crlRecordOC[] = new String[1];
          * crlRecordOC[0] = Schema.LDAP_OC_CRL_RECORD;
          * reg.registerObjectClass(CRLIssuingPointRecord.class.getName(),
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 ae77330fc5f6c4c0e365b19d22dbb97777dda52c..0df563cad430be35898651a34162f67efd74c0b5 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -1535,8 +1535,6 @@ public class CertificateRepository extends Repository
     public ICertRecordList getInvalidCertsByNotBeforeDate(Date date, int pageSize)
             throws EBaseException {
 
-        Date rightNow = CMS.getCurrentDate();
-
         ICertRecordList list = null;
         IDBSSession s = mDBService.createSession();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
index 7201f61e7f72f4fac9bb3fd53b2124fbb35af060..ddc9f1874092682d96e179829d7d0443f14b6c83 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBSSession.java
@@ -263,6 +263,7 @@ public class DBSSession implements IDBSSession {
         return search(base, filter, null);
     }
 
+    @SuppressWarnings("unchecked")
     public IDBSearchResults search(String base, String filter, int maxSize)
             throws EBaseException {
         try {
@@ -290,6 +291,7 @@ public class DBSSession implements IDBSSession {
         }
     }
 
+    @SuppressWarnings("unchecked")
     public IDBSearchResults search(String base, String filter, int maxSize, int timeLimit)
             throws EBaseException {
         try {
@@ -322,6 +324,7 @@ public class DBSSession implements IDBSSession {
      * Retrieves a list of object that satifies the given
      * filter.
      */
+    @SuppressWarnings("unchecked")
     public IDBSearchResults search(String base, String filter,
             String attrs[]) throws EBaseException {
         try {
@@ -458,13 +461,13 @@ public class DBSSession implements IDBSSession {
     /**
      * Retrieves a list of objects.
      */
-    public IDBVirtualList<?> createVirtualList(String base, String filter,
+    public IDBVirtualList<Object> createVirtualList(String base, String filter,
             String attrs[], String sortKey, int pageSize) throws EBaseException {
         return new DBVirtualList<Object>(mDBSystem.getRegistry(), mConn, base,
                 filter, attrs, sortKey, pageSize);
     }
 
-    public IDBVirtualList<?> createVirtualList(String base, String filter,
+    public IDBVirtualList<Object> createVirtualList(String base, String filter,
             String attrs[], String startFrom, String sortKey, int pageSize) throws EBaseException {
         return new DBVirtualList<Object>(mDBSystem.getRegistry(), mConn, base,
                 filter, attrs, startFrom, sortKey, pageSize);
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
index 4adb17dd868bf12a738f43d208e30722895d9869..4bc5b64711415365075b3866ef0952e5c8cd1cb1 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBSubsystem.java
@@ -526,6 +526,7 @@ public class DBSubsystem implements IDBSubsystem {
      * applications can use. Optionally, check the integrity
      * of the database.
      */
+    @SuppressWarnings("unchecked")
     public void init(ISubsystem owner, IConfigStore config)
             throws EBaseException {
 
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java b/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
index b89f388ceec8d5c47323bea3db2e2d1d21a6d3fc..67e1d12c6cca0ac46eb9270658e90d5f56a389ef 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/Repository.java
@@ -23,7 +23,6 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.dbs.EDBException;
 import com.netscape.certsrv.dbs.IDBObj;
-import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
 import com.netscape.certsrv.dbs.IDBSubsystem;
 import com.netscape.certsrv.dbs.Modification;
@@ -90,10 +89,8 @@ public abstract class Repository implements IRepository {
 
         BI_INCREMENT = new BigInteger(Integer.toString(increment));
 
-        // register schema
-        IDBRegistry reg = db.getRegistry();
-
         /**
+         * IDBRegistry reg = db.getRegistry();
          * if (!reg.isObjectClassRegistered(
          * RepositoryRecord.class.getName())) {
          * String repRecordOC[] = new String[2];
@@ -256,7 +253,6 @@ public abstract class Repository implements IRepository {
      */
     private void initCache() throws EBaseException {
         mNext = getSerialNumber();
-        BigInteger serialConfig = new BigInteger("0");
         mRadix = 10;
 
         CMS.debug("Repository: in InitCache");
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
index a752c1e2906b6c6ffd138f860463661d75fe5b28..469ba62a0257a4d0d17d949a048ce03a0feefb46 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/LdapPredicateParser.java
@@ -68,8 +68,6 @@ public class LdapPredicateParser {
         // The first token cannot be an operator. We are not dealing with
         // reverse-polish notation.
         String token = pt.nextToken();
-        boolean opANDSeen;
-        boolean opORSeen;
 
         if (getOP(token) != EXPRESSION) {
             if (Debug.ON)
@@ -78,7 +76,7 @@ public class LdapPredicateParser {
         }
         ILdapExpression current = parseExpression(token);
         boolean malformed = false;
-        Vector expSet = new Vector();
+        Vector<ILdapExpression> expSet = new Vector<ILdapExpression>();
         int prevType = EXPRESSION;
 
         while (pt.hasMoreTokens()) {
@@ -156,7 +154,7 @@ public class LdapPredicateParser {
         if (commaIndex < 0)
             return LdapSimpleExpression.parse(input);
         int currentIndex = 0;
-        Vector expVector = new Vector();
+        Vector<LdapSimpleExpression> expVector = new Vector<LdapSimpleExpression>();
 
         while (commaIndex > 0) {
             LdapSimpleExpression exp = (LdapSimpleExpression)
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java b/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
index 147eee07e9466b47afbc34960b983178ab8daf04..453703443c7bf9f006825c05aef550fd8f0bb193 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
@@ -49,7 +49,6 @@ import com.netscape.certsrv.publish.ILdapPublisher;
 import com.netscape.certsrv.publish.ILdapRule;
 import com.netscape.certsrv.publish.IPublisherProcessor;
 import com.netscape.certsrv.publish.IXcertPublisherProcessor;
-import com.netscape.certsrv.publish.LdapCertMapResult;
 import com.netscape.certsrv.publish.MapperPlugin;
 import com.netscape.certsrv.publish.MapperProxy;
 import com.netscape.certsrv.publish.PublisherPlugin;
@@ -786,7 +785,6 @@ public class PublisherProcessor implements
             ruleInst = (ILdapRule)
                     Class.forName(className).newInstance();
             Vector<String> v = ruleInst.getInstanceParams();
-            IConfigStore rc = ruleInst.getConfigStore();
 
             return v;
         } catch (InstantiationException e) {
@@ -1324,8 +1322,6 @@ public class PublisherProcessor implements
             Object dirdn = null;
 
             if (mapper != null) {
-                LdapCertMapResult result = null;
-
                 if (mLdapConnModule != null) {
                     try {
                         conn = mLdapConnModule.getConn();
@@ -1394,8 +1390,6 @@ public class PublisherProcessor implements
             String dirdn = null;
 
             if (mapper != null) {
-                LdapCertMapResult result = null;
-
                 if (mLdapConnModule != null) {
                     conn = mLdapConnModule.getConn();
                 }
@@ -1439,8 +1433,6 @@ public class PublisherProcessor implements
             String dirdn = null;
 
             if (mapper != null) {
-                LdapCertMapResult result = null;
-
                 if (mLdapConnModule != null) {
                     conn = mLdapConnModule.getConn();
                 }
diff --git a/pki/base/common/src/com/netscape/cmscore/logging/LogQueue.java b/pki/base/common/src/com/netscape/cmscore/logging/LogQueue.java
index 6ed38a6996ccfde7731cbb6723b5bbccb8f93f40..90ca05d817c9487d713882cd0f9e89254cc2c5c7 100644
--- a/pki/base/common/src/com/netscape/cmscore/logging/LogQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/logging/LogQueue.java
@@ -34,7 +34,7 @@ import com.netscape.certsrv.logging.ILogQueue;
 public class LogQueue implements ILogQueue {
 
     private static LogQueue mLogQueue = new LogQueue();
-    protected Vector mListeners = null;
+    protected Vector<ILogEventListener> mListeners = null;
 
     /**
      * Constructs a log queue.
@@ -52,7 +52,7 @@ public class LogQueue implements ILogQueue {
      * 
      */
     public void init() {
-        mListeners = new Vector();
+        mListeners = new Vector<ILogEventListener>();
 
     }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/EmailFormProcessor.java b/pki/base/common/src/com/netscape/cmscore/notification/EmailFormProcessor.java
index 54a92f7231d218c2ea32be86b0bf15fbab25c3dd..a057484cf59adefeede7ad323b412d6df6faa24b 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/EmailFormProcessor.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/EmailFormProcessor.java
@@ -193,7 +193,6 @@ public class EmailFormProcessor implements IEmailFormProcessor {
                 // -- for bug 382162, don't remove the following line, in
                 //	 case John changes his mind for the better
                 //				mContent.add(TOK_PREFIX+t);
-                int tl = token_keys.length;
 
                 for (int i = 0; i < token_keys.length; i++) {
                     if (t.startsWith(token_keys[i])) {
diff --git a/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java b/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
index 4046c789f532fe340221ed0dcc28c3907dd8d20f..6c73bcb967646a46f9cbb0f0502b41595cdc6910 100644
--- a/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
+++ b/pki/base/common/src/com/netscape/cmscore/policy/PolicyPredicateParser.java
@@ -68,8 +68,6 @@ public class PolicyPredicateParser {
         // The first token cannot be an operator. We are not dealing with
         // reverse-polish notation.
         String token = pt.nextToken();
-        boolean opANDSeen;
-        boolean opORSeen;
 
         if (getOP(token) != EXPRESSION) {
             if (Debug.ON)
@@ -78,7 +76,7 @@ public class PolicyPredicateParser {
         }
         IExpression current = parseExpression(token);
         boolean malformed = false;
-        Vector expSet = new Vector();
+        Vector<IExpression> expSet = new Vector<IExpression>();
         int prevType = EXPRESSION;
 
         while (pt.hasMoreTokens()) {
@@ -156,7 +154,7 @@ public class PolicyPredicateParser {
         if (commaIndex < 0)
             return SimpleExpression.parse(input);
         int currentIndex = 0;
-        Vector expVector = new Vector();
+        Vector<SimpleExpression> expVector = new Vector<SimpleExpression>();
 
         while (commaIndex > 0) {
             SimpleExpression exp = (SimpleExpression)
diff --git a/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java b/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
index 2435fa462a80b5fdcc17cad84e5e9f6e2822c052..585af5600ace2e582d44f9707e64a44a43b606f0 100644
--- a/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
@@ -98,7 +98,7 @@ public class ProfileSubsystem implements IProfileSubsystem {
             String configPath = subStore.getString(PROP_CONFIG);
 
             CMS.debug("Start Profile Creation - " + id + " " + classid + " " + info.getClassName());
-            IProfile profile = createProfile(id, classid, info.getClassName(),
+            createProfile(id, classid, info.getClassName(),
                     configPath);
 
             CMS.debug("Done Profile Creation - " + id);
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 0e252f523ab1d5f96e114fb9f02cd803a090f607..16db3985c55e5c0aebfe2c127de3d4a7142b4f2b 100644
--- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java
@@ -902,7 +902,6 @@ class Request
         return true;
     }
 
-    @SuppressWarnings("unchecked")
     public boolean setExtData(String key, Hashtable<String, String> value) {
         if (!(isValidExtDataKey(key) && isValidExtDataHashtableValue(value))) {
             return false;
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 20cdae8326786ea3974e33b0b3d47f7becdcce8d..2a9afb8685a4c6a983d953ea562a7d0b5e4d5ae3 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
@@ -485,7 +485,6 @@ public class KeyCertUtil {
             SEQUENCE seq = (SEQUENCE) ASN1Util.decode(outerSeq, pubkBytes);
 
             BIT_STRING bs = (BIT_STRING) seq.elementAt(1);
-            byte[] bits = bs.getBits();
             ByteArrayInputStream bitstream = new ByteArrayInputStream(bs.getBits());
             ASN1Header wrapper = new ASN1Header(bitstream);
             byte[] valBytes = new byte[(int) wrapper.getContentLength()];
diff --git a/pki/base/common/src/com/netscape/cmscore/security/PWCBsdr.java b/pki/base/common/src/com/netscape/cmscore/security/PWCBsdr.java
index 49c84d5267409ecc857b70fccc7df159f4810ea4..32a0e90ed6bfbc36ffb4b00a72d8a2dcd61082be 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/PWCBsdr.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/PWCBsdr.java
@@ -151,9 +151,7 @@ public class PWCBsdr implements PasswordCallback {
 
                 if (pw != null) {
                     CMS.debug("non-null password returned in first attempt");
-                    String tmp = new String(pw.getCharCopy());
-
-                    return (pw);
+                    return pw;
                 } else { /* password not found */
                     // we don't want caller to do getPasswordAgain,    for now
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_SECURITY_THROW_CALLBACK"));
diff --git a/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java b/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
index 6796a332272133cca366373171c40e5d795605fd..a4c4d6854de18c352636580c772f3dacaffa2575 100644
--- a/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
@@ -1511,7 +1511,6 @@ public final class UGSubsystem implements IUGSubsystem {
         try {
             LDAPAttribute attrMembers = new LDAPAttribute("uniquemember");
             LDAPModificationSet mod = new LDAPModificationSet();
-            String st = null;
 
             String desc = grp.getDescription();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/util/Debug.java b/pki/base/common/src/com/netscape/cmscore/util/Debug.java
index 66e316c11d9eefcafcb89765f0d573196251c93e..8c41d5bb5ab7381263c716a3a3d9832591beeadf 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/Debug.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/Debug.java
@@ -40,15 +40,15 @@ public class Debug
        so I create a thread-local DateFormatter for each thread
      */
     private static String DATE_PATTERN = "dd/MMM/yyyy:HH:mm:ss";
-    private static ThreadLocal mFormatObject = new ThreadLocal() {
-        protected synchronized Object initialValue() {
+    private static ThreadLocal<SimpleDateFormat> mFormatObject = new ThreadLocal<SimpleDateFormat>() {
+        protected synchronized SimpleDateFormat initialValue() {
             return new SimpleDateFormat(DATE_PATTERN);
         }
     };
 
     /* the dateformatter should be accessed with this function */
     private static SimpleDateFormat getDateFormatter() {
-        return ((SimpleDateFormat) (mFormatObject.get()));
+        return mFormatObject.get();
     }
 
     public static final boolean ON = false;
diff --git a/pki/base/common/src/com/netscape/cmscore/util/FileAsString.java b/pki/base/common/src/com/netscape/cmscore/util/FileAsString.java
index 27d5b6c7983cd132f29b13269a40e53cef59cc84..7853346f5c723c54a1757bc6de99da8f280c1061 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/FileAsString.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/FileAsString.java
@@ -50,7 +50,7 @@ public class FileAsString {
     private void readFile()
             throws IOException {
         BufferedReader br = createBufferedReader(mFilename);
-        StringBuffer buf = new StringBuffer("");
+        StringBuffer buf = new StringBuffer();
         int bytesread = 0;
 
         do {
@@ -60,7 +60,6 @@ public class FileAsString {
             if (bytesread > 0) {
                 buf.append(cbuf, 0, bytesread);
             }
-            String s = new String(buf);
         } while (bytesread != -1);
         br.close();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/util/FileDialogFilter.java b/pki/base/common/src/com/netscape/cmscore/util/FileDialogFilter.java
index 454c3c8db4680fbb5e539c50ae85683e2eadb373..eb1d1097a4746bf2c9942f0346ba79262b608218 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/FileDialogFilter.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/FileDialogFilter.java
@@ -63,7 +63,6 @@ public class FileDialogFilter implements FilenameFilter {
      */
     boolean searchPattern(String fileName, String filter) {
         int filterCursor = 0;
-        int fileNameCursor = 0;
 
         int filterChar = filter.charAt(filterCursor);
 
diff --git a/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java b/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
index 3ee2d3ab4511599f0d9ee3e5f77f90e4a13235a3..caf05c6df7fb2e8be19426add4ffb230cc17389e 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/ProfileSubsystem.java
@@ -165,12 +165,12 @@ public class ProfileSubsystem extends Frame implements ISubsystem, Runnable {
 
     public void updateThreadPanel() {
         Thread currentThread = Thread.currentThread();
-        Vector data = new Vector();
+        Vector<Vector<String>> data = new Vector<Vector<String>>();
         Thread threads[] = new Thread[100];
         int numThreads = Thread.enumerate(threads);
 
         for (int i = 0; i < numThreads; i++) {
-            Vector row = new Vector();
+            Vector<String> row = new Vector<String>();
 
             row.addElement(threads[i].getName());
             row.addElement(threads[i].getThreadGroup().getName());
@@ -185,7 +185,7 @@ public class ProfileSubsystem extends Frame implements ISubsystem, Runnable {
             data.addElement(row);
         }
 
-        Vector colNames = new Vector();
+        Vector<String> colNames = new Vector<String>();
 
         colNames.addElement("Name");
         colNames.addElement("Group");
@@ -220,13 +220,13 @@ class ThreadTableModel extends AbstractTableModel {
      *
      */
     private static final long serialVersionUID = -6977965542104110870L;
-    Vector rowData;
-    Vector columnNames;
+    Vector<Vector<String>> rowData;
+    Vector<String> columnNames;
 
     public ThreadTableModel() {
     }
 
-    public void setInfo(Vector _rowData, Vector _columnNames) {
+    public void setInfo(Vector<Vector<String>> _rowData, Vector<String> _columnNames) {
         rowData = _rowData;
         columnNames = _columnNames;
     }
@@ -243,16 +243,16 @@ class ThreadTableModel extends AbstractTableModel {
         return columnNames.size();
     }
 
-    public Object getValueAt(int row, int column) {
-        return ((Vector) rowData.elementAt(row)).elementAt(column);
+    public String getValueAt(int row, int column) {
+        return rowData.elementAt(row).elementAt(column);
     }
 
     public boolean isCellEditable(int row, int column) {
         return false;
     }
 
-    public void setValueAt(Object value, int row, int column) {
-        ((Vector) rowData.elementAt(row)).setElementAt(value, column);
+    public void setValueAt(String value, int row, int column) {
+        rowData.elementAt(row).setElementAt(value, column);
         fireTableCellUpdated(row, column);
     }
 }
diff --git a/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java b/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
index 8770dca2bb9d9fb827f77c9cf04021a85e364464..e7606951dca0086ce9610b2388733e6b4f56981b 100644
--- a/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
+++ b/pki/base/common/test/com/netscape/certsrv/request/AgentApprovalsTest.java
@@ -61,19 +61,19 @@ public class AgentApprovalsTest extends CMSBaseTestCase {
         assertEquals(approval3.getDate(), approval.getDate());
 
         // test bad data
-        stringVector = new Vector();
+        stringVector = new Vector<String>();
         stringVector.add("foo");
         assertNull(AgentApprovals.fromStringVector(stringVector));
 
-        stringVector = new Vector();
+        stringVector = new Vector<String>();
         stringVector.add(";foo");
         assertNull(AgentApprovals.fromStringVector(stringVector));
 
-        stringVector = new Vector();
+        stringVector = new Vector<String>();
         stringVector.add("bar;foo");
         assertNull(AgentApprovals.fromStringVector(stringVector));
 
-        stringVector = new Vector();
+        stringVector = new Vector<String>();
         stringVector.add("00123b;foo");
         assertNull(AgentApprovals.fromStringVector(stringVector));
 
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 b396c2d3572a0363e9fbd767affab88ffef455a4..5832f6af516fe0e175ecbea0b3e68ee2625eb18d 100644
--- a/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
+++ b/pki/base/common/test/com/netscape/cmscore/request/RequestTest.java
@@ -91,7 +91,6 @@ public class RequestTest extends CMSBaseTestCase {
         assertFalse(request.setExtData("key", (String) null));
     }
 
-    @SuppressWarnings({ "rawtypes", "unchecked" })
     public void testVerifyValidExtDataHashtable() {
         Hashtable<String, String> valueHash = new Hashtable<String, String>();
 
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
index 21e3b418700a1581ab20af9449e8cadbee818f8c..4d68dd15112b881ed35458051013bc2aaa737eea 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java
@@ -140,8 +140,6 @@ public class CMCResponse {
                                 System.out.println("   OtherInfo type: PEND");
                                 PendInfo pi = oi.getPendInfo();
                                 if (pi.getPendTime() != null) {
-                                    byte[] bp = pi.getPendToken().toByteArray();
-                                    String pt = new String(bp);
                                     String datePattern = "dd/MMM/yyyy:HH:mm:ss z";
                                     SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern);
                                     Date d = pi.getPendTime().toDate();
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 22ebd6715428061f6d281942dd7ab77f4170077d..ea427ff7cf899b9896d6b1c59c7893d2c5ee4407 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
@@ -29,7 +29,6 @@ import java.net.URLEncoder;
 import java.security.KeyPair;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.Date;
 
 import netscape.security.x509.X500Name;
 
@@ -261,7 +260,6 @@ public class CRMFPopClient {
         URLConnection conn = null;
         InputStream is = null;
         BufferedReader reader = null;
-        long total_time = 0;
         KeyPair pair = null;
 
         boolean foundTransport = false;
@@ -419,7 +417,6 @@ public class CRMFPopClient {
                 certReq.encode(bo);
                 byte[] toBeVerified = bo.toByteArray();
 
-                byte popdata[] = ASN1Util.encode(certReq);
                 byte signature[];
 
                 System.out.println("."); //CertRequest encoded");
@@ -505,7 +502,6 @@ public class CRMFPopClient {
                 System.out.println("--------------------");
                 System.out.println("");
 
-                long start_time = (new Date()).getTime();
                 conn = url.openConnection();
                 is = conn.getInputStream();
                 reader = new BufferedReader(new InputStreamReader(is));
@@ -517,8 +513,7 @@ public class CRMFPopClient {
                         System.out.println("");
                     }
                 } /* while */
-                long end_time = (new Date()).getTime();
-                total_time += (end_time - start_time);
+
             } catch (Exception e) {
                 System.out.println("WARNING: " + e.toString());
                 e.printStackTrace();
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java b/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java
index e98847611d907a9694a4a441e7118d3171027207..c8817b52f687917f62466c5c5ea3b9bb5b005354 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java
@@ -34,7 +34,6 @@ import java.net.SocketException;
 import java.util.StringTokenizer;
 
 import org.mozilla.jss.CryptoManager;
-import org.mozilla.jss.crypto.CryptoStore;
 import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.crypto.X509Certificate;
 import org.mozilla.jss.ssl.SSLHandshakeCompletedEvent;
@@ -145,7 +144,6 @@ public class HttpClient {
                     CryptoToken token = cm.getInternalKeyStorageToken();
                     Password pass = new Password(password.toCharArray());
                     token.login(pass);
-                    CryptoStore store = token.getCryptoStore();
                     X509Certificate cert = cm.findCertByNickname(nickname);
                     if (cert == null)
                         System.out.println("client cert is null");
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java b/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java
index d127fd99aa4a8f3128378044ec05af4cc92439cc..5b9abe49584c512ed35b747556784de2aa605e40 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java
@@ -47,7 +47,6 @@ import com.netscape.cmsutil.ocsp.CertStatus;
 import com.netscape.cmsutil.ocsp.GoodInfo;
 import com.netscape.cmsutil.ocsp.OCSPRequest;
 import com.netscape.cmsutil.ocsp.OCSPResponse;
-import com.netscape.cmsutil.ocsp.OCSPResponseStatus;
 import com.netscape.cmsutil.ocsp.Request;
 import com.netscape.cmsutil.ocsp.ResponseBytes;
 import com.netscape.cmsutil.ocsp.ResponseData;
@@ -168,7 +167,6 @@ public class OCSPClient {
                         new FileInputStream(output));
         OCSPResponse resp = (OCSPResponse)
                 OCSPResponse.getTemplate().decode(fis);
-        OCSPResponseStatus status = resp.getResponseStatus();
         ResponseBytes bytes = resp.getResponseBytes();
         BasicOCSPResponse basic = (BasicOCSPResponse)
                 BasicOCSPResponse.getTemplate().decode(
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java b/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java
index 8be0b98dd28388b502851f723b045a69320fb8e8..9464516e46fec281dfe7421aaffab3bd6d600c98 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java
@@ -198,7 +198,6 @@ public class PKCS12Export {
 
         String pwdfile = null;
         String dir = null;
-        String snickname = null;
         String pk12pwdfile = null;
         String pk12output = null;
         for (int i = 0; i < args.length; i++) {
@@ -207,7 +206,7 @@ public class PKCS12Export {
             } else if (args[i].equals("-p")) {
                 pwdfile = args[i + 1];
             } else if (args[i].equals("-s")) {
-                snickname = args[i + 1];
+                // snickname
             } else if (args[i].equals("-w")) {
                 pk12pwdfile = args[i + 1];
             } else if (args[i].equals("-o")) {
diff --git a/pki/base/kra/src/com/netscape/kra/EncryptionUnit.java b/pki/base/kra/src/com/netscape/kra/EncryptionUnit.java
index 32c17b08a0365b7b5d515b7f8c41ee86e8c38e2b..946f576133e82b09431b0cc2dd66c62902f04f68 100644
--- a/pki/base/kra/src/com/netscape/kra/EncryptionUnit.java
+++ b/pki/base/kra/src/com/netscape/kra/EncryptionUnit.java
@@ -85,7 +85,6 @@ public abstract class EncryptionUnit implements IEncryptionUnit {
             throws EBaseException {
         try {
             CMS.debug("EncryptionUnit.encryptInternalPrivate");
-            CryptoToken token = getToken();
             CryptoToken internalToken = getInternalToken();
 
             // (1) generate session key
diff --git a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
index c195a78ae302712a2a30ef400295957d6c7521dc..cf2b2d52aa372fcde6f6d50f104983d0696dbc7a 100644
--- a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
+++ b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
@@ -1424,8 +1424,6 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
             nc = mConfig.getSubStore(PROP_NOTIFY_SUBSTORE);
             if (nc != null && nc.size() > 0) {
                 // 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");
@@ -1662,13 +1660,11 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
         }
 
         byte rawData[] = cert.getPublicKey().getEncoded();
-        String key = null;
 
         // convert "rawData" into "base64Data"
         if (rawData != null) {
-            String base64Data = null;
-
-            base64Data = CMS.BtoA(rawData).trim();
+            String base64Data = CMS.BtoA(rawData).trim();
+            String key = "";
 
             // extract all line separators from the "base64Data"
             for (int i = 0; i < base64Data.length(); i++) {
@@ -1676,6 +1672,8 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
                     key += base64Data.substring(i, i);
                 }
             }
+
+            return key;
         }
 
         return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
diff --git a/pki/base/kra/src/com/netscape/kra/RecoveryService.java b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
index 89f8f042acb3e7a16e9c99858507c90d8bf92357..c8ecdcf5a08adb0d000b68f2261d3e4bb0e76a7d 100644
--- a/pki/base/kra/src/com/netscape/kra/RecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/RecoveryService.java
@@ -272,8 +272,8 @@ public class RecoveryService implements IService {
             if (statsSub != null) {
                 statsSub.startTiming("unwrap_key");
             }
-            PrivateKey privateKey = mKRA.getStorageKeyUnit().unwrap(
-                    keyRecord.getPrivateKeyData(), null);
+            mKRA.getStorageKeyUnit().unwrap(
+                    keyRecord.getPrivateKeyData(), null); // throw exception on error
             if (statsSub != null) {
                 statsSub.endTiming("unwrap_key");
             }
diff --git a/pki/base/migrate/80/MigrateSecurityDomain.java b/pki/base/migrate/80/MigrateSecurityDomain.java
index 420e1780555b8203d9fa88f3e88e33ad2bbcdf16..4624f12598c8b739fabc87c0b830a83afb8064c6 100644
--- a/pki/base/migrate/80/MigrateSecurityDomain.java
+++ b/pki/base/migrate/80/MigrateSecurityDomain.java
@@ -187,10 +187,10 @@ public class MigrateSecurityDomain {
                 NodeList nodeList = doc.getElementsByTagName(type);
                 int len = nodeList.getLength();
                 for (int i = 0; i < len; i++) {
-                    Vector v_clone = parser.getValuesFromContainer(nodeList.item(i), "Clone");
-                    Vector v_name = parser.getValuesFromContainer(nodeList.item(i), "SubsystemName");
-                    Vector v_host = parser.getValuesFromContainer(nodeList.item(i), "Host");
-                    Vector v_port = parser.getValuesFromContainer(nodeList.item(i), "SecurePort");
+                    Vector<String> v_clone = parser.getValuesFromContainer(nodeList.item(i), "Clone");
+                    Vector<String> v_name = parser.getValuesFromContainer(nodeList.item(i), "SubsystemName");
+                    Vector<String> v_host = parser.getValuesFromContainer(nodeList.item(i), "Host");
+                    Vector<String> v_port = parser.getValuesFromContainer(nodeList.item(i), "SecurePort");
 
                     String cn = (String) v_host.elementAt(0) + ":" + (String) v_port.elementAt(0);
                     String dn = "cn=" + cn + ",cn=" + type + "List,ou=Security Domain," + basedn;
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
index 6dacc9e08f1bc537306b74910ffdcc18b91acc40..f257f481281f77e3e90f445f94550303dbbe9d70 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
@@ -211,7 +211,6 @@ public class ConfigureSubCA {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -263,7 +262,6 @@ public class ConfigureSubCA {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -352,7 +350,6 @@ public class ConfigureSubCA {
     }
 
     public boolean HierarchyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -372,7 +369,6 @@ public class ConfigureSubCA {
     }
 
     public boolean LdapConnectionPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -400,7 +396,6 @@ public class ConfigureSubCA {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -474,7 +469,6 @@ public class ConfigureSubCA {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -594,7 +588,6 @@ public class ConfigureSubCA {
     }
 
     public boolean BackupPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -733,7 +726,6 @@ public class ConfigureSubCA {
     }
 
     public boolean UpdateDomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
index 092658b5085547f0851aa7960277d188c8e3fad3..aaffdebf8d86a8521a768ead39e0071de6d54930 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
@@ -192,7 +192,6 @@ public class ConfigureTKS {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -242,7 +241,6 @@ public class ConfigureTKS {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -323,7 +321,6 @@ public class ConfigureTKS {
     }
 
     public boolean SubsystemPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -343,7 +340,6 @@ public class ConfigureTKS {
     }
 
     public boolean LdapConnectionPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -371,7 +367,6 @@ public class ConfigureTKS {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -426,7 +421,6 @@ public class ConfigureTKS {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -507,7 +501,6 @@ public class ConfigureTKS {
     }
 
     public boolean BackupPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -547,7 +540,7 @@ public class ConfigureTKS {
             String line = null;
             while ((line = br.readLine()) != null)
                 System.out.println("Error: " + line);
-            int exitVal = proc.waitFor();
+            proc.waitFor();
 
             // verify p12 file
 
@@ -669,7 +662,6 @@ public class ConfigureTKS {
     }
 
     public boolean UpdateDomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
index d4df34a39158661fd1b1f3a8794878e6ed286263..a41a5ef4e65928dae94cb981b8bd42e4d5f39b6e 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
@@ -194,7 +194,6 @@ public class ConfigureTPS {
     }
 
     public boolean DomainPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -270,7 +269,6 @@ public class ConfigureTPS {
     }
 
     public boolean SubsystemPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -305,7 +303,6 @@ public class ConfigureTPS {
 
         sleep_time();
         // TKS choice panel
-        String tks_url = "https://" + tks_hostname + ":" + tks_ssl_port;
         query_string = "p=7" +
                         "&urls=0" +
                         "&op=next" +
@@ -341,7 +338,6 @@ public class ConfigureTPS {
 
     public boolean LdapAuthConnectionPanel() {
         // auth db 
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -367,7 +363,6 @@ public class ConfigureTPS {
     }
 
     public boolean LdapConnectionPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -401,7 +396,6 @@ public class ConfigureTPS {
     }
 
     public boolean TokenChoicePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
@@ -549,7 +543,6 @@ public class ConfigureTPS {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/CreateInstance.java b/pki/base/silent/src/com/netscape/pkisilent/CreateInstance.java
index ddc356a078007b5b6c3d4144da3f99360658e1ba..85113fcea59c2375ba512b1aad161cfc8729b1a2 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/CreateInstance.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/CreateInstance.java
@@ -53,7 +53,7 @@ public class CreateInstance {
 
     }
 
-    public boolean CreateInstance() {
+    public boolean execute() {
         String startURL = "/cert/Tasks/Operation/Create";
         String myStringUrl = "http://" + host + "." + adminDomain + ":" + port
                 + startURL;
@@ -71,7 +71,7 @@ public class CreateInstance {
 
         PostQuery sm = new PostQuery(myStringUrl, AdminDN, AdminDNPW, query);
 
-        return (sm.Send());
+        return sm.Send();
 
     }
 
@@ -96,7 +96,7 @@ public class CreateInstance {
 
         }
 
-        boolean st = newinstance.CreateInstance();
+        boolean st = newinstance.execute();
 
         if (!st) {
             System.out.println("ERROR: Certificate System - Instance NOT created");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java b/pki/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java
index c6bddf26c4a28a633f770d67e1ab63e6c57f6c56..271dd0c62b945d5331c97348b4d8945d9390f198 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java
@@ -372,7 +372,6 @@ class StringScanner {
         char c;
         // parse [-][0-9]*[.][0-9]*[eE][-][0-9]*
         boolean hasDigits = false;
-        boolean signed;
         double value = 0;
 
         skipWhiteSpace();
@@ -380,7 +379,7 @@ class StringScanner {
             exception = new StringScanException("end of input");
         } else {
             if ((c = buf[idx]) == '-' || c == '+') {
-                signed = true;
+                // signed
                 idx++;
             }
             if (matchDigits()) {
@@ -402,7 +401,7 @@ class StringScanner {
                 if ((c = buf[idx]) == 'e' || c == 'E') {
                     idx++;
                     if ((c = buf[idx]) == '-' || c == '+') {
-                        signed = true;
+                        // signed
                         idx++;
                     }
                     if (buf[idx] < '0' || buf[idx] > '9') {
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java b/pki/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java
index f5737167e1ed0d55015571b351861148f755568b..3e4f0bfa2cab98e5819d62f883ecc99ebb467299 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java
@@ -558,8 +558,8 @@ public class CMSConfig extends ServerInfo {
         }
 
         CMSConfig s = new CMSConfig(args[0]);
-        boolean secureC = false;
 
+        // boolean secureC = false;
         // s.EnableDirEnrollment(secureC);	
         s.saveCMSConfig();
 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java b/pki/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java
index 8071dcb29f081e7bcdd64fbfa2aab33d808016df..61305305e8a081c6002758cd15a696ba655bf774 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java
@@ -23,7 +23,6 @@ import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.PrintStream;
-import java.util.Enumeration;
 import java.util.Vector;
 
 import org.mozilla.jss.CryptoManager;
@@ -77,16 +76,9 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback,
     }
 
     public String select(@SuppressWarnings("rawtypes") Vector nicknames) {
-        Enumeration<?> e = nicknames.elements();
 
         System.out.println("nicknames size = " + nicknames.size());
-        int i = 0;
-
-        while (e.hasMoreElements()) {
-            String s = (String) e.nextElement();
-
-            i++;
-        }
+        int i = nicknames.size();
 
         if (i > 0) {
             return (String) nicknames.elementAt(0);
@@ -165,8 +157,6 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback,
     // Submit requests 
 
     public boolean Send() {
-        boolean st = false;
-
         try {
 
             if (!loginCertDB()) {
@@ -235,7 +225,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback,
 
     private boolean loginCertDB() {
         CryptoManager manager;
-        Password pass1 = null, pass2 = null;
+        Password pass1 = null;
 
         try {
             System.out.println("Step 1: Initializing CryptoManager");
@@ -282,8 +272,6 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback,
 
     public boolean Send_withGET() {
 
-        boolean st = false;
-
         try {
 
             if (!loginCertDB()) {
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/ParseXML.java b/pki/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
index 22c1c402c449286a4e6a79edfae383ffb3f7871f..de1b38172ab9144ff2824d0a06e23d3c7f4892cf 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/ParseXML.java
@@ -127,7 +127,6 @@ public class ParseXML {
     // returns an arraylist of values for the corresponding tag
 
     public ArrayList<String> constructValueList(String first, String second) {
-        String temp = null;
         ArrayList<String> al = new ArrayList<String>();
 
         try {
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/PostQuery.java b/pki/base/silent/src/com/netscape/pkisilent/common/PostQuery.java
index b6ab3fe8cd4f22898389d943204b95d308e823d4..31fb07b3ef5ced31a35f1ae29dbb2167e8c32108 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/PostQuery.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/PostQuery.java
@@ -83,7 +83,6 @@ public class PostQuery {
 
         try {
 
-            BufferedReader mbufferedReader = null;
             URL myUrl = new URL(URLString);
             String userPassword = adminID + ":" + adminPWD;
 
@@ -108,8 +107,6 @@ public class PostQuery {
 
             System.out.println("Query: " + postQuery);
 
-            int querylength = postQuery.length();
-
             os.writeBytes(postQuery);
             os.flush();
             os.close();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java b/pki/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java
index f63a0f54bb187abf3a081dce78bd6b4e12625b34..f63456b4d44e102a80aae895e07e95001937dc24 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java
@@ -177,18 +177,6 @@ public class ServerInfo {
             String s = in.readLine();
 
             while (s != null) {
-                // <SSLPARAMS servercertnickname="Server-Cert cert-firefly"
-                int index = s.indexOf("servercertnickname");
-
-                if (index >= 0) {
-                    String str = s.substring(index + 20);
-                    StringTokenizer tokenizer = new StringTokenizer(str, "\"");
-
-                    if (tokenizer.hasMoreElements()) {
-                        String mServerCertNickname = tokenizer.nextToken();
-                    }
-                }
-
                 // <LS id="agent" ip="0.0.0.0" port="8101" security="on"
                 // acceptorthreads="1" blocking="no">
                 if (s.startsWith("<LS id=")) {
@@ -213,7 +201,7 @@ public class ServerInfo {
                         }
 
                         if (index1 != 5 && index2 == IP && !token.equals(" ip=")) {
-                            String ip = token;
+                            // token contains the ip value
                         } else if (index2 == PORT && !token.equals(" port=")) {
 
                             switch (index1) {
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 87161d6897260cbbfcc7892d4c64c58384a9143c..0e4ed9cdd714ed30b8bfb391f719a925083e9b61 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/TestClient.java
@@ -468,7 +468,6 @@ public class TestClient implements SSLCertificateApprovalCallback {
     public String getFreePort(String s) {
         Integer x = new Integer(s);
         int p = x.intValue();
-        boolean st = true;
 
         // if p = 0, then the serversocket constructor get a free port by itself
         p = 0;
@@ -756,10 +755,10 @@ public class TestClient implements SSLCertificateApprovalCallback {
          *************************************************************
          */
 
-        String TransportCert =
+        /*
+         String TransportCert =
                 "MIICJTCCAY6gAwIBAgIBBTANBgkqhkiG9w0BAQQFADBDMRswGQYDVQQKExJhY2NlcHRhY25ldGVzdDEwMjQxFzAVBgNVBAsTDmFjY2VwdGFuY2V0ZXN0MQswCQYDVQQDEwJjYTAeFw0wMzA0MTgyMjMwMDhaFw0wNDA0MTcxMDI2MDhaMDkxETAPBgNVBAoTCHRlc3QxMDI0MRcwFQYDVQQLEw5hY2NlcHRhbmNldGVzdDELMAkGA1UEAxMCcmEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN6sQ3mSU8mL6i6gTZIXDLzOZPhYOkQLpnJjit5hcPZ0JMn0CQVXo4QjKN1xvuZv8qVlZoQw9czmzp/knTa0sCDgFKd0r+u0TnLeZkJMSimgFnma9CnChlaDHnBd8Beu4vyaHmo7rJ0xA4etn7HjhmKbaQZOcv/aP0SW9JXRga7ZAgMBAAGjMzAxMA4GA1UdDwEB/wQEAwIFIDAfBgNVHSMEGDAWgBSC3fsQHb7fddr2vL0UdkM2dAmUWzANBgkqhkiG9w0BAQQFAAOBgQBkAGbgd9HIqwoLKAr+V6bj9oWesDmDH80gPPxj10qyWSQYIs8PofOs/75yGS9nxhydtgSMFoBgCPdroUI31kZQQlFzxtudGoKD+5MWSXho79XzPwpjheOBYgpX6ch+L4tMLFDpqeraB1yZESO5EEeKm20DGVBOKVWxHhddO1BenA==";
 
-        /*
          CRMFClient	CrmfClient = new CRMFClient(s.GetHostName(),s.GetEEPort());
          CrmfClient.setDBInfo(t.GetClientCertDB(),t.GetClientCertDBPW());
          CrmfClient.setTransportCert(TransportCert);
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java b/pki/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java
index e5c2f0b4a5916ba6869f61a893d53a0510805680..5761c6f779c76acc45e6684c421cb81938933014 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java
@@ -502,7 +502,6 @@ public class UserEnroll extends TestClient {
     public static void main(String args[]) {
         // Exit Status - (0) for error/Fail
         // - requestId Pass
-        boolean st;
 
         UserEnroll e = new UserEnroll("jupiter2", "1027",
                 "E=test,cn=test,uid=test", "test", "test", "test", "t1", "t",
diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
index c9584463d632da89c34b9caaba373f2906cd95c3..3c715226d36d9012a374ba63f874b93b6ec8a75c 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java
@@ -1081,7 +1081,6 @@ public class HTTPClient implements SSLCertificateApprovalCallback {
     public static void main(String args[]) {
         HTTPClient hc = new HTTPClient();
         HTTPResponse hr = null;
-        byte[] responseData = null;
 
         // parse args
         StringHolder x_hostname = new StringHolder();
@@ -1208,8 +1207,6 @@ public class HTTPClient implements SSLCertificateApprovalCallback {
 
         // collect and print response
 
-        responseData = hr.getResponseData();
-
         if (hr.getStatusCode() == 200)
             System.out.println("Response from Host:" + cs_hostname + " OK");
         else {
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 bf4de6a830fec4adff9e24541c76840f38839077..bf8a9cfc1495be9a6aae315f29779414eff3548a 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -965,7 +965,6 @@ public class CryptoUtil {
 
         while (enums.hasMoreElements()) {
             CryptoToken token = enums.nextElement();
-            String tokenName = token.getName();
             CryptoStore store = token.getCryptoStore();
             PrivateKey keys[] = store.getPrivateKeys();
 
diff --git a/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java b/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
index 16f948fd7950cece11a77ab634e69a6e5805628f..bf4a7fe73f4db29b5d30f4da303dd8ccddb2dc01 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/Module.java
@@ -28,20 +28,20 @@ public class Module {
     private String mUserFriendlyName = "";
     private String mImagePath = "";
     // a Vector of Tokens
-    private Vector mTokens = null;
+    private Vector<Token> mTokens = null;
     private boolean mFound = false;
 
     public Module(String name, String printName) {
         mCommonName = name;
         mUserFriendlyName = printName;
-        mTokens = new Vector();
+        mTokens = new Vector<Token>();
     }
 
     public Module(String name, String printName, String image) {
         mCommonName = name;
         mUserFriendlyName = printName;
         mImagePath = image;
-        mTokens = new Vector();
+        mTokens = new Vector<Token>();
     }
 
     public void addToken(CryptoToken t) {
@@ -69,7 +69,7 @@ public class Module {
         mFound = isFound;
     }
 
-    public Vector getTokens() {
+    public Vector<Token> getTokens() {
         return mTokens;
     }
 }
diff --git a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
index 8317ad785f8773631507f2d89231cf1cebbfd417..ed2fb67eed9665ba533dbefa970cf3f574ef4769 100644
--- a/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
+++ b/pki/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
@@ -122,8 +122,8 @@ public class XMLObject {
         return null;
     }
 
-    public Vector getAllValues(String tagname) {
-        Vector v = new Vector();
+    public Vector<String> getAllValues(String tagname) {
+        Vector<String> v = new Vector<String>();
         NodeList nodes = mDoc.getElementsByTagName(tagname);
         for (int i = 0; i < nodes.getLength(); i++) {
             Node n = nodes.item(i);
diff --git a/pki/base/util/src/netscape/net/TransferProtocolClient.java b/pki/base/util/src/netscape/net/TransferProtocolClient.java
index cadacaa0f041a320766f6d41304287e77283dd81..76e3a9c2114fa686499de7d6c586d6abb6a34dcd 100644
--- a/pki/base/util/src/netscape/net/TransferProtocolClient.java
+++ b/pki/base/util/src/netscape/net/TransferProtocolClient.java
@@ -35,7 +35,7 @@ public class TransferProtocolClient extends NetworkClient {
      * Array of strings (usually 1 entry) for the last reply
      * from the server.
      */
-    protected Vector serverResponse = new Vector(1);
+    protected Vector<String> serverResponse = new Vector<String>(1);
 
     /** code for last reply */
     protected int lastReplyCode;
@@ -112,7 +112,7 @@ public class TransferProtocolClient extends NetworkClient {
     }
 
     /** Returns all server response strings. */
-    public Vector getResponseStrings() {
+    public Vector<String> getResponseStrings() {
         return serverResponse;
     }
 
diff --git a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
index 6e28b4a0ee3e691e18e97af21694fc7a5a4a2eba..ff1ea71733d2014319743150a0db0e4b1154220b 100644
--- a/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
+++ b/pki/base/util/src/netscape/security/extensions/GenericASN1Extension.java
@@ -73,9 +73,9 @@ public class GenericASN1Extension extends Extension
      * get, set, delete methods of Certificate, x509 type.
      */
     private String name;
-    public static String OID = null;
+    public String OID = null;
     public static Hashtable<String, String> mConfig = null;
-    public static String pattern = null;
+    public String pattern = null;
     private int index = 0;
 
     // Encode this value
@@ -325,7 +325,7 @@ public class GenericASN1Extension extends Extension
      * Return the OID of this attribute.
      */
     public String getOID() {
-        return (OID);
+        return OID;
     }
 
     /**
diff --git a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
index a90abe7e354accaf442dca2987ec4b0fa8f4ed69..4dfffab3d7365f3753ec1ca7aa359b257a669a87 100644
--- a/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
+++ b/pki/base/util/src/netscape/security/extensions/PresenceServerExtension.java
@@ -311,7 +311,11 @@ public class PresenceServerExtension extends Extension implements CertAttrSet {
         fos.write(dos.toByteArray());
         fos.close();
 
+        // decode
+
         Extension ext1 = new Extension(new DerValue(dos.toByteArray()));
+
+        @SuppressWarnings("unused")
         PresenceServerExtension ext2 = new PresenceServerExtension(
                 new Boolean(false), ext1.getExtensionValue());
 
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS7.java b/pki/base/util/src/netscape/security/pkcs/PKCS7.java
index 4de75a4e1a812eee6650257523f1d91ccc785f55..c8fb695824c3a9a7187d7e6762f1574b8f6eec24 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS7.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS7.java
@@ -336,7 +336,7 @@ public class PKCS7 {
     public SignerInfo[] verify(byte[] bytes)
             throws NoSuchAlgorithmException, SignatureException {
 
-        Vector intResult = new Vector();
+        Vector<SignerInfo> intResult = new Vector<SignerInfo>();
         for (int i = 0; i < signerInfos.length; i++) {
 
             SignerInfo signerInfo = verify(signerInfos[i], bytes);
diff --git a/pki/base/util/src/netscape/security/util/DerInputStream.java b/pki/base/util/src/netscape/security/util/DerInputStream.java
index e85d48ed6351c49c475373a2c864f7ac3055788f..20ced675752afdccbcb1e611158b0aad3d69680b 100644
--- a/pki/base/util/src/netscape/security/util/DerInputStream.java
+++ b/pki/base/util/src/netscape/security/util/DerInputStream.java
@@ -314,7 +314,7 @@ public class DerInputStream {
         /*
          * Pull values out of the stream.
          */
-        Vector vec = new Vector(startLen);
+        Vector<DerValue> vec = new Vector<DerValue>(startLen);
         DerValue value;
 
         do {
diff --git a/pki/base/util/src/netscape/security/x509/Extension.java b/pki/base/util/src/netscape/security/x509/Extension.java
index 5d0029875a243457cafe3f88f40c0543d809efdd..7dc9e2890fb93b4346c87554ad57e12403505eb3 100644
--- a/pki/base/util/src/netscape/security/x509/Extension.java
+++ b/pki/base/util/src/netscape/security/x509/Extension.java
@@ -177,7 +177,7 @@ public class Extension implements Serializable {
 
         byte[] dup = new byte[extensionValue.length];
         System.arraycopy(extensionValue, 0, dup, 0, dup.length);
-        return (dup);
+        return dup;
     }
 
     public void setExtensionValue(byte value[]) {
diff --git a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
index b24ce1158881ee68bc41e6cc9de9b23f9dae4af4..0912d5b0c375d85bfeed59f5641494d86bc1cb2d 100644
--- a/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
+++ b/pki/base/util/src/netscape/security/x509/NSCCommentExtension.java
@@ -65,9 +65,9 @@ public class NSCCommentExtension extends Extension
     // Encode this extension value
     private void encodeThis() throws IOException {
         DerOutputStream os = new DerOutputStream();
-        DerOutputStream tmp = new DerOutputStream();
 
         os.putIA5String(mComment);
+        // DerOutputStream tmp = new DerOutputStream();
         // os.write(DerValue.tag_Sequence,tmp);
         extensionValue = os.toByteArray();
     }
diff --git a/pki/base/util/src/netscape/security/x509/X500Name.java b/pki/base/util/src/netscape/security/x509/X500Name.java
index 920b0e1e42c237001c5c5c1e2526d8eda367d692..d44003baa88b1e8d4cc83fd6cb2d5f73a0fc1aa7 100644
--- a/pki/base/util/src/netscape/security/x509/X500Name.java
+++ b/pki/base/util/src/netscape/security/x509/X500Name.java
@@ -148,7 +148,6 @@ public class X500Name implements Principal, GeneralNameInterface {
             String country) throws IOException {
         DirStrConverter dirStrConverter = new DirStrConverter();
         PrintableConverter printableConverter = new PrintableConverter();
-        DerValue val;
         AVA[] assertion = new AVA[1]; // array is cloned in constructors.
         int i = 4;
 
@@ -194,7 +193,6 @@ public class X500Name implements Principal, GeneralNameInterface {
             String country) throws IOException {
         DirStrConverter dirStrConverter = new DirStrConverter();
         PrintableConverter printableConverter = new PrintableConverter();
-        DerValue val;
         AVA[] assertion = new AVA[1]; // array is cloned in constructors.
         int i = 6;
 
-- 
1.7.7.4

