From 6113d7d2f9f10a0a6c1ae02d53d2f8a54c17b173 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Mon, 13 Feb 2012 15:11:56 -0600
Subject: [PATCH] Removed unused variables (part 1).

This patch brings down the warnings from 2917 to 2406.

Ticket #103
---
 pki/base/common/src/LogMessages.properties         |    2 +-
 .../common/src/com/netscape/certsrv/apps/CMS.java  |    4 +-
 .../com/netscape/certsrv/kra/ProofOfArchival.java  |   17 +--
 .../netscape/cms/authentication/PortalEnroll.java  |    2 +-
 .../com/netscape/cms/authorization/AAclAuthz.java  |   17 ---
 .../netscape/cms/authorization/BasicAclAuthz.java  |    3 -
 .../netscape/cms/authorization/DirAclAuthz.java    |    8 +-
 .../cms/crl/CMSAuthInfoAccessExtension.java        |    2 -
 .../cms/crl/CMSCertificateIssuerExtension.java     |    3 -
 .../netscape/cms/crl/CMSFreshestCRLExtension.java  |    2 -
 .../cms/crl/CMSHoldInstructionExtension.java       |    3 -
 .../cms/crl/CMSIssuerAlternativeNameExtension.java |    2 -
 .../crl/CMSIssuingDistributionPointExtension.java  |    2 -
 .../src/com/netscape/cms/jobs/PublishCertsJob.java |    1 -
 .../netscape/cms/jobs/RenewalNotificationJob.java  |    2 -
 .../com/netscape/cms/jobs/RequestInQueueJob.java   |    1 -
 .../com/netscape/cms/password/PasswordChecker.java |   12 --
 .../cms/policy/extensions/IssuerAltNameExt.java    |    4 +-
 .../cms/policy/extensions/NSCCommentExt.java       |    4 -
 .../cms/policy/extensions/NSCertTypeExt.java       |    4 +-
 .../extensions/PrivateKeyUsagePeriodExt.java       |    9 +-
 .../extensions/SubjectDirectoryAttributesExt.java  |    7 +-
 .../netscape/cms/profile/common/BasicProfile.java  |   48 ++++-----
 .../cms/profile/common/CACertCAEnrollProfile.java  |   26 +----
 .../profile/common/ServerCertCAEnrollProfile.java  |   27 +----
 .../profile/common/UserCertCAEnrollProfile.java    |   31 +----
 .../constraint/BasicConstraintsExtConstraint.java  |    2 -
 .../cms/profile/def/FreshestCRLExtDefault.java     |    2 -
 .../def/SubjectDirAttributesExtDefault.java        |    5 +-
 .../cms/publish/mappers/LdapCaSimpleMap.java       |    2 -
 .../cms/publish/mappers/LdapCertExactMap.java      |    2 -
 .../cms/publish/mappers/LdapCertSubjMap.java       |    4 -
 .../cms/publish/mappers/LdapEnhancedMap.java       |    2 -
 .../cms/publish/mappers/LdapSimpleMap.java         |    2 -
 .../cms/publish/publishers/OCSPPublisher.java      |    9 +-
 .../cms/selftests/tks/TKSKnownSessionKey.java      |    1 -
 .../netscape/cms/servlet/admin/AdminServlet.java   |    1 -
 .../cms/servlet/admin/AuthAdminServlet.java        |    4 +-
 .../netscape/cms/servlet/admin/CAAdminServlet.java |   13 +--
 .../cms/servlet/admin/CMSAdminServlet.java         |   92 +--------------
 .../cms/servlet/admin/JobsAdminServlet.java        |    4 +-
 .../cms/servlet/admin/LogAdminServlet.java         |    2 +-
 .../cms/servlet/admin/ProfileAdminServlet.java     |   26 +----
 .../com/netscape/cms/servlet/base/CMSServlet.java  |   12 +-
 .../cms/servlet/base/SystemInfoServlet.java        |    1 -
 .../cms/servlet/cert/CMCRevReqServlet.java         |    1 -
 .../servlet/cert/ChallengeRevocationServlet1.java  |    3 -
 .../netscape/cms/servlet/cert/CloneRedirect.java   |    2 -
 .../netscape/cms/servlet/cert/DirAuthServlet.java  |    1 -
 .../com/netscape/cms/servlet/cert/DisplayCRL.java  |    3 -
 .../cms/servlet/cert/DisplayHashUserEnroll.java    |    1 -
 .../com/netscape/cms/servlet/cert/DoRevokeTPS.java |    4 +-
 .../netscape/cms/servlet/cert/EnrollServlet.java   |    1 -
 .../com/netscape/cms/servlet/cert/GetBySerial.java |    1 -
 .../cms/servlet/cert/HashEnrollServlet.java        |    4 -
 .../netscape/cms/servlet/cert/RenewalServlet.java  |    3 -
 .../com/netscape/cms/servlet/cert/UpdateDir.java   |    1 -
 .../cms/servlet/cert/scep/CRSEnrollment.java       |   21 +---
 .../cms/servlet/cert/scep/ExtensionsRequested.java |    7 +-
 .../cms/servlet/common/CMCOutputTemplate.java      |    2 -
 .../servlet/connector/GenerateKeyPairServlet.java  |    4 -
 .../servlet/csadmin/AdminAuthenticatePanel.java    |    3 +-
 .../netscape/cms/servlet/csadmin/AdminPanel.java   |    3 -
 .../servlet/csadmin/AgentAuthenticatePanel.java    |    4 +-
 .../cms/servlet/csadmin/BackupKeyCertPanel.java    |    5 +-
 .../netscape/cms/servlet/csadmin/CAInfoPanel.java  |    1 -
 .../cms/servlet/csadmin/CertRequestPanel.java      |   12 +--
 .../com/netscape/cms/servlet/csadmin/CertUtil.java |    5 +-
 .../cms/servlet/csadmin/DatabasePanel.java         |   19 +--
 .../netscape/cms/servlet/csadmin/DonePanel.java    |    6 +-
 .../netscape/cms/servlet/csadmin/GetCertChain.java |    3 -
 .../cms/servlet/csadmin/GetConfigEntries.java      |    1 -
 .../netscape/cms/servlet/csadmin/GetCookie.java    |    3 -
 .../netscape/cms/servlet/csadmin/GetDomainXML.java |    4 -
 .../netscape/cms/servlet/csadmin/GetStatus.java    |    3 -
 .../cms/servlet/csadmin/GetSubsystemCert.java      |    3 -
 .../cms/servlet/csadmin/GetTransportCert.java      |    4 -
 .../cms/servlet/csadmin/ImportCAChainPanel.java    |    1 -
 .../cms/servlet/csadmin/MainPageServlet.java       |    1 -
 .../netscape/cms/servlet/csadmin/NamePanel.java    |   12 +-
 .../netscape/cms/servlet/csadmin/RegisterUser.java |    3 -
 .../cms/servlet/csadmin/RestoreKeyCertPanel.java   |    3 +-
 .../cms/servlet/csadmin/SecurityDomainPanel.java   |    8 --
 .../netscape/cms/servlet/csadmin/SizePanel.java    |   11 +-
 .../cms/servlet/csadmin/UpdateDomainXML.java       |   12 +-
 .../cms/servlet/csadmin/WizardPanelBase.java       |   12 --
 .../netscape/cms/servlet/ocsp/AddCAServlet.java    |    1 -
 .../cms/servlet/ocsp/CheckCertServlet.java         |    1 -
 .../netscape/cms/servlet/ocsp/ListCAServlet.java   |    1 -
 .../netscape/cms/servlet/ocsp/RemoveCAServlet.java |    3 -
 .../cms/servlet/processors/PKIProcessor.java       |    2 -
 .../cms/servlet/profile/ProfileReviewServlet.java  |    2 -
 .../cms/servlet/request/model/KeyRequestDAO.java   |    2 -
 .../com/netscape/cms/servlet/tks/TokenServlet.java |   12 +--
 .../src/com/netscape/cmscore/apps/CMSEngine.java   |    3 -
 .../src/com/netscape/cmscore/apps/Upgrade.java     |    5 -
 .../SSLClientCertAuthentication.java               |    1 -
 .../com/netscape/cmscore/base/PropConfigStore.java |    4 +-
 .../cmscore/dbs/CertificateRepository.java         |    8 --
 .../com/netscape/cmscore/dbs/DBVirtualList.java    |    2 -
 .../com/netscape/cmscore/extensions/KeyUsage.java  |    2 -
 .../com/netscape/cmscore/jobs/JobsScheduler.java   |   18 ++--
 .../netscape/cmscore/ldap/PublisherProcessor.java  |   52 +++-----
 .../cmscore/ldapconn/LdapAnonConnFactory.java      |    6 -
 .../cmscore/ldapconn/LdapBoundConnFactory.java     |    8 --
 .../com/netscape/cmscore/logging/LogSubsystem.java |    9 +-
 .../cmscore/notification/EmailTemplate.java        |   12 +--
 .../src/com/netscape/cmscore/policy/PolicySet.java |    3 +-
 .../netscape/cmscore/profile/ProfileSubsystem.java |    6 +-
 .../netscape/cmscore/security/CertificateInfo.java |    1 -
 .../netscape/cmscore/security/JssSubsystem.java    |   16 +--
 .../com/netscape/cmscore/security/KeyCertUtil.java |    4 +-
 .../src/com/netscape/cmscore/security/PWUtil.java  |    6 -
 .../com/netscape/cmscore/usrgrp/UGSubsystem.java   |  124 +-------------------
 .../src/com/netscape/cmstools/AuditVerify.java     |    4 +-
 .../src/com/netscape/cmstools/CMCEnroll.java       |   10 +-
 .../src/com/netscape/cmstools/CMCRequest.java      |    5 -
 .../src/com/netscape/cmstools/CMCRevoke.java       |    7 -
 .../src/com/netscape/cmstools/CRMFPopClient.java   |    4 -
 .../src/com/netscape/cmstools/DRMTool.java         |    4 -
 .../src/com/netscape/cmstools/PKCS12Export.java    |    2 +-
 .../src/com/netscape/cmstools/PasswordCache.java   |    5 -
 .../src/com/netscape/cmstools/PrettyPrintCert.java |    3 -
 .../src/com/netscape/kra/KeyRecoveryAuthority.java |    2 -
 .../src/com/netscape/kra/NetkeyKeygenService.java  |    2 -
 .../com/netscape/kra/TokenKeyRecoveryService.java  |    6 +-
 .../src/com/netscape/pkisilent/ConfigureCA.java    |   18 +---
 .../src/com/netscape/pkisilent/ConfigureOCSP.java  |    2 -
 .../src/com/netscape/pkisilent/ConfigureRA.java    |    3 -
 .../src/com/netscape/pkisilent/ConfigureSubCA.java |   32 +-----
 .../src/com/netscape/pkisilent/ConfigureTKS.java   |   37 +-----
 .../src/com/netscape/pkisilent/ConfigureTPS.java   |   36 +-----
 .../netscape/pkisilent/argparser/ArgParser.java    |    2 -
 .../src/com/netscape/pkisilent/common/CMSLDAP.java |    7 +-
 .../com/netscape/pkisilent/common/ComCrypto.java   |   14 ---
 .../src/com/netscape/pkisilent/common/Request.java |    3 -
 .../netscape/pkisilent/common/checkRequest.java    |    1 -
 .../com/netscape/cmsutil/crypto/CryptoUtil.java    |   12 +--
 .../src/com/netscape/cmsutil/http/HttpClient.java  |    3 -
 .../netscape/cmsutil/http/JssSSLSocketFactory.java |    1 -
 .../com/netscape/cmsutil/scep/CRSPKIMessage.java   |    1 -
 .../util/src/com/netscape/cmsutil/util/Utils.java  |    2 -
 .../util/src/netscape/security/acl/OwnerImpl.java  |    2 +-
 .../util/src/netscape/security/pkcs/PKCS10.java    |    7 +-
 .../util/src/netscape/security/pkcs/PKCS8Key.java  |    3 -
 .../util/src/netscape/security/provider/SHA.java   |    3 +-
 .../x509/IssuingDistributionPointExtension.java    |    4 +-
 .../security/x509/LdapV3DNStrConverter.java        |    2 -
 .../src/netscape/security/x509/X509CertImpl.java   |    3 +-
 .../util/src/netscape/security/x509/X509Key.java   |    3 -
 150 files changed, 217 insertions(+), 982 deletions(-)

diff --git a/pki/base/common/src/LogMessages.properties b/pki/base/common/src/LogMessages.properties
index fada5eb881f979390af70b3941577efbf0ba3ea9..bd108bf80d4af878cb6673d8c8096bc950adff19 100644
--- a/pki/base/common/src/LogMessages.properties
+++ b/pki/base/common/src/LogMessages.properties
@@ -488,7 +488,7 @@ CMSCORE_USRGRP_INTERNAL_DB=find User: Could not get connection to internaldb. Er
 CMSCORE_USRGRP_FIND_USER_BY_CERT=Find User By Certificate Error {0}
 CMSCORE_USRGRP_FIND_USERS=Find Users Error {0}
 CMSCORE_USRGRP_LIST_USERS=List Users Error {0}
-CMSCORE_USRGRP_BUILD_USER=DN not found
+CMSCORE_USRGRP_BUILD_USER=DN not found {0}
 CMSCORE_USRGRP_ADD_USER=add User: Could not get connection to internaldb. Error {0}
 CMSCORE_USRGRP_ADD_USER_CERT=add User Certificate {0}
 CMSCORE_USRGRP_REMOVE_USER=remove User {0}
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
index 75a7e205946270419e746554e4da1a68624f3ab4..5b8aa2c78b6d4a56c94b31859d8ff5241219a994 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
@@ -1564,13 +1564,11 @@ public final class CMS {
 
         String classname = "com.netscape.cmscore.apps.CMSEngine";
 
-        CMS cms = null;
-
         try {
             ICMSEngine engine = (ICMSEngine)
                     Class.forName(classname).newInstance();
 
-            cms = new CMS(engine);
+            CMS.setCMSEngine(engine);
             IConfigStore mainConfig = createFileConfigStore(path);
             CMS.init(null, mainConfig);
             CMS.startup();
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java b/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
index 9d17cbbb2fcda9d53134e010cf5d6c477d5ac41e..df05c882f23ff3ebbae48f25551fd666352c29c6 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
@@ -282,19 +282,13 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
             }
 
             // serial number
-            DerOutputStream serialno = new DerOutputStream();
-
             seq.putInteger(new BigInt(mSerialNo));
 
             // subject name
-            DerOutputStream subject = new DerOutputStream();
-
-            (new X500Name(mSubject)).encode(seq);
+            new X500Name(mSubject).encode(seq);
 
             // issuer name
-            DerOutputStream issuer = new DerOutputStream();
-
-            (new X500Name(mIssuer)).encode(seq);
+            new X500Name(mIssuer).encode(seq);
 
             // issue date
             seq.putUTCTime(mDateOfArchival);
@@ -383,8 +377,11 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
                                 "no signature found"));
                 }
 
-                AlgorithmId algid = AlgorithmId.parse(seq[1]);
-                byte signature[] = seq[2].getBitString();
+                @SuppressWarnings("unused")
+                AlgorithmId algid = AlgorithmId.parse(seq[1]); // consume algid
+
+                @SuppressWarnings("unused")
+                byte signature[] = seq[2].getBitString(); // consume signature
 
                 decodePOA(val, null);
             } else {
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 8049ffb11891c7103deef11edfeca46f81e44cd1..fe2c352ec26c077b45ba7dfbe4f9009e9179ffec 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
@@ -200,7 +200,7 @@ public class PortalEnroll extends DirBasedAuthentication {
                     LDAPv2.SCOPE_SUB, "(uid=" + uid + ")", null, false);
 
             if (res.hasMoreElements()) {
-                LDAPEntry entry = (LDAPEntry) res.nextElement();
+                res.nextElement(); // consume the entry
 
                 throw new EAuthUserError(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_ATTRIBUTE_VALUE",
                         "UID already exists."));
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 dcce8277e125e1701ce85865bbe3dd8254f048c3..73995e6cd46eb74e75e41ddcc0c8d31c589d43fb 100644
--- a/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java
+++ b/pki/base/common/src/com/netscape/cms/authorization/AAclAuthz.java
@@ -127,9 +127,6 @@ public abstract class AAclAuthz {
                 evaluator =
                         (IAccessEvaluator) Class.forName(evalClassPath).newInstance();
             } catch (Exception e) {
-                String errMsg = "init(): failed to load class: " +
-                        evalClassPath + ":" + e.toString();
-
                 throw new EACLsException(CMS.getUserMessage("CMS_ACL_CLASS_LOAD_FAIL",
                             evalClassPath));
             }
@@ -139,8 +136,6 @@ public abstract class AAclAuthz {
                 // store evaluator
                 registerEvaluator(type, evaluator);
             } else {
-                String errMsg = "access evaluator " + type + " is null";
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_NULL", type));
             }
         }
@@ -278,9 +273,6 @@ public abstract class AAclAuthz {
                 params[0] = name;
                 params[1] = perm;
 
-                String errMsg = "checkPermission(): permission denied for the resource " +
-                        name + " on operation " + perm;
-
                 log(ILogger.LL_SECURITY, CMS.getLogMessage("AUTHZ_EVALUATOR_ACCESS_DENIED", name, perm));
 
                 throw new EACLsException(CMS.getUserMessage("CMS_ACL_NO_PERMISSION",
@@ -441,8 +433,6 @@ public abstract class AAclAuthz {
         IAccessEvaluator evaluator = (IAccessEvaluator) mEvaluators.get(type);
 
         if (evaluator == null) {
-            String errMsg = "evaluator for type " + type + "not found";
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_NOT_FOUND", type));
             return false;
         }
@@ -536,9 +526,6 @@ public abstract class AAclAuthz {
             params[0] = name;
             params[1] = perm;
 
-            String errMsg = "checkPermission(): permission denied for the resource " +
-                    name + " on operation " + perm;
-
             log(ILogger.LL_SECURITY,
                     CMS.getLogMessage("AUTHZ_EVALUATOR_ACCESS_DENIED", name, perm));
 
@@ -707,8 +694,6 @@ public abstract class AAclAuthz {
         IAccessEvaluator evaluator = (IAccessEvaluator) mEvaluators.get(type);
 
         if (evaluator == null) {
-            String errMsg = "evaluator for type " + type + "not found";
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_NOT_FOUND", type));
             return false;
         }
@@ -765,8 +750,6 @@ public abstract class AAclAuthz {
      */
     public void updateACLs(String id, String rights, String strACLs,
             String desc) throws EACLsException {
-        ACL acl = (ACL) getACL(id);
-
         String resourceACLs = id;
 
         if (rights != null)
diff --git a/pki/base/common/src/com/netscape/cms/authorization/BasicAclAuthz.java b/pki/base/common/src/com/netscape/cms/authorization/BasicAclAuthz.java
index c3e65ca82d1ad50e7500b1dd5a2f82d91a6e026f..f6b1b6713df019b4ed1b5b02c2c908a07d94669e 100644
--- a/pki/base/common/src/com/netscape/cms/authorization/BasicAclAuthz.java
+++ b/pki/base/common/src/com/netscape/cms/authorization/BasicAclAuthz.java
@@ -179,9 +179,6 @@ public class BasicAclAuthz extends AAclAuthz
             // flushing failed, set flag
             needsFlush = true;
 
-            String errMsg = "updateACLs: failed to flushResourceACLs(): "
-                    + ex.toString();
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_FLUSH_RESOURCES", ex.toString()));
 
             throw new EACLsException(CMS.getUserMessage("CMS_ACL_UPDATE_FAIL"));
diff --git a/pki/base/common/src/com/netscape/cms/authorization/DirAclAuthz.java b/pki/base/common/src/com/netscape/cms/authorization/DirAclAuthz.java
index df24f275eb1236f7da29806e81318cb41935ef26..acc3ffbb79c681118c48799eb1bf107095f8df55 100644
--- a/pki/base/common/src/com/netscape/cms/authorization/DirAclAuthz.java
+++ b/pki/base/common/src/com/netscape/cms/authorization/DirAclAuthz.java
@@ -136,7 +136,8 @@ public class DirAclAuthz extends AAclAuthz
         mBaseDN = ldapConfig.getString(PROP_BASEDN, null);
 
         try {
-            String name1 = ldapConfig.getString("ldapconn.host");
+            @SuppressWarnings("unused")
+            String hostname = ldapConfig.getString("ldapconn.host"); // check for errors
         } catch (EBaseException e) {
             if (CMS.isPreOpMode())
                 return;
@@ -172,8 +173,6 @@ public class DirAclAuthz extends AAclAuthz
                 log(ILogger.LL_INFO, "ldap search found no cn=aclResources");
             }
         } catch (LDAPException e) {
-            String errMsg = "init() -" + e.toString();
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_INIT_ERROR", e.toString()));
             throw new EACLsException(CMS.getUserMessage("CMS_ACL_CONNECT_LDAP_FAIL", mBaseDN));
         } catch (EBaseException e) {
@@ -274,9 +273,6 @@ public class DirAclAuthz extends AAclAuthz
             // flushing failed, set flag
             needsFlush = true;
 
-            String errMsg = "updateACLs: failed to flushResourceACLs(): "
-                    + ex.toString();
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("AUTHZ_EVALUATOR_FLUSH_RESOURCES", ex.toString()));
 
             throw new EACLsException(CMS.getUserMessage("CMS_ACL_UPDATE_FAIL"));
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSAuthInfoAccessExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSAuthInfoAccessExtension.java
index f3aa5180bd8d0e6e9f40c6040f1dc6ba40a75c92..d070cc6fd513b1ab0da31ab71c2633fd93a48a0a 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSAuthInfoAccessExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSAuthInfoAccessExtension.java
@@ -33,7 +33,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -70,7 +69,6 @@ public class CMSAuthInfoAccessExtension
 
     public Extension getCRLExtension(IConfigStore config, Object ip,
             boolean critical) {
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
         AuthInfoAccessExtension authInfoAccessExt = new AuthInfoAccessExtension(critical);
 
         int numberOfAccessDescriptions = 0;
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSCertificateIssuerExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSCertificateIssuerExtension.java
index 02556d4956b0d1f704f5bc7dfc3e5d632910341c..67f4736c7a35305f45fb9b7427d30d3c86b18912 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSCertificateIssuerExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSCertificateIssuerExtension.java
@@ -33,7 +33,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -71,8 +70,6 @@ public class CMSCertificateIssuerExtension
         CertificateIssuerExtension certIssuerExt = null;
         int numNames = 0;
 
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
-
         try {
             numNames = config.getInteger("numNames", 0);
         } catch (EBaseException e) {
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSFreshestCRLExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSFreshestCRLExtension.java
index 38eb7a1c6e79b0a090d895cdae0c17029651452d..edb6494aff9ac78911dd8ba81e73fa3404e31b9f 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSFreshestCRLExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSFreshestCRLExtension.java
@@ -35,7 +35,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -68,7 +67,6 @@ public class CMSFreshestCRLExtension
 
     public Extension getCRLExtension(IConfigStore config, Object ip,
             boolean critical) {
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
         FreshestCRLExtension freshestCRLExt = null;
 
         int numPoints = 0;
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSHoldInstructionExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSHoldInstructionExtension.java
index ca76428659e15e0f906565f7ff4c31d1222e31e1..df8d058ce587fed0ab5b943620d0c117a3b2be46 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSHoldInstructionExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSHoldInstructionExtension.java
@@ -31,7 +31,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -74,8 +73,6 @@ public class CMSHoldInstructionExtension
         HoldInstructionExtension holdInstrExt = null;
         String instruction = null;
 
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
-
         try {
             instruction = config.getString(PROP_INSTR);
         } catch (EPropertyNotFound e) {
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSIssuerAlternativeNameExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSIssuerAlternativeNameExtension.java
index 183de1b43dc824a838d925b83d25f1d7c5645f80..88e8597985bc1fcaa6fa767a9a51b951552f8bd6 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSIssuerAlternativeNameExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSIssuerAlternativeNameExtension.java
@@ -42,7 +42,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -85,7 +84,6 @@ public class CMSIssuerAlternativeNameExtension
     public Extension getCRLExtension(IConfigStore config,
             Object ip,
             boolean critical) {
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
         IssuerAlternativeNameExtension issuerAltNameExt = null;
         int numNames = 0;
 
diff --git a/pki/base/common/src/com/netscape/cms/crl/CMSIssuingDistributionPointExtension.java b/pki/base/common/src/com/netscape/cms/crl/CMSIssuingDistributionPointExtension.java
index 3df2433052848dcc6ed7fdf24462a06f796729a0..21bd86b0acffa1c804668af34dd0cf6d75d26df1 100644
--- a/pki/base/common/src/com/netscape/cms/crl/CMSIssuingDistributionPointExtension.java
+++ b/pki/base/common/src/com/netscape/cms/crl/CMSIssuingDistributionPointExtension.java
@@ -38,7 +38,6 @@ import com.netscape.certsrv.base.EPropertyNotFound;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.ca.ICMSCRLExtension;
-import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.logging.ILogger;
 
@@ -88,7 +87,6 @@ public class CMSIssuingDistributionPointExtension
             boolean critical) {
 
         CMS.debug("in CMSIssuingDistributionPointExtension::getCRLExtension.");
-        ICRLIssuingPoint crlIssuingPoint = (ICRLIssuingPoint) ip;
         IssuingDistributionPointExtension issuingDPointExt = null;
         IssuingDistributionPoint issuingDPoint = new IssuingDistributionPoint();
 
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 efca7416847617b56f3a0727e39f7c1b9d608c6b..903f83691e54a41ae8fb814ac935112a06646754 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/PublishCertsJob.java
@@ -176,7 +176,6 @@ public class PublishCertsJob extends AJobBase
                        getId() + " : run()");
         // get time now..."now" is before the loop
         Date date = CMS.getCurrentDate();
-        long now = date.getTime();
         DateFormat dateFormat = DateFormat.getDateTimeInstance();
         String nowString = dateFormat.format(date);
 
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 8abe027c4e924a34ae10f88f72be2d8ee6f1d181..621d987febb8020d11acb9d68513a7628cb5a6fe 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RenewalNotificationJob.java
@@ -584,8 +584,6 @@ public class RenewalNotificationJob
         if (mHTML == true)
             mn.setContentType("text/html");
 
-        String failedString = null;
-
         mn.setContent(msg);
 
         mn.sendNotification();
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 0a3bf0e133a8d724a047572bcfebfcbcd9b74314..adddc9755bc9f2a2cc499305fe525f8779a822d2 100644
--- a/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java
+++ b/pki/base/common/src/com/netscape/cms/jobs/RequestInQueueJob.java
@@ -163,7 +163,6 @@ public class RequestInQueueJob extends AJobBase
             return;
 
         Date date = CMS.getCurrentDate();
-        long now = date.getTime();
         DateFormat dateFormat = DateFormat.getDateTimeInstance();
         String nowString = dateFormat.format(date);
 
diff --git a/pki/base/common/src/com/netscape/cms/password/PasswordChecker.java b/pki/base/common/src/com/netscape/cms/password/PasswordChecker.java
index d0b596c5f452f8de22caf415fbb563151ec4d825..847f3a2c1b500ede5de492ee1f316cd57f27cb24 100644
--- a/pki/base/common/src/com/netscape/cms/password/PasswordChecker.java
+++ b/pki/base/common/src/com/netscape/cms/password/PasswordChecker.java
@@ -42,14 +42,8 @@ public class PasswordChecker implements IPasswordCheck, IConfigPasswordCheck {
 
     public boolean isGoodConfigPassword(String mPassword) {
         if (mPassword == null || mPassword.length() == 0) {
-            EPasswordCheckException e = new EPasswordCheckException(
-                    "Empty Password");
-
             return false;
         } else if (mPassword.length() < MIN_LEN) {
-            EPasswordCheckException e = new EPasswordCheckException(
-                    "Minimium Length is " + MIN_LEN);
-
             return false;
         }
         return true;
@@ -80,14 +74,8 @@ public class PasswordChecker implements IPasswordCheck, IConfigPasswordCheck {
      */
     public boolean isGoodPassword(String mPassword) {
         if (mPassword == null || mPassword.length() == 0) {
-            EPasswordCheckException e = new EPasswordCheckException(
-                    CMS.getUserMessage("CMS_PASSWORD_EMPTY_PASSWORD"));
-
             return false;
         } else if (mPassword.length() < MIN_LEN) {
-            EPasswordCheckException e = new EPasswordCheckException(
-                    CMS.getUserMessage("CMS_PASSWORD_INVALID_LEN", "" + MIN_LEN));
-
             return false;
         }
         return true;
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
index 21afaa18858138478a473abcae071166c7ee41e1..bb9abd9cfe9d6f4dfb7f507760a7a1f843caab8f 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/IssuerAltNameExt.java
@@ -153,9 +153,7 @@ public class IssuerAltNameExt extends APolicyRule
         X509CertInfo[] ci =
                 req.getExtDataInCertInfoArray(IRequest.CERT_INFO);
 
-        X509CertInfo certInfo = null;
-
-        if (ci == null || (certInfo = ci[0]) == null) {
+        if (ci == null || ci[0] == null) {
             setError(req, CMS.getUserMessage("CMS_POLICY_NO_CERT_INFO"), NAME);
             return PolicyResult.REJECTED; // unrecoverable error.
         }
diff --git a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
index f3ae4efa4d5472c3559f0045ec00a2284b7652b6..ecc084d2982ecd80371643839db0a8727f91e9cb 100644
--- a/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
+++ b/pki/base/common/src/com/netscape/cms/policy/extensions/NSCCommentExt.java
@@ -28,7 +28,6 @@ import java.util.Vector;
 
 import netscape.security.x509.CertificateExtensions;
 import netscape.security.x509.CertificateVersion;
-import netscape.security.x509.DisplayText;
 import netscape.security.x509.NSCCommentExtension;
 import netscape.security.x509.X509CertInfo;
 
@@ -233,9 +232,6 @@ public class NSCCommentExt extends APolicyRule
 
         certApplied = true;
 
-        DisplayText displayText =
-                new DisplayText(DisplayText.tag_IA5String, mUserNoticeDisplayText);
-
         try {
             NSCCommentExtension cpExt =
                     new NSCCommentExtension(mCritical, mUserNoticeDisplayText);
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 8903535dd2700249093d02e6ac4bee96665cf8b5..2d521e8d578a8eb47860d826388dc69f759f0ca6 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
@@ -164,9 +164,7 @@ public class NSCertTypeExt extends APolicyRule
         X509CertInfo[] ci =
                 req.getExtDataInCertInfoArray(IRequest.CERT_INFO);
 
-        X509CertInfo certInfo = null;
-
-        if (ci == null || (certInfo = ci[0]) == null) {
+        if (ci == null || ci[0] == null) {
             setError(req, CMS.getUserMessage("CMS_POLICY_NO_CERT_INFO"), NAME);
             return PolicyResult.REJECTED; // unrecoverable error.
         }
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 52c8f1f6965aff1da79ce585aace1b2b5c9d97a1..fe2565428a170c5a1b9505f87a66b4ea8cfb8b09 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
@@ -136,12 +136,9 @@ public class PrivateKeyUsagePeriodExt extends APolicyRule
             mNotAfter = config.getString(PROP_NOT_AFTER, null);
             mCritical = config.getBoolean(PROP_IS_CRITICAL, false);
 
-            // Check the parameter formats
-            String notBefore;
-            String notAfter;
-
-            notBefore = formatter.format(formatter.parse(mNotBefore.trim()));
-            notAfter = formatter.format(formatter.parse(mNotAfter.trim()));
+            // Check the parameter formats for errors
+            formatter.format(formatter.parse(mNotBefore.trim()));
+            formatter.format(formatter.parse(mNotAfter.trim()));
         } catch (Exception e) {
             // e.printStackTrace();
             Object[] params = { getInstanceName(), e };
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 6c1c6a4e819bb8c1b171daca805b66185747c746..b4ebb4b4530032c54a7f339041c78587ccba5d89 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
@@ -143,7 +143,6 @@ public class SubjectDirectoryAttributesExt extends APolicyRule
 
     public PolicyResult applyCert(IRequest req, X509CertInfo certInfo) {
         CertificateExtensions extensions = null;
-        SubjectDirAttributesExtension subjDirExt = null;
 
         try {
             // get extension and remove if exists.
@@ -413,7 +412,7 @@ class AttributeConfig {
 
         while (n.hasMoreElements()) {
             sb.append(",");
-            sb.append((String) n.nextElement());
+            sb.append(n.nextElement());
         }
         return sb.toString();
     }
@@ -421,9 +420,9 @@ class AttributeConfig {
     private static void checkValue(ObjectIdentifier oid, String val)
             throws IOException {
         AVAValueConverter c = X500NameAttrMap.getDefault().getValueConverter(oid);
-        DerValue derval;
 
-        derval = c.getValue(val); // errs encountered will get thrown.
+        @SuppressWarnings("unused")
+        DerValue derval = c.getValue(val); // check for errors
         return;
     }
 
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 9416171215a960d4bee9413d47c11c8967344a69..cab5941888d7c984eee8192eb6bfae7afbdb00b1 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
@@ -221,7 +221,7 @@ public abstract class BasicProfile implements IProfile {
         StringTokenizer input_st = new StringTokenizer(input_list, ",");
 
         while (input_st.hasMoreTokens()) {
-            String input_id = (String) input_st.nextToken();
+            String input_id = input_st.nextToken();
             String inputClassId = inputStore.getString(input_id + "." +
                     PROP_CLASS_ID);
             IPluginInfo inputInfo = mRegistry.getPluginInfo("profileInput",
@@ -251,7 +251,7 @@ public abstract class BasicProfile implements IProfile {
         StringTokenizer output_st = new StringTokenizer(output_list, ",");
 
         while (output_st.hasMoreTokens()) {
-            String output_id = (String) output_st.nextToken();
+            String output_id = output_st.nextToken();
 
             String outputClassId = outputStore.getString(output_id + "." +
                     PROP_CLASS_ID);
@@ -282,7 +282,7 @@ public abstract class BasicProfile implements IProfile {
         StringTokenizer updater_st = new StringTokenizer(updater_list, ",");
 
         while (updater_st.hasMoreTokens()) {
-            String updater_id = (String) updater_st.nextToken();
+            String updater_id = updater_st.nextToken();
 
             String updaterClassId = updaterStore.getString(updater_id + "." +
                     PROP_CLASS_ID);
@@ -313,14 +313,14 @@ public abstract class BasicProfile implements IProfile {
         StringTokenizer st = new StringTokenizer(setlist, ",");
 
         while (st.hasMoreTokens()) {
-            String setId = (String) st.nextToken();
+            String setId = st.nextToken();
 
             IConfigStore policyStore = policySetStore.getSubStore(setId);
             String list = policyStore.getString(PROP_POLICY_LIST, "");
             StringTokenizer st1 = new StringTokenizer(list, ",");
 
             while (st1.hasMoreTokens()) {
-                String id = (String) st1.nextToken();
+                String id = st1.nextToken();
 
                 String defaultRoot = id + "." + PROP_DEFAULT;
                 String defaultClassId = policyStore.getString(defaultRoot + "." +
@@ -350,7 +350,7 @@ public abstract class BasicProfile implements IProfile {
     }
 
     public IProfileUpdater getProfileUpdater(String name) {
-        return (IProfileUpdater) mUpdaters.get(name);
+        return mUpdaters.get(name);
     }
 
     public Enumeration<String> getProfileOutputIds() {
@@ -358,7 +358,7 @@ public abstract class BasicProfile implements IProfile {
     }
 
     public IProfileOutput getProfileOutput(String name) {
-        return (IProfileOutput) mOutputs.get(name);
+        return mOutputs.get(name);
     }
 
     public Enumeration<String> getProfileInputIds() {
@@ -366,7 +366,7 @@ public abstract class BasicProfile implements IProfile {
     }
 
     public IProfileInput getProfileInput(String name) {
-        return (IProfileInput) mInputs.get(name);
+        return mInputs.get(name);
     }
 
     public void addInputName(String name) {
@@ -424,10 +424,9 @@ public abstract class BasicProfile implements IProfile {
             }
 
             int size = policies.size();
-            boolean found = false;
 
             for (int i = 0; i < size; i++) {
-                ProfilePolicy policy = (ProfilePolicy) policies.elementAt(i);
+                ProfilePolicy policy = policies.elementAt(i);
                 String id = policy.getId();
 
                 if (id.equals(policyId)) {
@@ -481,10 +480,9 @@ public abstract class BasicProfile implements IProfile {
                 newlist = newlist.substring(0, newlist.length() - 1);
 
             int size = mInputIds.size();
-            boolean found = false;
 
             for (int i = 0; i < size; i++) {
-                String id = (String) mInputIds.elementAt(i);
+                String id = mInputIds.elementAt(i);
 
                 if (id.equals(inputId)) {
                     mInputIds.removeElementAt(i);
@@ -522,10 +520,9 @@ public abstract class BasicProfile implements IProfile {
                 newlist = newlist.substring(0, newlist.length() - 1);
 
             int size = mOutputIds.size();
-            boolean found = false;
 
             for (int i = 0; i < size; i++) {
-                String id = (String) mOutputIds.elementAt(i);
+                String id = mOutputIds.elementAt(i);
 
                 if (id.equals(outputId)) {
                     mOutputIds.removeElementAt(i);
@@ -621,7 +618,7 @@ public abstract class BasicProfile implements IProfile {
             Enumeration<String> enum1 = nvps.getNames();
 
             while (enum1.hasMoreElements()) {
-                String name = (String) enum1.nextElement();
+                String name = enum1.nextElement();
 
                 outputStore.putString(prefix + "params." + name, nvps.getValue(name));
                 try {
@@ -724,7 +721,7 @@ public abstract class BasicProfile implements IProfile {
             Enumeration<String> enum1 = nvps.getNames();
 
             while (enum1.hasMoreElements()) {
-                String name = (String) enum1.nextElement();
+                String name = enum1.nextElement();
 
                 inputStore.putString(prefix + "params." + name, nvps.getValue(name));
                 try {
@@ -781,7 +778,7 @@ public abstract class BasicProfile implements IProfile {
                 Enumeration<String> keys = mPolicySet.keys();
 
                 while (keys.hasMoreElements()) {
-                    String k = (String) keys.nextElement();
+                    String k = keys.nextElement();
 
                     if (!(setlist.toString()).equals("")) {
                         setlist.append(",");
@@ -836,7 +833,7 @@ public abstract class BasicProfile implements IProfile {
 
         int matches = 0;
         while (st.hasMoreTokens()) {
-            String sId = (String) st.nextToken();
+            String sId = st.nextToken();
 
             //Only search the setId set. Ex: encryptionCertSet
             if (!sId.equals(setId)) {
@@ -854,7 +851,7 @@ public abstract class BasicProfile implements IProfile {
             StringTokenizer st1 = new StringTokenizer(list, ",");
 
             while (st1.hasMoreTokens()) {
-                String curId = (String) st1.nextToken();
+                String curId = st1.nextToken();
 
                 String defaultRoot = curId + "." + PROP_DEFAULT;
                 String curDefaultClassId = null;
@@ -996,7 +993,7 @@ public abstract class BasicProfile implements IProfile {
             return null;
 
         for (int i = 0; i < policies.size(); i++) {
-            ProfilePolicy policy = (ProfilePolicy) policies.elementAt(i);
+            ProfilePolicy policy = policies.elementAt(i);
 
             if (policy.getId().equals(id)) {
                 return policy;
@@ -1060,7 +1057,7 @@ public abstract class BasicProfile implements IProfile {
         Enumeration<String> ids = getProfileInputIds();
 
         while (ids.hasMoreElements()) {
-            String id = (String) ids.nextElement();
+            String id = ids.nextElement();
             IProfileInput input = getProfileInput(id);
 
             input.populate(ctx, request);
@@ -1084,8 +1081,7 @@ public abstract class BasicProfile implements IProfile {
         CMS.debug("BasicProfile: populate() policy setid =" + setId);
 
         for (int i = 0; i < policies.size(); i++) {
-            ProfilePolicy policy = (ProfilePolicy)
-                    policies.elementAt(i);
+            ProfilePolicy policy = policies.elementAt(i);
 
             policy.getDefault().populate(request);
         }
@@ -1102,8 +1098,7 @@ public abstract class BasicProfile implements IProfile {
         Vector<ProfilePolicy> policies = getPolicies(setId);
 
         for (int i = 0; i < policies.size(); i++) {
-            ProfilePolicy policy = (ProfilePolicy)
-                    policies.elementAt(i);
+            ProfilePolicy policy = policies.elementAt(i);
 
             policy.getConstraint().validate(request);
         }
@@ -1129,8 +1124,7 @@ public abstract class BasicProfile implements IProfile {
         Vector<String> v = new Vector<String>();
 
         for (int i = 0; i < policies.size(); i++) {
-            ProfilePolicy policy = (ProfilePolicy)
-                    policies.elementAt(i);
+            ProfilePolicy policy = policies.elementAt(i);
 
             v.addElement(policy.getId());
         }
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 cdaddef55287ec15c09342db5ff423ce37699039..3ad301b266113c827544ce1ef959b4ee59d2fa09 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
@@ -20,11 +20,8 @@ package com.netscape.cms.profile.common;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.common.NameValuePairs;
-import com.netscape.certsrv.profile.IPolicyConstraint;
 import com.netscape.certsrv.profile.IPolicyDefault;
 import com.netscape.certsrv.profile.IProfileEx;
-import com.netscape.certsrv.profile.IProfileInput;
-import com.netscape.certsrv.profile.IProfileOutput;
 import com.netscape.certsrv.profile.IProfilePolicy;
 
 /**
@@ -43,25 +40,18 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
     public void populate() throws EBaseException {
         // create inputs
         NameValuePairs inputParams1 = new NameValuePairs();
-        IProfileInput input1 =
-                createProfileInput("i1", "certReqInputImpl", inputParams1);
+        createProfileInput("i1", "certReqInputImpl", inputParams1);
         NameValuePairs inputParams2 = new NameValuePairs();
-        IProfileInput input2 =
-                createProfileInput("i2", "submitterInfoInputImpl", inputParams2);
+        createProfileInput("i2", "submitterInfoInputImpl", inputParams2);
 
         // create outputs 
         NameValuePairs outputParams1 = new NameValuePairs();
-        IProfileOutput output1 =
-                createProfileOutput("o1", "certOutputImpl", outputParams1);
+        createProfileOutput("o1", "certOutputImpl", outputParams1);
 
         // create policies
         IProfilePolicy policy1 =
                 createProfilePolicy("set1", "p1",
                         "userSubjectNameDefaultImpl", "noConstraintImpl");
-        IPolicyDefault def1 = policy1.getDefault();
-        IConfigStore defConfig1 = def1.getConfigStore();
-        IPolicyConstraint con1 = policy1.getConstraint();
-        IConfigStore conConfig1 = con1.getConfigStore();
 
         IProfilePolicy policy2 =
                 createProfilePolicy("set1", "p2",
@@ -70,8 +60,6 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         IConfigStore defConfig2 = def2.getConfigStore();
         defConfig2.putString("params.range", "180");
         defConfig2.putString("params.startTime", "0");
-        IPolicyConstraint con2 = policy2.getConstraint();
-        IConfigStore conConfig2 = con2.getConfigStore();
 
         IProfilePolicy policy3 =
                 createProfilePolicy("set1", "p3",
@@ -81,8 +69,6 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         defConfig3.putString("params.keyType", "RSA");
         defConfig3.putString("params.keyMinLength", "512");
         defConfig3.putString("params.keyMaxLength", "4096");
-        IPolicyConstraint con3 = policy3.getConstraint();
-        IConfigStore conConfig3 = con3.getConfigStore();
 
         IProfilePolicy policy4 =
                 createProfilePolicy("set1", "p4",
@@ -92,8 +78,6 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         defConfig4.putString("params.signingAlg", "-");
         defConfig4.putString("params.signingAlgsAllowed",
                 "SHA1withRSA,SHA256withRSA,SHA512withRSA,MD5withRSA,MD2withRSA,SHA256withEC,SHA384withEC,SHA512withEC");
-        IPolicyConstraint con4 = policy4.getConstraint();
-        IConfigStore conConfig4 = con4.getConfigStore();
 
         // extensions
         IProfilePolicy policy5 =
@@ -111,8 +95,6 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         defConfig5.putString("params.keyUsageKeyCertSign", "true");
         defConfig5.putString("params.keyUsageKeyEncipherment", "false");
         defConfig5.putString("params.keyUsageNonRepudiation", "true");
-        IPolicyConstraint con5 = policy5.getConstraint();
-        IConfigStore conConfig5 = con5.getConfigStore();
 
         IProfilePolicy policy6 =
                 createProfilePolicy("set1", "p6",
@@ -122,7 +104,5 @@ public class CACertCAEnrollProfile extends CAEnrollProfile
         defConfig6.putString("params.basicConstraintsPathLen", "-1");
         defConfig6.putString("params.basicConstraintsIsCA", "true");
         defConfig6.putString("params.basicConstraintsPathLen", "-1");
-        IPolicyConstraint con6 = policy6.getConstraint();
-        IConfigStore conConfig6 = con6.getConfigStore();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/ServerCertCAEnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/ServerCertCAEnrollProfile.java
index 8a00f3f32da059a7f7f51d3b958fa9cf9cdc0b70..9be1e43c4e9f35a4d324c18df00feb8dc328842a 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/ServerCertCAEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/ServerCertCAEnrollProfile.java
@@ -20,11 +20,8 @@ package com.netscape.cms.profile.common;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.common.NameValuePairs;
-import com.netscape.certsrv.profile.IPolicyConstraint;
 import com.netscape.certsrv.profile.IPolicyDefault;
 import com.netscape.certsrv.profile.IProfileEx;
-import com.netscape.certsrv.profile.IProfileInput;
-import com.netscape.certsrv.profile.IProfileOutput;
 import com.netscape.certsrv.profile.IProfilePolicy;
 
 /**
@@ -43,24 +40,16 @@ public class ServerCertCAEnrollProfile extends CAEnrollProfile
     public void populate() throws EBaseException {
         // create inputs
         NameValuePairs inputParams1 = new NameValuePairs();
-        IProfileInput input1 =
-                createProfileInput("i1", "certReqInputImpl", inputParams1);
+        createProfileInput("i1", "certReqInputImpl", inputParams1);
         NameValuePairs inputParams2 = new NameValuePairs();
-        IProfileInput input2 =
-                createProfileInput("i2", "submitterInfoInputImpl", inputParams2);
+        createProfileInput("i2", "submitterInfoInputImpl", inputParams2);
 
         // create outputs
         NameValuePairs outputParams1 = new NameValuePairs();
-        IProfileOutput output1 =
-                createProfileOutput("o1", "certOutputImpl", outputParams1);
+        createProfileOutput("o1", "certOutputImpl", outputParams1);
 
-        IProfilePolicy policy1 =
-                createProfilePolicy("set1", "p1",
+        createProfilePolicy("set1", "p1",
                         "userSubjectNameDefaultImpl", "noConstraintImpl");
-        IPolicyDefault def1 = policy1.getDefault();
-        IConfigStore defConfig1 = def1.getConfigStore();
-        IPolicyConstraint con1 = policy1.getConstraint();
-        IConfigStore conConfig1 = con1.getConfigStore();
 
         IProfilePolicy policy2 =
                 createProfilePolicy("set1", "p2",
@@ -69,8 +58,6 @@ public class ServerCertCAEnrollProfile extends CAEnrollProfile
         IConfigStore defConfig2 = def2.getConfigStore();
         defConfig2.putString("params.range", "180");
         defConfig2.putString("params.startTime", "0");
-        IPolicyConstraint con2 = policy2.getConstraint();
-        IConfigStore conConfig2 = con2.getConfigStore();
 
         IProfilePolicy policy3 =
                 createProfilePolicy("set1", "p3",
@@ -80,8 +67,6 @@ public class ServerCertCAEnrollProfile extends CAEnrollProfile
         defConfig3.putString("params.keyType", "RSA");
         defConfig3.putString("params.keyMinLength", "512");
         defConfig3.putString("params.keyMaxLength", "4096");
-        IPolicyConstraint con3 = policy3.getConstraint();
-        IConfigStore conConfig3 = con3.getConfigStore();
 
         IProfilePolicy policy4 =
                 createProfilePolicy("set1", "p4",
@@ -93,8 +78,6 @@ public class ServerCertCAEnrollProfile extends CAEnrollProfile
                 .putString(
                         "params.signingAlgsAllowed",
                         "SHA1withRSA,SHA256withRSA,SHA512withRSA,MD5withRSA,MD2withRSA,SHA1withEC,SHA256withEC,SHA384withEC,SHA512withEC");
-        IPolicyConstraint con4 = policy4.getConstraint();
-        IConfigStore conConfig4 = con4.getConfigStore();
 
         IProfilePolicy policy5 =
                 createProfilePolicy("set1", "p5",
@@ -111,8 +94,6 @@ public class ServerCertCAEnrollProfile extends CAEnrollProfile
         defConfig5.putString("params.keyUsageKeyCertSign", "false");
         defConfig5.putString("params.keyUsageKeyEncipherment", "true");
         defConfig5.putString("params.keyUsageNonRepudiation", "true");
-        IPolicyConstraint con5 = policy5.getConstraint();
-        IConfigStore conConfig5 = con5.getConfigStore();
 
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/UserCertCAEnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/UserCertCAEnrollProfile.java
index 69414707e4acd32a1f1bc7e1197d205c811b36f3..3f1cdfb21ace38fbc37d1a47abf3e6cce0f85df6 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/UserCertCAEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/UserCertCAEnrollProfile.java
@@ -20,11 +20,8 @@ package com.netscape.cms.profile.common;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.common.NameValuePairs;
-import com.netscape.certsrv.profile.IPolicyConstraint;
 import com.netscape.certsrv.profile.IPolicyDefault;
 import com.netscape.certsrv.profile.IProfileEx;
-import com.netscape.certsrv.profile.IProfileInput;
-import com.netscape.certsrv.profile.IProfileOutput;
 import com.netscape.certsrv.profile.IProfilePolicy;
 
 /**
@@ -43,28 +40,18 @@ public class UserCertCAEnrollProfile extends CAEnrollProfile
     public void populate() throws EBaseException {
         // create inputs
         NameValuePairs inputParams1 = new NameValuePairs();
-        IProfileInput input1 =
-                createProfileInput("i1", "keyGenInputImpl", inputParams1);
+        createProfileInput("i1", "keyGenInputImpl", inputParams1);
         NameValuePairs inputParams2 = new NameValuePairs();
-        IProfileInput input2 =
-                createProfileInput("i2", "subjectNameInputImpl", inputParams2);
-        NameValuePairs inputParams3 = new NameValuePairs();
-        IProfileInput input3 =
-                createProfileInput("i3", "submitterInfoInputImpl", inputParams2);
+        createProfileInput("i2", "subjectNameInputImpl", inputParams2);
+        createProfileInput("i3", "submitterInfoInputImpl", inputParams2);
 
         // create outputs
         NameValuePairs outputParams1 = new NameValuePairs();
-        IProfileOutput output1 =
-                createProfileOutput("o1", "certOutputImpl", outputParams1);
+        createProfileOutput("o1", "certOutputImpl", outputParams1);
 
         // create policies
-        IProfilePolicy policy1 =
-                createProfilePolicy("set1", "p1",
+        createProfilePolicy("set1", "p1",
                         "userSubjectNameDefaultImpl", "noConstraintImpl");
-        IPolicyDefault def1 = policy1.getDefault();
-        IConfigStore defConfig1 = def1.getConfigStore();
-        IPolicyConstraint con1 = policy1.getConstraint();
-        IConfigStore conConfig1 = con1.getConfigStore();
 
         IProfilePolicy policy2 =
                 createProfilePolicy("set1", "p2",
@@ -73,8 +60,6 @@ public class UserCertCAEnrollProfile extends CAEnrollProfile
         IConfigStore defConfig2 = def2.getConfigStore();
         defConfig2.putString("params.range", "180");
         defConfig2.putString("params.startTime", "0");
-        IPolicyConstraint con2 = policy2.getConstraint();
-        IConfigStore conConfig2 = con2.getConfigStore();
 
         IProfilePolicy policy3 =
                 createProfilePolicy("set1", "p3",
@@ -84,8 +69,6 @@ public class UserCertCAEnrollProfile extends CAEnrollProfile
         defConfig3.putString("params.keyType", "RSA");
         defConfig3.putString("params.keyMinLength", "512");
         defConfig3.putString("params.keyMaxLength", "4096");
-        IPolicyConstraint con3 = policy3.getConstraint();
-        IConfigStore conConfig3 = con3.getConfigStore();
 
         IProfilePolicy policy4 =
                 createProfilePolicy("set1", "p4",
@@ -97,8 +80,6 @@ public class UserCertCAEnrollProfile extends CAEnrollProfile
                 .putString(
                         "params.signingAlgsAllowed",
                         "SHA1withRSA,SHA256withRSA,SHA512withRSA,MD5withRSA,MD2withRSA,SHA1withEC,SHA256withEC,SHA384withEC,SHA512withEC");
-        IPolicyConstraint con4 = policy4.getConstraint();
-        IConfigStore conConfig4 = con4.getConfigStore();
 
         IProfilePolicy policy5 =
                 createProfilePolicy("set1", "p5",
@@ -115,7 +96,5 @@ public class UserCertCAEnrollProfile extends CAEnrollProfile
         defConfig5.putString("params.keyUsageKeyCertSign", "false");
         defConfig5.putString("params.keyUsageKeyEncipherment", "true");
         defConfig5.putString("params.keyUsageNonRepudiation", "true");
-        IPolicyConstraint con5 = policy5.getConstraint();
-        IConfigStore conConfig5 = con5.getConfigStore();
     }
 }
diff --git a/pki/base/common/src/com/netscape/cms/profile/constraint/BasicConstraintsExtConstraint.java b/pki/base/common/src/com/netscape/cms/profile/constraint/BasicConstraintsExtConstraint.java
index 3035227817d8cbc84a462cc400cf097795a74340..f924c587f72686464dedcbcf7fe838d59cdc4b2a 100644
--- a/pki/base/common/src/com/netscape/cms/profile/constraint/BasicConstraintsExtConstraint.java
+++ b/pki/base/common/src/com/netscape/cms/profile/constraint/BasicConstraintsExtConstraint.java
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.util.Locale;
 
 import netscape.security.x509.BasicConstraintsExtension;
-import netscape.security.x509.CertificateExtensions;
 import netscape.security.x509.PKIXExtensions;
 import netscape.security.x509.X509CertInfo;
 
@@ -100,7 +99,6 @@ public class BasicConstraintsExtConstraint extends EnrollConstraint {
      */
     public void validate(IRequest request, X509CertInfo info)
             throws ERejectException {
-        CertificateExtensions exts = null;
 
         try {
             BasicConstraintsExtension ext = (BasicConstraintsExtension)
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 d5ac9247dc96e3384d67b677a79ffa36677eb7ee..a2de3f491f5bdffb5b4bd9ac1b64fb2038c7f5ac 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
@@ -28,7 +28,6 @@ import netscape.security.x509.GeneralName;
 import netscape.security.x509.GeneralNames;
 import netscape.security.x509.GeneralNamesException;
 import netscape.security.x509.PKIXExtensions;
-import netscape.security.x509.RDN;
 import netscape.security.x509.X509CertInfo;
 
 import com.netscape.certsrv.apps.CMS;
@@ -423,7 +422,6 @@ public class FreshestCRLExtDefault extends EnrollExtDefault {
 
         NameValuePairs pairs = new NameValuePairs();
 
-        RDN rdn = null;
         boolean hasFullName = false;
 
         pairs.add(ENABLE, "true");
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
index 29562123e7e0a7c04087950f81a7463ef2c5df7a..a706fb4add235a55b9bb9a876188a0d6c0637954 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectDirAttributesExtDefault.java
@@ -217,7 +217,6 @@ public class SubjectDirAttributesExtDefault extends EnrollExtDefault {
 
                 boolean critical = ext.isCritical();
 
-                X500NameAttrMap map = X500NameAttrMap.getDefault();
                 Vector<Attribute> attrV = new Vector<Attribute>();
                 for (int i = 0; i < size; i++) {
                     NameValuePairs nvps = v.elementAt(i);
@@ -511,9 +510,9 @@ class AttributeConfig {
     private static void checkValue(ObjectIdentifier oid, String val)
             throws IOException {
         AVAValueConverter c = X500NameAttrMap.getDefault().getValueConverter(oid);
-        DerValue derval;
 
-        derval = c.getValue(val); // errs encountered will get thrown.
+        @SuppressWarnings("unused")
+        DerValue derval = c.getValue(val); // check for errors
         return;
     }
 
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 89f1ab8eedf445a47195c6b98b51cc9831a00beb..abdc770baace9aff545ef16e75d37fe1f55f9b22 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
@@ -145,8 +145,6 @@ public class LdapCaSimpleMap implements ILdapMapper, IExtendedPluginInfo {
             mDnPattern = DEFAULT_DNPATTERN;
         try {
             mPattern = new MapDNPattern(mDnPattern);
-            String[] mReqAttrs = mPattern.getReqAttrs();
-            String[] mCertAttrs = mPattern.getCertAttrs();
         } catch (ELdapException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("PUBLISH_DN_PATTERN_INIT", dnPattern, e.toString()));
             throw new EBaseException("falied to init with pattern " +
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertExactMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertExactMap.java
index 33c186c14b568099778a93033dacd364e43d32fa..11b53a7970b1bc36a3f69ed01e86c07adb5c5587 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertExactMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertExactMap.java
@@ -137,8 +137,6 @@ public class LdapCertExactMap implements ILdapMapper, IExtendedPluginInfo {
             }
         }
         try {
-            boolean hasCert = false;
-            boolean hasSubjectName = false;
             String[] attrs = new String[] { LDAPv3.NO_ATTRS };
 
             log(ILogger.LL_INFO, "Searching for " + subjectDN.toString());
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertSubjMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertSubjMap.java
index 15f845cb698a1c7bb63591de8bdad1730f9ce52c..4d5ff38c89c2be56f009ce6aabfe40a70dccecc9 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertSubjMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapCertSubjMap.java
@@ -205,8 +205,6 @@ public class LdapCertSubjMap implements ILdapMapper, IExtendedPluginInfo {
             }
         }
         try {
-            boolean hasCert = false;
-            boolean hasSubjectName = false;
             String[] attrs = new String[] { LDAPv3.NO_ATTRS };
 
             log(ILogger.LL_INFO, "search " + mSearchBase +
@@ -280,8 +278,6 @@ public class LdapCertSubjMap implements ILdapMapper, IExtendedPluginInfo {
             return v;
         }
         try {
-            boolean hasCert = false;
-            boolean hasSubjectName = false;
             String[] attrs = new String[] { LDAPv3.NO_ATTRS };
 
             log(ILogger.LL_INFO, "search " + mSearchBase +
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
index 7fd2bb44e6a6334d083f25d39c2a0cb9bbca5b83..c9a7f867cdd9363155c1ebcceaec7f567ac7cf4d 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapEnhancedMap.java
@@ -192,8 +192,6 @@ public class LdapEnhancedMap
 
         try {
             mPattern = new MapDNPattern(mDnPattern);
-            String[] mReqAttrs = mPattern.getReqAttrs();
-            String[] mCertAttrs = mPattern.getCertAttrs();
         } catch (ELdapException e) {
             log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("PUBLISH_DN_PATTERN_INIT",
diff --git a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
index b3177787ffa00a4beeca79295f57ea789ebd7eda..642729673a305fe1baf4838e5b0d274f418e414c 100644
--- a/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
+++ b/pki/base/common/src/com/netscape/cms/publish/mappers/LdapSimpleMap.java
@@ -138,8 +138,6 @@ public class LdapSimpleMap implements ILdapMapper, IExtendedPluginInfo {
             mDnPattern = DEFAULT_DNPATTERN;
         try {
             mPattern = new MapDNPattern(mDnPattern);
-            String[] mReqAttrs = mPattern.getReqAttrs();
-            String[] mCertAttrs = mPattern.getCertAttrs();
         } catch (ELdapException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("PUBLISH_DN_PATTERN_INIT",
                     dnPattern, e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java b/pki/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java
index 551bb4d6f370f6cfd1eb4a31c4a9e6585a4daab6..80abd5f771ee56639188a744b4f332d2c0f1345d 100644
--- a/pki/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java
+++ b/pki/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java
@@ -95,8 +95,8 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo {
     /**
      * Returns the current instance parameters.
      */
-    public Vector getInstanceParams() {
-        Vector v = new Vector();
+    public Vector<String> getInstanceParams() {
+        Vector<String> v = new Vector<String>();
         String host = "";
         String port = "";
         String path = "";
@@ -134,8 +134,8 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo {
     /**
      * Returns the initial default parameters.
      */
-    public Vector getDefaultParams() {
-        Vector v = new Vector();
+    public Vector<String> getDefaultParams() {
+        Vector<String> v = new Vector<String>();
 
         IConfigStore config = CMS.getConfigStore();
         String nickname = "";
@@ -301,7 +301,6 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo {
                     ILogger.LL_INFO, "OCSPPublisher: start getting response");
             DataInputStream dis = new DataInputStream(socket.getInputStream());
             String nextline;
-            String line = "";
             String error = "";
             boolean status = false;
 
diff --git a/pki/base/common/src/com/netscape/cms/selftests/tks/TKSKnownSessionKey.java b/pki/base/common/src/com/netscape/cms/selftests/tks/TKSKnownSessionKey.java
index a1298727cab37c75f8a1ebb610aa1ba152e9edde..69edeb24fb48b388af2562d3b992d1114a685a79 100644
--- a/pki/base/common/src/com/netscape/cms/selftests/tks/TKSKnownSessionKey.java
+++ b/pki/base/common/src/com/netscape/cms/selftests/tks/TKSKnownSessionKey.java
@@ -88,7 +88,6 @@ public class TKSKnownSessionKey
             EMissingSelfTestException {
         ISubsystem tks = null;
         IConfigStore tksConfig = null;
-        String logMessage = null;
 
         super.initSelfTest(subsystem, instanceName, parameters);
 
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 e021891422602b20cb23d765ad2c2b4d015162a8..8f1024723c9c57d1c2fb910de363e629269fd3b6 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
@@ -290,7 +290,6 @@ public class AdminServlet extends HttpServlet {
             IOException {
 
         String auditMessage = null;
-        String auditSubjectID = ILogger.UNIDENTIFIED;
         String auditUID = ILogger.UNIDENTIFIED;
         String authType = "";
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/AuthAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/AuthAdminServlet.java
index d1924aa93fab5615da1b9b72b636bb4c00815e2a..6a7ad959915df4739d7335e55e42cbf1ec2708fc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/AuthAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/AuthAdminServlet.java
@@ -1204,9 +1204,7 @@ public class AuthAdminServlet extends AdminServlet {
             // only remove from memory
             // cannot shutdown because we don't keep track of whether it's
             // being used. 
-            IAuthManager mgrInst = (IAuthManager) mAuths.get(id);
-
-            mAuths.getInstances().remove((Object) id);
+            mAuths.getInstances().remove(id);
 
             // remove the configuration.
             IConfigStore destStore =
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
index 2c6ba3dbcdb6b2081e3561eeacd7dfdd5df7a081..5bcaa46d27714a29ae7b561db6148d7dd36a6e2a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CAAdminServlet.java
@@ -32,7 +32,6 @@ import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
-import com.netscape.certsrv.base.ISubsystem;
 import com.netscape.certsrv.ca.ICMSCRLExtensions;
 import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.ca.ICertificateAuthority;
@@ -348,9 +347,6 @@ public class CAAdminServlet extends AdminServlet {
 
                 if ((!template.exists()) || (!template.canRead())
                         || (template.isDirectory())) {
-                    String error =
-                            "Template: " + val + " does not exist or invalid";
-
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_INVALID_PATH"));
 
                     sendResponse(ERROR,
@@ -404,9 +400,6 @@ public class CAAdminServlet extends AdminServlet {
 
                 if ((!template.exists()) || (!template.canRead())
                         || (template.isDirectory())) {
-                    String error =
-                            "Template: " + val + " does not exist or invalid";
-
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_INVALID_PATH"));
 
                     sendResponse(ERROR,
@@ -1535,16 +1528,12 @@ public class CAAdminServlet extends AdminServlet {
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
 
-        ISubsystem eeGateway = null;
-
         /*
          ISubsystem eeGateway = 
          SubsystemRegistry.getInstance().get("eeGateway");
          */
-        IConfigStore eeConfig = null;
-
-        IConfigStore caConfig = mCA.getConfigStore();
 
+        @SuppressWarnings("unchecked")
         Enumeration<String> enum1 = req.getParameterNames();
         boolean restart = false;
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
index b77de59c68733f9279548dcd053b000caaec2000..6161a20d6644d46c338e758d75d3934d5d5b4de4 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
@@ -62,7 +62,6 @@ import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.common.NameValuePairs;
 import com.netscape.certsrv.common.OpDef;
 import com.netscape.certsrv.common.ScopeDef;
-import com.netscape.certsrv.dbs.IDBSubsystem;
 import com.netscape.certsrv.dbs.certdb.ICertRecord;
 import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
@@ -357,7 +356,6 @@ public final class CMSAdminServlet extends AdminServlet {
         Enumeration<ISubsystem> e = CMS.getSubsystems();
 
         while (e.hasMoreElements()) {
-            String type = "";
             ISubsystem sys = (ISubsystem) e.nextElement();
 
             //get subsystem type
@@ -386,11 +384,8 @@ public final class CMSAdminServlet extends AdminServlet {
         boolean isCAInstalled = false;
         boolean isRAInstalled = false;
         boolean isKRAInstalled = false;
-        boolean isOCSPInstalled = false;
-        boolean isTKSInstalled = false;
 
         while (e.hasMoreElements()) {
-            String type = "";
             ISubsystem sys = (ISubsystem) e.nextElement();
 
             //get subsystem type
@@ -400,10 +395,6 @@ public final class CMSAdminServlet extends AdminServlet {
                 isRAInstalled = true;
             else if (sys instanceof ICertificateAuthority)
                 isCAInstalled = true;
-            else if (sys instanceof IOCSPAuthority)
-                isOCSPInstalled = true;
-            else if (sys instanceof ITKSAuthority)
-                isTKSInstalled = true;
 
         }
 
@@ -469,10 +460,7 @@ public final class CMSAdminServlet extends AdminServlet {
 
             params.add(Constants.PR_CERT_TRANS, getCertNickname(kraNickname));
         }
-        if (isTKSInstalled) {
-            ITKSAuthority tks = (ITKSAuthority)
-                    CMS.getSubsystem(CMS.SUBSYSTEM_TKS);
-        }
+
         String nickName = CMS.getServerCertNickname();
 
         params.add(Constants.PR_CERT_SERVER, getCertNickname(nickName));
@@ -547,11 +535,8 @@ public final class CMSAdminServlet extends AdminServlet {
             boolean isCAInstalled = false;
             boolean isRAInstalled = false;
             boolean isKRAInstalled = false;
-            boolean isOCSPInstalled = false;
-            boolean isTKSInstalled = false;
 
             while (e.hasMoreElements()) {
-                String type = "";
                 ISubsystem sys = (ISubsystem) e.nextElement();
 
                 //get subsystem type
@@ -561,16 +546,11 @@ public final class CMSAdminServlet extends AdminServlet {
                     isRAInstalled = true;
                 else if (sys instanceof ICertificateAuthority)
                     isCAInstalled = true;
-                else if (sys instanceof IOCSPAuthority)
-                    isOCSPInstalled = true;
-                else if (sys instanceof ITKSAuthority)
-                    isTKSInstalled = true;
             }
 
             ICertificateAuthority ca = null;
             IRegistrationAuthority ra = null;
             IKeyRecoveryAuthority kra = null;
-            ITKSAuthority tks = null;
 
             if (isCAInstalled)
                 ca = (ICertificateAuthority) CMS.getSubsystem(CMS.SUBSYSTEM_CA);
@@ -578,8 +558,6 @@ public final class CMSAdminServlet extends AdminServlet {
                 ra = (IRegistrationAuthority) CMS.getSubsystem(CMS.SUBSYSTEM_RA);
             if (isKRAInstalled)
                 kra = (IKeyRecoveryAuthority) CMS.getSubsystem(CMS.SUBSYSTEM_KRA);
-            if (isTKSInstalled)
-                tks = (ITKSAuthority) CMS.getSubsystem(CMS.SUBSYSTEM_TKS);
 
             boolean isCACert = true;
 
@@ -906,7 +884,7 @@ public final class CMSAdminServlet extends AdminServlet {
 
         }
         if (selectedToken != null && newKeyName != null) {
-            String symKeys = SessionKey.GenMasterKey(selectedToken, newKeyName);
+            SessionKey.GenMasterKey(selectedToken, newKeyName); // check for errors
             CMS.getConfigStore().putString("tks.defaultSlot", selectedToken);
             String masterKeyPrefix = CMS.getConfigStore().getString("tks.master_key_prefix", null);
 
@@ -934,9 +912,6 @@ public final class CMSAdminServlet extends AdminServlet {
             if (name.equals(Constants.PR_TOKEN_LIST)) {
                 String selectedToken = req.getParameter(name);
 
-                int count = 0;
-                int keys_found = 0;
-
                 ICryptoSubsystem jssSubSystem = (ICryptoSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
 
                 CryptoToken token = null;
@@ -1125,9 +1100,7 @@ public final class CMSAdminServlet extends AdminServlet {
             String certType = Constants.PR_CA_SIGNING_CERT;
             String dir = "";
             String pathname = "";
-            String serverID = "";
             String otherNickname = "";
-            String certSubType = "";
             String keyCurveName = "";
 
             while (enum1.hasMoreElements()) {
@@ -1145,12 +1118,8 @@ public final class CMSAdminServlet extends AdminServlet {
                     certType = value;
                 } else if (key.equals(Constants.PR_SUBJECT_NAME)) {
                     subjectName = value;
-                } else if (key.equals(Constants.PR_SERVER_ID)) {
-                    serverID = value;
                 } else if (key.equals(Constants.PR_NICKNAME)) {
                     otherNickname = value;
-                } else if (key.equals(Constants.PR_CERTIFICATE_SUBTYPE)) {
-                    certSubType = value;
                 } else if (key.equals(Constants.PR_KEY_CURVENAME)) {
                     keyCurveName = value;
                 }
@@ -1495,27 +1464,17 @@ public final class CMSAdminServlet extends AdminServlet {
         try {
             @SuppressWarnings("unchecked")
             Enumeration<String> enum1 = req.getParameterNames();
-            String pkcs = "";
-            String type = "";
             String tokenName = Constants.PR_INTERNAL_TOKEN_NAME;
             String keyType = "RSA";
-            int keyLength = 512;
-            String subjectName = "";
             KeyCertData properties = new KeyCertData();
-            String pathname = "";
 
-            String configPath = "";
             String newtokenname = null;
 
             while (enum1.hasMoreElements()) {
                 String key = (String) enum1.nextElement();
                 String value = req.getParameter(key);
 
-                if (key.equals("pathname")) {
-                    configPath = mConfig.getString("instanceRoot", "")
-                               + File.separator + "conf" + File.separator;
-                    pathname = configPath + value;
-                } else {
+                if (!key.equals("pathname")) {
                     if (key.equals(Constants.PR_TOKEN_NAME))
                         newtokenname = value;
                     properties.put(key, value);
@@ -1526,8 +1485,6 @@ public final class CMSAdminServlet extends AdminServlet {
 
             ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
                     CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
-            IDBSubsystem dbs = (IDBSubsystem)
-                    CMS.getSubsystem(CMS.SUBSYSTEM_DBS);
             ICertificateAuthority ca = (ICertificateAuthority)
                     CMS.getSubsystem(CMS.SUBSYSTEM_CA);
             ICertificateRepository repository =
@@ -1633,11 +1590,11 @@ public final class CMSAdminServlet extends AdminServlet {
             } else if (properties.getKeyLength() != null) { //new RSA or DSA
                 keyType = properties.getKeyType();
                 String keyLen = properties.getKeyLength();
-                PQGParams pqgParams = null;
 
                 if (keyType.equals("DSA")) {
-                    pqgParams = jssSubSystem.getCAPQG(Integer.parseInt(keyLen),
-                                                      mConfig);
+                    @SuppressWarnings("unused")
+                    PQGParams pqgParams =
+                            jssSubSystem.getCAPQG(Integer.parseInt(keyLen), mConfig); // check for errors
                     //properties.put(Constants.PR_PQGPARAMS, pqgParams);
                 }
                 pair = jssSubSystem.getKeyPair(properties);
@@ -2342,7 +2299,6 @@ public final class CMSAdminServlet extends AdminServlet {
         // to the signed audit log and stored as failures
         try {
             String b64Cert = "";
-            String certType = "";
             String pathname = "";
             String serverRoot = "";
             String serverID = "";
@@ -2358,8 +2314,6 @@ public final class CMSAdminServlet extends AdminServlet {
                 // really should be PR_CERT_CONTENT
                 if (key.equals(Constants.PR_PKCS10))
                     b64Cert = value;
-                else if (key.equals(Constants.RS_ID))
-                    certType = value;
                 else if (key.equals("pathname"))
                     pathname = value;
                 else if (key.equals(Constants.PR_SERVER_ROOT))
@@ -2724,7 +2678,6 @@ public final class CMSAdminServlet extends AdminServlet {
         String nickname = "";
         String serialno = "";
         String issuername = "";
-        Locale locale = super.getLocale(req);
         NameValuePairs pairs = new NameValuePairs();
 
         while (enum1.hasMoreElements()) {
@@ -2888,31 +2841,7 @@ public final class CMSAdminServlet extends AdminServlet {
     private void validateKeyLength(HttpServletRequest req,
             HttpServletResponse resp) throws ServletException,
             IOException, EBaseException {
-        @SuppressWarnings("unchecked")
-        Enumeration<String> enum1 = req.getParameterNames();
-        String keyType = "RSA";
-        String keyLen = "512";
-        String certType = "";
 
-        while (enum1.hasMoreElements()) {
-            String key = (String) enum1.nextElement();
-            String value = req.getParameter(key);
-
-            if (key.equals(Constants.PR_CERTIFICATE_TYPE)) {
-                certType = value;
-            } else if (key.equals(Constants.PR_KEY_TYPE)) {
-                keyType = value;
-            } else if (key.equals(Constants.PR_KEY_LENGTH)) {
-                keyLen = value;
-            }
-        }
-        int keyLength = Integer.parseInt(keyLen);
-        int minKey = mConfig.getInteger(
-                ConfigConstants.PR_RSA_MIN_KEYLENGTH, 512);
-        ICryptoSubsystem jssSubSystem = (ICryptoSubsystem)
-                CMS.getSubsystem(CMS.SUBSYSTEM_CRYPTO);
-
-        // jssSubSystem.checkKeyLength(keyType, keyLength, certType, minKey);
         sendResponse(SUCCESS, null, null, resp);
     }
 
@@ -2979,17 +2908,12 @@ public final class CMSAdminServlet extends AdminServlet {
         Enumeration<String> enum1 = req.getParameterNames();
 
         String nickname = "";
-        String keyType = "RSA";
-        String keyLen = "512";
-        String certType = "";
-        String configDir = "";
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
             String value = req.getParameter(key);
 
             if (key.equals(Constants.RS_ID)) {
-                certType = value;
                 nickname = getNickname(value);
                 break;
             }
@@ -3011,10 +2935,6 @@ public final class CMSAdminServlet extends AdminServlet {
         Enumeration<String> enum1 = req.getParameterNames();
 
         String nickname = "";
-        String keyType = "RSA";
-        String keyLen = "512";
-        String certType = "";
-        String configDir = "";
 
         while (enum1.hasMoreElements()) {
             String key = (String) enum1.nextElement();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
index bfd5004a2b52f72e05c3a9ee0a9e397f32612b1c..a9baa874c32bf931d6aa24bd77b8afce6edef0b9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/JobsAdminServlet.java
@@ -640,9 +640,7 @@ public class JobsAdminServlet extends AdminServlet {
         // only remove from memory
         // cannot shutdown because we don't keep track of whether it's
         // being used. 
-        IJob jobInst = (IJob) mJobsSched.getInstances().get(id);
-
-        mJobsSched.getInstances().remove((Object) id);
+        mJobsSched.getInstances().remove(id);
 
         // remove the configuration.
         IConfigStore destStore =
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 dadbf4088a7b3e77c30460b57598f656bedae5c3..ff70a5c53f24356928dcb4e865b5384ade869625 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
@@ -2352,7 +2352,7 @@ public class LogAdminServlet extends AdminServlet {
                 }
             } else if (key.equals(Constants.PR_DEBUG_LOG_LEVEL)) {
                 try {
-                    int number = Integer.parseInt(value);
+                    Integer.parseInt(value); // check for errors
                     mConfig.putString(Constants.PR_DEBUG_LOG_LEVEL, value);
                 } catch (NumberFormatException e) {
                     CMS.debug("setGeneralConfig: Invalid value for " + Constants.PR_DEBUG_LOG_LEVEL + ": " + value);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
index cbc406997eb6661b7663f3dfaf5fd571d70545e1..8e67c3402e44be4d64668fff2fce4ed46668345e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
@@ -210,7 +210,6 @@ public class ProfileAdminServlet extends AdminServlet {
             throws ServletException, IOException {
         // Get operation type
         String op = req.getParameter(Constants.OP_TYPE);
-        String scope = super.getParameter(req, Constants.OP_SCOPE);
 
         if (op.equals(OpDef.OP_READ)) {
             if (!readAuthorize(req, resp))
@@ -232,7 +231,6 @@ public class ProfileAdminServlet extends AdminServlet {
             throws ServletException, IOException {
         // Get operation type
         String op = req.getParameter(Constants.OP_TYPE);
-        String scope = super.getParameter(req, Constants.OP_SCOPE);
 
         if (op.equals(OpDef.OP_READ)) {
             if (!readAuthorize(req, resp))
@@ -460,8 +458,6 @@ public class ProfileAdminServlet extends AdminServlet {
             String setId = ss.nextToken();
             String pId = ss.nextToken();
 
-            IProfilePolicy policy = null;
-
             try {
                 if (!isValidId(setId)) {
                     sendResponse(ERROR,
@@ -479,7 +475,7 @@ public class ProfileAdminServlet extends AdminServlet {
                             null, resp);
                     return;
                 }
-                policy = profile.createProfilePolicy(setId, pId,
+                profile.createProfilePolicy(setId, pId,
                             defImpl, conImpl);
             } catch (EBaseException e1) {
                 // error
@@ -590,7 +586,6 @@ public class ProfileAdminServlet extends AdminServlet {
                 return;
             }
 
-            IProfileInput input = null;
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
             NameValuePairs nvps = new NameValuePairs();
@@ -608,7 +603,7 @@ public class ProfileAdminServlet extends AdminServlet {
             }
 
             try {
-                input = profile.createProfileInput(inputId, inputImpl, nvps);
+                profile.createProfileInput(inputId, inputImpl, nvps);
             } catch (EBaseException e1) {
                 // error
 
@@ -717,7 +712,6 @@ public class ProfileAdminServlet extends AdminServlet {
                 return;
             }
 
-            IProfileOutput output = null;
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
             NameValuePairs nvps = new NameValuePairs();
@@ -735,7 +729,7 @@ public class ProfileAdminServlet extends AdminServlet {
             }
 
             try {
-                output = profile.createProfileOutput(outputId, outputImpl,
+                profile.createProfileOutput(outputId, outputImpl,
                             nvps);
             } catch (EBaseException e1) {
                 // error
@@ -1207,7 +1201,6 @@ public class ProfileAdminServlet extends AdminServlet {
 
             IProfilePolicy policy = profile.getProfilePolicy(setId, pId);
             IPolicyDefault def = policy.getDefault();
-            IConfigStore defConfig = def.getConfigStore();
 
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
@@ -1345,7 +1338,6 @@ public class ProfileAdminServlet extends AdminServlet {
 
             IProfilePolicy policy = profile.getProfilePolicy(setId, pId);
             IPolicyConstraint con = policy.getConstraint();
-            IConfigStore conConfig = con.getConfigStore();
 
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
@@ -1484,7 +1476,6 @@ public class ProfileAdminServlet extends AdminServlet {
             String pId = ss.nextToken();
             IProfilePolicy policy = profile.getProfilePolicy(setId, pId);
             IPolicyDefault def = policy.getDefault();
-            IConfigStore defConfig = def.getConfigStore();
 
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
@@ -1858,7 +1849,6 @@ public class ProfileAdminServlet extends AdminServlet {
             String pId = ss.nextToken();
             IProfilePolicy policy = profile.getProfilePolicy(setId, pId);
             IPolicyConstraint con = policy.getConstraint();
-            IConfigStore conConfig = con.getConfigStore();
 
             @SuppressWarnings("unchecked")
             Enumeration<String> names = req.getParameterNames();
@@ -2072,9 +2062,7 @@ public class ProfileAdminServlet extends AdminServlet {
             while (policies.hasMoreElements()) {
                 IProfilePolicy policy = (IProfilePolicy) policies.nextElement();
                 IPolicyDefault def = policy.getDefault();
-                IConfigStore defConfig = def.getConfigStore();
                 IPolicyConstraint con = policy.getConstraint();
-                IConfigStore conConfig = con.getConfigStore();
 
                 nvp.add(setId + ":" + policy.getId(),
                         def.getName(getLocale(req)) + ";" +
@@ -2230,13 +2218,6 @@ public class ProfileAdminServlet extends AdminServlet {
 
         while (e.hasMoreElements()) {
             String profileId = e.nextElement();
-            IProfile profile = null;
-
-            try {
-                profile = mProfileSub.getProfile(profileId);
-            } catch (EBaseException e1) {
-                // error
-            }
 
             String status = null;
 
@@ -2480,7 +2461,6 @@ public class ProfileAdminServlet extends AdminServlet {
 
             String impl = req.getParameter("impl");
             String name = req.getParameter("name");
-            String desc = req.getParameter("desc");
             String visible = req.getParameter("visible");
             String auth = req.getParameter("auth");
             String config = null;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
index a48b8146c70eb1cebbc4ecd9975853c18c75f40c..041818d0ae1d9ba8a572655b7243e61fcb477653 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java
@@ -1014,7 +1014,7 @@ public abstract class CMSServlet extends HttpServlet {
         Enumeration<String> names = httpParams.elements();
 
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement();
+            String name = names.nextElement();
             Enumeration<String> params = mDontSaveHttpParams.elements();
             boolean dosave = true;
 
@@ -1049,7 +1049,7 @@ public abstract class CMSServlet extends HttpServlet {
             return null;
         }
         ICertificateRepository certdb =
-                (ICertificateRepository) ((ICertificateAuthority) mAuthority).getCertificateRepository();
+                ((ICertificateAuthority) mAuthority).getCertificateRepository();
 
         if (certdb == null) {
             log(ILogger.LL_WARN, CMS.getLogMessage("CMSGW_CERT_DB_NULL", mAuthority.toString()));
@@ -1104,7 +1104,7 @@ public abstract class CMSServlet extends HttpServlet {
             return null;
         }
         ICertificateRepository certdb =
-                (ICertificateRepository) ((ICertificateAuthority) mAuthority).getCertificateRepository();
+                ((ICertificateAuthority) mAuthority).getCertificateRepository();
 
         if (certdb == null) {
             log(ILogger.LL_WARN, CMS.getLogMessage("CMSGW_CERT_DB_NULL", mAuthority.toString()));
@@ -1443,7 +1443,7 @@ public abstract class CMSServlet extends HttpServlet {
         if (token != null && req != null) {
             Enumeration<String> e = token.getElements();
             while (e.hasMoreElements()) {
-                String n = (String) e.nextElement();
+                String n = e.nextElement();
                 String[] x1 = token.getInStringArray(n);
                 if (x1 != null) {
                     for (int i = 0; i < x1.length; i++) {
@@ -2141,7 +2141,7 @@ public abstract class CMSServlet extends HttpServlet {
      * with the "auditSubjectID()".
      * <P>
      * 
-     * @param id string containing the signed audit log message SubjectID
+     * @param SubjectID string containing the signed audit log message SubjectID
      * @return a delimited string of groups associated
      *         with the "auditSubjectID()"
      */
@@ -2167,7 +2167,7 @@ public abstract class CMSServlet extends HttpServlet {
         StringBuffer membersString = new StringBuffer();
 
         while (groups.hasMoreElements()) {
-            IGroup group = (IGroup) groups.nextElement();
+            IGroup group = groups.nextElement();
 
             if (group.isMember(SubjectID) == true) {
                 if (membersString.length() != 0) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java b/pki/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java
index 58ad4eabc617c726fa2d876aab4b23cd024119d6..f883fd373767921109cdae5e52e2e04ba04c6034 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java
@@ -68,7 +68,6 @@ public class SystemInfoServlet extends HttpServlet {
     public void service(HttpServletRequest request,
             HttpServletResponse response)
             throws ServletException, IOException {
-        boolean collect = false;
         String op = request.getParameter("op");
 
         response.setContentType("text/html");
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 5fd3cd90292435e419f7e95ac4dbf01cc45d29b1..95f5ae7b886d86635cf88bc1be90a385d55db170 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
@@ -159,7 +159,6 @@ public class CMCRevReqServlet extends CMSServlet {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ERROR_DISPLAY_TEMPLATE"));
             throw new ECMSGWException(CMS.getLogMessage("CMSGW_ERROR_DISPLAY_TEMPLATE"));
         }
-        EBaseException error = null;
 
         IArgBlock header = CMS.createArgBlock();
         IArgBlock ctx = CMS.createArgBlock();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
index a2b501f143048a5021e177dee6ab64be261797e3..e0978dd218ed981c7257a0839392b6bd902067de 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ChallengeRevocationServlet1.java
@@ -148,8 +148,6 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
             throw new ECMSGWException(CMS.getLogMessage("CMSGW_ERROR_DISPLAY_TEMPLATE"));
         }
 
-        EBaseException error = null;
-
         IArgBlock header = CMS.createArgBlock();
         IArgBlock ctx = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, ctx);
@@ -167,7 +165,6 @@ public class ChallengeRevocationServlet1 extends CMSServlet {
         int reasonCode =
                 httpParams.getValueAsInt(REASON_CODE, 0);
         //        header.addIntegerValue("reason", reasonCode);
-        RevocationReason reason = RevocationReason.fromInt(reasonCode);
 
         String comments = req.getParameter(IRequest.REQUESTOR_COMMENTS);
         Date invalidityDate = null;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java b/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
index 9feddbec88872edba5a94abe738fda588034a811..d17fd959bada98bfd8cb220af8ee55ba904e3dce 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
@@ -104,8 +104,6 @@ public class CloneRedirect extends CMSServlet {
         HttpServletRequest req = cmsReq.getHttpReq();
         HttpServletResponse resp = cmsReq.getHttpResp();
 
-        EBaseException error = null;
-
         IArgBlock header = CMS.createArgBlock();
         IArgBlock fixed = CMS.createArgBlock();
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DirAuthServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DirAuthServlet.java
index 03c909cc5c8f376c15051554617372bd5da16034..ced92ba85b5279555c2fbdd64a2a73b902956825 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DirAuthServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DirAuthServlet.java
@@ -198,7 +198,6 @@ public class DirAuthServlet extends CMSServlet {
 
     private void printError(CMSRequest cmsReq, String errorCode)
             throws EBaseException {
-        IArgBlock httpParams = cmsReq.getHttpParams();
         HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
         IArgBlock header = CMS.createArgBlock();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
index c34cd2227bd62e5e45297e17105e1f61bc4b09d2..f5422c2fc6694555eb80ce3b7c9b95d086ae02be 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
@@ -142,7 +142,6 @@ public class DisplayCRL extends CMSServlet {
         CMSTemplateParams argSet = new CMSTemplateParams(header, fixed);
 
         // Note error is covered in the same template as success.
-        EBaseException error = null;
 
         String crlIssuingPointId = req.getParameter("crlIssuingPoint");
 
@@ -175,8 +174,6 @@ public class DisplayCRL extends CMSServlet {
                          HttpServletResponse resp,
                          String crlIssuingPointId,
                          Locale locale) {
-        boolean updateStatus = true;
-        EBaseException error = null;
         ICRLIssuingPoint crlIP = null;
         X509CRLImpl crl = null;
         boolean clonedCA = false;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
index bf582a82e62f258933d4547df5b659ee48f7221c..99082d4c5522f8636aaf4d88c45aa3e9ef693778 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
@@ -184,7 +184,6 @@ public class DisplayHashUserEnroll extends CMSServlet {
 
     private void printError(CMSRequest cmsReq, String errorCode)
             throws EBaseException {
-        IArgBlock httpParams = cmsReq.getHttpParams();
         HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
         IArgBlock header = CMS.createArgBlock();
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 00cca204a98275a87f6c291923d2a5b22f1ae7f9..853fa1e45b95d0a7bc8d74f4bf93682cbaad049d 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
@@ -165,12 +165,12 @@ public class DoRevokeTPS extends CMSServlet {
         int reason = -1;
         boolean authorized = true;
         Date invalidityDate = null;
-        CMSTemplate form = null;
         Locale[] locale = new Locale[1];
 
         CMS.debug("DoRevokeTPS before getTemplate");
         try {
-            form = getTemplate(mFormPath, req, locale);
+            @SuppressWarnings("unused")
+            CMSTemplate form = getTemplate(mFormPath, req, locale); // check for errors
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ERR_GET_TEMPLATE", mFormPath, e.toString()));
             throw new ECMSGWException(CMS.getLogMessage("CMSGW_ERROR_DISPLAY_TEMPLATE"));
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 c48cd86353b94fe904920fc917ab5e2d9cff77b0..b32ce5e1192e6f02cf56e5424572cbb4af227a57 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
@@ -932,7 +932,6 @@ public class EnrollServlet extends CMSServlet {
 
             X509CertInfo[] certInfoArray = new X509CertInfo[] { certInfo };
 
-            X509CertInfo authCertInfo = null;
             String authMgr = AuditFormat.NOAUTH;
 
             // if authentication
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 fca81ff4a39be4dae983c3259e422e9708bdcf01..b9a2221f219da412187ecc6d3aee4353414aac22 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
@@ -215,7 +215,6 @@ public class GetBySerial extends CMSServlet {
 
         X509CertImpl cert = certRecord.getCertificate();
 
-        String browser1 = req.getParameter("browser");
         if (cert != null) {
             // if there's a crmf request id, set that too.
             if (browser != null && browser.equals("ie")) {
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 1ff056ab781dc692cb320131ff07b549fe8518ca..4af8a6a6815884ee0024736c4be7100bf5df37e6 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
@@ -173,7 +173,6 @@ public class HashEnrollServlet extends CMSServlet {
             throws EBaseException {
         IArgBlock httpParams = cmsReq.getHttpParams();
         HttpServletRequest httpReq = cmsReq.getHttpReq();
-        HttpServletResponse httpResp = cmsReq.getHttpResp();
         String certType = null;
 
         String reqHost = httpReq.getRemoteHost();
@@ -231,7 +230,6 @@ public class HashEnrollServlet extends CMSServlet {
 
     private void printError(CMSRequest cmsReq, String errorCode)
             throws EBaseException {
-        IArgBlock httpParams = cmsReq.getHttpParams();
         HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
         IArgBlock header = CMS.createArgBlock();
@@ -294,7 +292,6 @@ public class HashEnrollServlet extends CMSServlet {
 
         String certAuthEnrollOn =
                 httpParams.getValueAsString("certauthEnroll", null);
-        X509CertInfo new_certInfo = null;
 
         if ((certAuthEnrollOn != null) && (certAuthEnrollOn.equals("on"))) {
             certAuthEnroll = true;
@@ -394,7 +391,6 @@ public class HashEnrollServlet extends CMSServlet {
 
         IAuthToken authToken = mgr.getAuthToken(pageID);
 
-        X509CertInfo authCertInfo = null;
         String authMgr = AuditFormat.NOAUTH;
 
         if (authToken == null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java b/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
index fd245421037626eee7960cfdd5ac8a49b3571312..2231215776a85ecf3a34edae35be890d4777cd19 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/RenewalServlet.java
@@ -418,9 +418,6 @@ public class RenewalServlet extends CMSServlet {
         // there's no other way to tell
 
         IArgBlock httpParams = cmsReq.getHttpParams();
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
-        String certType = httpParams.getValueAsString(CERT_TYPE, "client");
-        String agent = httpReq.getHeader("user-agent");
 
         if (checkImportCertToNav(cmsReq.getHttpResp(),
                 httpParams, renewed_cert)) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
index 0491ccef5eed37a8a8940437df225b215801f173..707e7ff5f7f29045c44134585e688b2a92562f74 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/UpdateDir.java
@@ -377,7 +377,6 @@ public class UpdateDir extends CMSServlet {
             } else {
                 ICRLIssuingPoint crlIssuingPoint =
                         mCA.getCRLIssuingPoint(crlIssuingPointId);
-                ICRLIssuingPointRecord crlRecord = null;
 
                 updateCRLIssuingPoint(header, crlIssuingPointId,
                         crlIssuingPoint, locale);
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 23793b3f92b2b1706df8fafc8bbe0b6f9cc3d8d6..99febb4cfeb0315a8ff17c34ce915285ddbbe318 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
@@ -41,7 +41,6 @@ import netscape.ldap.LDAPEntry;
 import netscape.security.pkcs.PKCS10;
 import netscape.security.pkcs.PKCS10Attribute;
 import netscape.security.pkcs.PKCS10Attributes;
-import netscape.security.util.DerOutputStream;
 import netscape.security.util.ObjectIdentifier;
 import netscape.security.x509.AVA;
 import netscape.security.x509.CertAttrSet;
@@ -674,9 +673,6 @@ public class CRSEnrollment extends HttpServlet {
             responseData = responseData +
                     "<RemoteHost>" + httpReq.getRemoteHost() + "</RemoteHost>";
 
-            // Deal with Nonces
-            byte[] sn = req.getSenderNonce();
-
             // Deal with message type
             String mt = req.getMessageType();
             responseData = responseData +
@@ -715,7 +711,6 @@ public class CRSEnrollment extends HttpServlet {
 
                         if (ext.getExtensionId().equals(
                                 OIDMap.getOID(SubjectAlternativeNameExtension.IDENT))) {
-                            DerOutputStream dos = new DerOutputStream();
                             SubjectAlternativeNameExtension sane = new SubjectAlternativeNameExtension(
                                     Boolean.valueOf(false), // noncritical
                                     ext.getExtensionValue());
@@ -985,7 +980,6 @@ public class CRSEnrollment extends HttpServlet {
             return null;
         }
 
-        int count = 0;
         while (rids.hasMoreElements()) {
             RequestId rid = rids.nextElement();
             if (rid == null) {
@@ -1048,8 +1042,11 @@ public class CRSEnrollment extends HttpServlet {
 
         // Get Signed Data
 
-        byte[] reqAAbytes = req.getAA();
-        byte[] reqAAsig = req.getAADigest();
+        @SuppressWarnings("unused")
+        byte[] reqAAbytes = req.getAA(); // check for errors
+
+        @SuppressWarnings("unused")
+        byte[] reqAAsig = req.getAADigest(); // check for errors
 
     }
 
@@ -1155,10 +1152,7 @@ public class CRSEnrollment extends HttpServlet {
     private void getDetailFromRequest(CRSPKIMessage req, CRSPKIMessage crsResp)
             throws CRSFailureException {
 
-        IRequest issueReq = null;
-        X509CertImpl issuedCert = null;
         SubjectAlternativeNameExtension sane = null;
-        CertAttrSet requested_ext = null;
 
         try {
             PKCS10 p10 = req.getP10();
@@ -1171,7 +1165,6 @@ public class CRSEnrollment extends HttpServlet {
 
             AuthCredentials authCreds = new AuthCredentials();
 
-            String challengePassword = null;
             // Here, we make a new CertInfo - it's a new start for a certificate
 
             X509CertInfo certInfo = CMS.getDefaultX509CertInfo();
@@ -1265,7 +1258,6 @@ public class CRSEnrollment extends HttpServlet {
 
                         if (ext.getExtensionId().equals(
                                 OIDMap.getOID(SubjectAlternativeNameExtension.IDENT))) {
-                            DerOutputStream dos = new DerOutputStream();
                             sane = new SubjectAlternativeNameExtension(
                                     new Boolean(false), // noncritical
                                     ext.getExtensionValue());
@@ -1309,7 +1301,8 @@ public class CRSEnrollment extends HttpServlet {
             try {
                 if (mAppendDN != null && !mAppendDN.equals("")) {
 
-                    X500Name newSubject = new X500Name(subject.toString());
+                    new X500Name(subject.toString()); // check for errors
+
                     subject = new X500Name(subject.toString().concat("," + mAppendDN));
                 }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
index b3a0f56516c14ffbd97cf84a95aa8913643945d8..85f3938b8b7fb59398e17862ed8a4d0c39a85ecf 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/scep/ExtensionsRequested.java
@@ -127,16 +127,15 @@ public class ExtensionsRequested implements CertAttrSet {
     private void construct(DerValue dv) throws IOException {
 
         DerInputStream stream = null;
-        DerValue[] dvs;
 
         try { // try decoding as sequence first
 
             stream = dv.toDerInputStream();
 
-            DerValue stream_dv = stream.getDerValue();
+            stream.getDerValue(); // consume stream
             stream.reset();
 
-            dvs = stream.getSequence(2);
+            stream.getSequence(2); // consume stream
         } catch (IOException ioe) {
             // if it failed, the outer sequence may be
             // encapsulated in an octet string, as in the first
@@ -150,7 +149,7 @@ public class ExtensionsRequested implements CertAttrSet {
             dv = new DerValue(octet_string);
 
             stream = dv.toDerInputStream();
-            dvs = stream.getSequence(2);
+            stream.getSequence(2); // consume stream
         }
 
         // now, the stream will be in the correct format
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 aa95b622d9114bb42fa6b17648c55132d6f3ec9e..2edfc4f089cd0eaa416d157aec38d36447d572f8 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
@@ -548,7 +548,6 @@ public class CMCOutputTemplate {
                         CMS.debug("CMCOutputTemplate: Issuer names are equal");
                         ICertificateRepository repository =
                                 (ICertificateRepository) ca.getCertificateRepository();
-                        X509CertImpl impl = null;
                         try {
                             repository.getX509Certificate(serialno);
                         } catch (EBaseException ee) {
@@ -839,7 +838,6 @@ public class CMCOutputTemplate {
                         return bpid;
                     }
 
-                    byte[] bv = null;
                     String sharedSecret = null;
                     if (tokenClass != null) {
                         sharedSecret = tokenClass.getSharedToken(revokeSerial);
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 171aeb64c843b94a01027d6f4ff1f3fa74153d69..0a4ea589e3164008e6bc83430d3e36faf2329db3 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
@@ -33,7 +33,6 @@ 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.common.Constants;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.request.IRequest;
 import com.netscape.certsrv.request.IRequestQueue;
@@ -290,9 +289,6 @@ public class GenerateKeyPairServlet extends CMSServlet {
      */
     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 8c84f4a218c4e543cd9ba5a144975f8965da11dd..7912486f5afd29e3e821523325c0d52dafb3d309 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
@@ -87,7 +87,8 @@ public class AdminAuthenticatePanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         /* clean up if necessary */
         try {
-            boolean done = cs.getBoolean("preop.AdminAuthenticate.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.AdminAuthenticate.done"); // check for errors
             cs.putBoolean("preop.AdminAuthenticate.done", false);
             cs.commit(false);
         } catch (Exception e) {
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 223801d8f7a75095a037717ee2d6a7a1e46e409a..4e73b8369f0a94fc7e3a39bac8288cfca4836af5 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
@@ -353,12 +353,9 @@ public class AdminPanel extends WizardPanelBase {
     private void createAdmin(HttpServletRequest request) throws IOException {
         IUGSubsystem system = (IUGSubsystem) (CMS.getSubsystem(IUGSubsystem.ID));
         IConfigStore config = CMS.getConfigStore();
-        String adminName = null;
         String groupName = null;
 
         try {
-            adminName = config.getString(PRE_CONF_ADMIN_NAME,
-                    "Certificate System Administrator");
             groupName = config.getString(PRE_CONF_AGENT_GROUP,
                     "Certificate Manager Agents");
         } catch (Exception e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AgentAuthenticatePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AgentAuthenticatePanel.java
index 6bda874911f17d5c0bb293cadeb001e048b513e9..c1e6bffd15da53bc47b215a906b38d1f4ebf3064 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/AgentAuthenticatePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/AgentAuthenticatePanel.java
@@ -177,8 +177,11 @@ public class AgentAuthenticatePanel extends WizardPanelBase {
             String pwd = HttpInput.getPassword(request, "__password");
             config.putString("preop.ca.agent.uid", uid);
             config.putString("preop.ca.agent.pwd", pwd);
+
+            /*
             String host = "";
             int httpsport = -1;
+
             try {
                 host = config.getString("preop.ca.hostname");
             } catch (Exception e) {
@@ -195,7 +198,6 @@ public class AgentAuthenticatePanel extends WizardPanelBase {
                 throw new IOException("Missing port");
             }
 
-            /*
                          // Bugzilla Bug #583825 - CC: Obsolete servlets to be removed from
                          //                        web.xml as part of CC interface review
                          boolean authenticated = authenticate(host, httpsport, true,
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BackupKeyCertPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BackupKeyCertPanel.java
index c1529f25627daed3477b0dc4409d3aef3a4ef6e9..d216a9212d0ef7ce4de739135570d6a917243bfe 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/BackupKeyCertPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/BackupKeyCertPanel.java
@@ -93,7 +93,8 @@ public class BackupKeyCertPanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         /* clean up if necessary */
         try {
-            boolean done = cs.getBoolean("preop.backupkeycert.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.backupkeycert.done"); // check for errors
             cs.putBoolean("preop.backupkeycert.done", false);
             cs.commit(false);
         } catch (Exception e) {
@@ -307,7 +308,7 @@ public class BackupKeyCertPanel extends WizardPanelBase {
             //String nickname = cacerts[i].getSubjectDN().toString();
             String nickname = null;
             try {
-                byte[] localKeyId = addCertBag(cacerts[i], nickname, safeContents);
+                addCertBag(cacerts[i], nickname, safeContents);
             } catch (IOException e) {
                 throw e;
             } catch (Exception e) {
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 ccaa78e0bbf60ed63704a23f290d257f64f51786..5da169915d071741bfb83de54218c0e8b2efbac7 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
@@ -190,7 +190,6 @@ public class CAInfoPanel extends WizardPanelBase {
     public void validate(HttpServletRequest request,
             HttpServletResponse response,
             Context context) throws IOException {
-        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 43c707fbea76c6407f6727d542efc519b63fe952..04ab4dac813b832ab0fa8293ed19b776a2e8e1ef 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
@@ -122,7 +122,8 @@ public class CertRequestPanel extends WizardPanelBase {
             if (cert == null)
                 return false;
             try {
-                boolean done = cs.getBoolean("preop.CertRequestPanel.done");
+                @SuppressWarnings("unused")
+                boolean done = cs.getBoolean("preop.CertRequestPanel.done"); // check for errors
                 return true;
             } catch (Exception ee) {
                 if (hardware) {
@@ -219,7 +220,8 @@ public class CertRequestPanel extends WizardPanelBase {
         }
 
         try {
-            boolean done = cs.getBoolean("preop.CertRequestPanel.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.CertRequestPanel.done"); // check for errors
             cs.putBoolean("preop.CertRequestPanel.done", false);
             cs.commit(false);
         } catch (Exception e) {
@@ -487,12 +489,6 @@ public class CertRequestPanel extends WizardPanelBase {
         boolean hasErr = false;
         IConfigStore config = CMS.getConfigStore();
 
-        String catype = "";
-        try {
-            catype = config.getString("preop.ca.type", "");
-        } catch (Exception e) {
-        }
-
         if (isPanelDone()) {
             context.put("updateStatus", "success");
             return;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
index 2934b3ebe3cf3d1961f81bc1f894e6d1b54325c9..e956edebeb2137abb09935dd4c325be44b58c8f9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java
@@ -256,7 +256,7 @@ public class CertUtil {
                     req.setExtData("cert_request_type", reqType);
                     if (subjectName != null) {
                         req.setExtData("subject", subjectName);
-                        X500Name x5Name = new X500Name(subjectName);
+                        new X500Name(subjectName); // check for errors
                     }
                 }
                 queue.updateRequest(req);
@@ -596,7 +596,6 @@ public class CertUtil {
 
         StringBuffer result = new StringBuffer();
         result.append("Fingerprints:\n");
-        int index = 0;
 
         while (content.length() >= LINE_COUNT) {
             result.append(content.substring(0, LINE_COUNT));
@@ -623,9 +622,7 @@ public class CertUtil {
 
         String fullnickname = nickname;
 
-        boolean hardware = false;
         if (!tokenname.equals("internal") && !tokenname.equals("Internal Key Storage Token")) {
-            hardware = true;
             fullnickname = tokenname + ":" + nickname;
         }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index 6cafe973691cbdf4fb08f507706f66b9168e3394..ec3c8657d02333b7fe8f6725616e7ea29fc15662 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -170,7 +170,8 @@ public class DatabasePanel extends WizardPanelBase {
         String secure = "false";
         String cloneStartTLS = "false";
         try {
-            String s = cs.getString("preop.database.removeData");
+            @SuppressWarnings("unused")
+            String s = cs.getString("preop.database.removeData"); // check whether it's first time
         } catch (Exception e) {
             context.put("firsttime", "true");
         }
@@ -276,7 +277,8 @@ public class DatabasePanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         context.put("firsttime", "false");
         try {
-            String s = cs.getString("preop.database.removeData");
+            @SuppressWarnings("unused")
+            String s = cs.getString("preop.database.removeData"); // check whether it's first time
         } catch (Exception e) {
             context.put("firsttime", "true");
         }
@@ -348,10 +350,8 @@ public class DatabasePanel extends WizardPanelBase {
         }
 
         if (portStr != null && portStr.length() > 0) {
-            int port = -1;
-
             try {
-                port = Integer.parseInt(portStr);
+                Integer.parseInt(portStr); // check for errors
             } catch (Exception e) {
                 cs.putString("preop.database.errorString", "Port is invalid");
                 context.put("updateStatus", "validate-failure");
@@ -872,25 +872,21 @@ public class DatabasePanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         boolean hasErr = false;
 
-        boolean firsttime = false;
         context.put("firsttime", "false");
         try {
-            String v = cs.getString("preop.database.removeData");
+            String s = cs.getString("preop.database.removeData"); // check whether it's first time
         } catch (Exception e) {
             context.put("firsttime", "true");
-            firsttime = true;
         }
 
         String hostname1 = "";
         String portStr1 = "";
         String database1 = "";
-        String basedn1 = "";
 
         try {
             hostname1 = cs.getString("internaldb.ldapconn.host", "");
             portStr1 = cs.getString("internaldb.ldapconn.port", "");
             database1 = cs.getString("internaldb.database", "");
-            basedn1 = cs.getString("internaldb.basedn", "");
         } catch (Exception e) {
         }
 
@@ -1258,7 +1254,7 @@ public class DatabasePanel extends WizardPanelBase {
             attrs.add(new LDAPAttribute("objectclass", "extensibleObject"));
             attrs.add(new LDAPAttribute("cn", "changelog5"));
             attrs.add(new LDAPAttribute("nsslapd-changelogdir", dir));
-            entry = new LDAPEntry("cn=changelog5,cn=config", attrs);
+            entry = new LDAPEntry(dn, attrs);
             conn.add(entry);
         } catch (LDAPException e) {
             if (e.getLDAPResultCode() == LDAPException.ENTRY_ALREADY_EXISTS) {
@@ -1452,7 +1448,6 @@ public class DatabasePanel extends WizardPanelBase {
         String dn = "cn=" + name + "," + replicadn;
         String filter = "(objectclass=*)";
         String[] attrs = { "nsds5replicalastinitstatus" };
-        String status = null;
 
         CMS.debug("DatabasePanel replicationStatus: dn: " + dn);
         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 ffadf58842bb97b3f7d25d4e3582a7d421d945a0..174af72c9cd64c64111704cef75e0f29d586f9a0 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
@@ -368,6 +368,7 @@ public class DonePanel extends WizardPanelBase {
             try {
                 // Fetch the "new" security domain and display it
                 CMS.debug("Dump contents of new Security Domain . . .");
+                @SuppressWarnings("unused")
                 String c = getDomainXML(sd_host, sd_admin_port_int, true);
             } catch (Exception e) {
             }
@@ -422,6 +423,7 @@ public class DonePanel extends WizardPanelBase {
 
                 // Fetch the "updated" security domain and display it
                 CMS.debug("Dump contents of updated Security Domain . . .");
+                @SuppressWarnings("unused")
                 String c = getDomainXML(sd_host, sd_admin_port_int, true);
             } catch (Exception e) {
                 context.put("errorString", "Failed to update the security domain on the domain master.");
@@ -471,12 +473,8 @@ public class DonePanel extends WizardPanelBase {
 
         if (!select.equals("clone")) {
             if (type.equals("CA") || type.equals("KRA")) {
-                String beginRequestNumStr = "";
                 String endRequestNumStr = "";
-                String beginSerialNumStr = "";
                 String endSerialNumStr = "";
-                String requestIncStr = "";
-                String serialIncStr = "";
 
                 try {
                     endRequestNumStr = cs.getString("dbs.endRequestNumber", "");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCertChain.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCertChain.java
index 6c286e818ec129c35310aea9277e44b1533036b6..02fbd7643acb48f413b1f0718115d3ced50bdeee 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCertChain.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCertChain.java
@@ -71,11 +71,8 @@ public class GetCertChain extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
-        String outputString = null;
-
         CertificateChain certChain = ((ICertAuthority) mAuthority).getCACertChain();
 
         if (certChain == null) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
index c9a900a0bedb0099c4715b19713b4e6f2acd0fec..f1a35bac5fb95a3d17de2dd4fa71e1907da478dd 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
@@ -77,7 +77,6 @@ public class GetConfigEntries extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
         IAuthToken authToken = null;
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 2c9cc41f076072e7269fa4394a15d63db6f41579..8575658ea18bcc67d6059cbbd7694a0be02aced8 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
@@ -233,7 +233,6 @@ public class GetCookie extends CMSServlet {
                 }
 
                 try {
-                    String sd_url = "https://" + CMS.getEESSLHost() + ":" + CMS.getEESSLPort();
                     if (!url.startsWith("$")) {
                         try {
                             form = getTemplate(mFormPath, httpReq, locale);
@@ -250,7 +249,6 @@ public class GetCookie extends CMSServlet {
                         header.addStringValue("url", url);
                         header.addStringValue("session_id", cookie);
 
-                        EBaseException error = null;
                         try {
                             ServletOutputStream out = httpResp.getOutputStream();
 
@@ -278,7 +276,6 @@ public class GetCookie extends CMSServlet {
     }
 
     private String getGroupName(String uid, String subsystemname) {
-        String groupname = "";
         IUGSubsystem subsystem =
                 (IUGSubsystem) (CMS.getSubsystem(IUGSubsystem.ID));
         if (subsystem.isMemberOf(uid, "Enterprise CA Administrators") &&
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
index 45c5192aa5571626b8653b9d720d35174151e7b1..999f13815b2156f3da7e099398d0a793cff09025 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetDomainXML.java
@@ -23,7 +23,6 @@ import java.util.Enumeration;
 import java.util.Locale;
 
 import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -83,9 +82,7 @@ public class GetDomainXML extends CMSServlet {
     protected void process(CMSRequest cmsReq) throws EBaseException {
         CMS.debug("GetDomainXML: processing...");
 
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
-        ServletContext context = cmsReq.getServletContext();
 
         String status = SUCCESS;
         String basedn = null;
@@ -108,7 +105,6 @@ public class GetDomainXML extends CMSServlet {
                 LDAPConnection conn = null;
                 try {
                     // get data from ldap
-                    String[] entries = {};
                     String filter = "objectclass=pkiSecurityGroup";
                     LDAPSearchConstraints cons = null;
                     String[] attrs = null;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetStatus.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetStatus.java
index 28279f04a505e6f75aa2ef4ba49fe9cb68fd891e..4dc6f0ff66ecaee0164a2b0b0458fdb17e689a37 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetStatus.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetStatus.java
@@ -63,12 +63,9 @@ public class GetStatus extends CMSServlet {
      * @param cmsReq the object holding the request and response information
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
         IConfigStore config = CMS.getConfigStore();
 
-        String outputString = null;
-
         String state = config.getString("cs.state", "");
         String type = config.getString("cs.type", "");
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetSubsystemCert.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetSubsystemCert.java
index 7beda66209a6cd9a12935b6e19c488a070e5c29e..288cfad602417d41ff4032b9ae516aaf455d8bb9 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetSubsystemCert.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetSubsystemCert.java
@@ -64,11 +64,8 @@ public class GetSubsystemCert extends CMSServlet {
      * Process the HTTP request.
      */
     protected void process(CMSRequest cmsReq) throws EBaseException {
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
-        String outputString = null;
-
         IConfigStore cs = CMS.getConfigStore();
         String nickname = "";
         try {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTransportCert.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTransportCert.java
index ae55d2fb8be13b9a56a8b38a93b11f7683bc2a11..87a1788d65045b66fd417617dea4df851b20322b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTransportCert.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetTransportCert.java
@@ -33,7 +33,6 @@ import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.authorization.EAuthzAccessDenied;
 import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.kra.IKeyRecoveryAuthority;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.security.ITransportKeyUnit;
@@ -77,7 +76,6 @@ public class GetTransportCert extends CMSServlet {
     protected void process(CMSRequest cmsReq) throws EBaseException {
         CMS.debug("UpdateUpdater: processing...");
 
-        HttpServletRequest httpReq = cmsReq.getHttpReq();
         HttpServletResponse httpResp = cmsReq.getHttpResp();
 
         IAuthToken authToken = null;
@@ -122,8 +120,6 @@ public class GetTransportCert extends CMSServlet {
             return;
         }
 
-        IConfigStore cs = CMS.getConfigStore();
-
         IKeyRecoveryAuthority kra =
                 (IKeyRecoveryAuthority) mAuthority;
         ITransportKeyUnit tu = kra.getTransportKeyUnit();
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportCAChainPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportCAChainPanel.java
index a26b2dc2cf6fa9ecfd089ca28f36238cd87f7b0d..d0ccb58e9b0113d3a7b800dfdec410f0e61996f7 100755
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportCAChainPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ImportCAChainPanel.java
@@ -117,7 +117,6 @@ public class ImportCAChainPanel extends WizardPanelBase {
     public void update(HttpServletRequest request,
             HttpServletResponse response,
             Context context) throws IOException {
-        IConfigStore cs = CMS.getConfigStore();
 
         context.put("errorString", "");
         context.put("title", "Import CA's Certificate Chain");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
index 760faed4e51210839507e2998e375a3cd4a954fe..1d833ca9ba0eeeade0e23249810bf30f1243fe8b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
@@ -84,7 +84,6 @@ public class MainPageServlet extends CMSServlet {
 
         process(argSet, header, ctx, request, response);
 
-        EBaseException error = null;
         try {
             ServletOutputStream out = response.getOutputStream();
 
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 da721b29cc944a753146989104be49696c6b3a64..f0447170efbe6f4728c6640b40e6b5ef51f44a31 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
@@ -17,7 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cms.servlet.csadmin;
 
-import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -109,7 +108,8 @@ public class NamePanel extends WizardPanelBase {
     public void cleanUp() throws IOException {
         IConfigStore cs = CMS.getConfigStore();
         try {
-            boolean done = cs.getBoolean("preop.NamePanel.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.NamePanel.done"); // check for errors
             cs.putBoolean("preop.NamePanel.done", false);
             cs.commit(false);
         } catch (Exception e) {
@@ -253,7 +253,8 @@ public class NamePanel extends WizardPanelBase {
                 }
 
                 try {
-                    boolean done = config.getBoolean("preop.NamePanel.done");
+                    @SuppressWarnings("unused")
+                    boolean done = config.getBoolean("preop.NamePanel.done"); // check for errors
                     c.setDN(dn);
                 } catch (Exception e) {
                     String instanceId = config.getString("service.instanceID", "");
@@ -417,7 +418,6 @@ public class NamePanel extends WizardPanelBase {
             if (!token.equals("Internal Key Storage Token")) {
                 serverCertNickname = token + ":" + nickname;
             }
-            File file = new File(path + "/conf/serverCertNick.conf");
             PrintStream ps = new PrintStream(new FileOutputStream(path + "/conf/serverCertNick.conf"));
             ps.println(serverCertNickname);
             ps.close();
@@ -914,10 +914,8 @@ public class NamePanel extends WizardPanelBase {
                                                        httpsPortStr,
                                                        "CA");
 
-        int httpsport = -1;
-
         try {
-            httpsport = Integer.parseInt(httpsPortStr);
+            Integer.parseInt(httpsPortStr); // check for errors
         } catch (Exception e) {
             CMS.debug(
                     "NamePanel update: Https port is not valid. Exception: "
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
index d1c2b6bfb7e60f4a088e7c3b6e7c6026e44817d7..1a621d53d679d93c7c97f03b3648c7390f663ff8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RegisterUser.java
@@ -36,7 +36,6 @@ import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.authorization.EAuthzAccessDenied;
 import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.usrgrp.ICertUserLocator;
 import com.netscape.certsrv.usrgrp.IGroup;
@@ -137,8 +136,6 @@ public class RegisterUser extends CMSServlet {
             return;
         }
 
-        IConfigStore cs = CMS.getConfigStore();
-
         // create user and add certificate
         String uid = httpReq.getParameter("uid");
         String name = httpReq.getParameter("name");
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 0ae5507070790e439dbeb97d4a4f6895e1eb9fbb..80a887fd2d09fdb09bf988df55912678d8a56379 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
@@ -122,7 +122,8 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         /* clean up if necessary */
         try {
-            boolean done = cs.getBoolean("preop.restorekeycert.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.restorekeycert.done"); // check for errors
             cs.putBoolean("preop.restorekeycert.done", false);
             cs.commit(false);
         } catch (Exception e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SecurityDomainPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SecurityDomainPanel.java
index 7e45f019c4a5c13b48784f8482bc97fa91b18531..f3a4169e8ca43c3744e50fec6a0a73e0e8ff9788 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SecurityDomainPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SecurityDomainPanel.java
@@ -96,13 +96,11 @@ public class SecurityDomainPanel extends WizardPanelBase {
         String errorString = "";
         String default_admin_url = "";
         String name = "";
-        String cstype = "";
         String systemdService = "";
 
         try {
             default_admin_url = config.getString("preop.securitydomain.admin_url", "");
             name = config.getString("preop.securitydomain.name", "");
-            cstype = config.getString("cs.type", "");
             systemdService = config.getString("pkicreate.systemd.servicename", "");
         } catch (Exception e) {
             CMS.debug(e.toString());
@@ -364,12 +362,6 @@ public class SecurityDomainPanel extends WizardPanelBase {
             } catch (EBaseException e) {
             }
 
-            String instanceRoot = "";
-            try {
-                instanceRoot = config.getString("instanceRoot", "");
-            } catch (Exception e) {
-            }
-
         } else if (select.equals("existingdomain")) {
             config.putString("preop.securitydomain.select", "existing");
             config.putString("securitydomain.select", "existing");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
index c915d9e85945f3f9f97997fd1c8c36ffa128c8e0..03f0e186d3a9d437e9715b65025a59bb38adeaba 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/SizePanel.java
@@ -92,7 +92,8 @@ public class SizePanel extends WizardPanelBase {
         IConfigStore cs = CMS.getConfigStore();
         /* clean up if necessary*/
         try {
-            boolean done = cs.getBoolean("preop.SizePanel.done");
+            @SuppressWarnings("unused")
+            boolean done = cs.getBoolean("preop.SizePanel.done"); // check for errors
             cs.putBoolean("preop.SizePanel.done", false);
             cs.commit(false);
         } catch (Exception e) {
@@ -132,7 +133,8 @@ public class SizePanel extends WizardPanelBase {
 
         IConfigStore config = CMS.getConfigStore();
         try {
-            boolean done = config.getBoolean("preop.SizePanel.done");
+            @SuppressWarnings("unused")
+            boolean done = config.getBoolean("preop.SizePanel.done"); // check whether it's first time
         } catch (Exception e) {
             context.put("firsttime", "true");
         }
@@ -233,9 +235,9 @@ public class SizePanel extends WizardPanelBase {
         }
 
         context.put("firsttime", "false");
-        boolean done = false;
         try {
-            done = config.getBoolean("preop.SizePanel.done");
+            @SuppressWarnings("unused")
+            boolean done = config.getBoolean("preop.SizePanel.done"); // check whether it's first time
         } catch (Exception e) {
             context.put("firsttime", "true");
             if (select1.equals("clone")) {
@@ -429,7 +431,6 @@ public class SizePanel extends WizardPanelBase {
 
             try {
                 String keytype = config.getString(PCERT_PREFIX + ct + ".keytype");
-                String keyalgorithm = config.getString(PCERT_PREFIX + ct + ".keyalgorithm");
 
                 if (keytype.equals("rsa")) {
                     int keysize = config.getInteger(
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
index 0476e26d72baa37c8fb2d66eaabaa9e02b0dafff..a2b6ebc726307d67f11334d1cbafb71d584f17d8 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
@@ -314,8 +314,6 @@ public class UpdateDomainXML extends CMSServlet {
             // update in ldap
 
             LDAPEntry entry = null;
-            ILdapConnFactory connFactory = null;
-            LDAPConnection conn = null;
             String listName = type + "List";
             String cn = host + ":";
 
@@ -432,13 +430,13 @@ public class UpdateDomainXML extends CMSServlet {
 
                     for (int i = 0; i < len; i++) {
                         Node nn = (Node) nodeList.item(i);
-                        Vector v_name = parser.getValuesFromContainer(nn, "SubsystemName");
-                        Vector v_host = parser.getValuesFromContainer(nn, "Host");
-                        Vector v_adminport = parser.getValuesFromContainer(nn, "SecureAdminPort");
+                        Vector<String> v_name = parser.getValuesFromContainer(nn, "SubsystemName");
+                        Vector<String> v_host = parser.getValuesFromContainer(nn, "Host");
+                        Vector<String> v_adminport = parser.getValuesFromContainer(nn, "SecureAdminPort");
                         if ((v_name.elementAt(0).equals(name)) && (v_host.elementAt(0).equals(host))
                                 && (v_adminport.elementAt(0).equals(adminsport))) {
                             Node parent = nn.getParentNode();
-                            Node remNode = parent.removeChild(nn);
+                            parent.removeChild(nn);
                             count--;
                             break;
                         }
@@ -480,7 +478,7 @@ public class UpdateDomainXML extends CMSServlet {
                 } catch (Exception ee) {
                 }
 
-                Node nn2 = n.removeChild(countnode);
+                n.removeChild(countnode);
                 parser.addItemToContainer(n, "SubsystemCount", "" + count);
 
                 // recreate domain.xml
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 a56230c2ff0c254dda9e8823edafa826da011b69..40190c9a75138163b7633e7669acb740a7ad64e0 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
@@ -1088,18 +1088,6 @@ public class WizardPanelBase implements IWizardPanel {
 
             CMS.debug("Getting domain.xml from CA...");
             String c = getDomainXML(hostname, httpsadminport, true);
-            String list = "";
-
-            CMS.debug("Subsystem 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") &&
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
index 52efb14511b41c3bfefe1eeded5ec5fd7fc733d8..1ef6808534d20c7155ae5128812ccae8ba4ddb15 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
@@ -291,7 +291,6 @@ public class AddCAServlet extends CMSServlet {
 
         try {
             ServletOutputStream out = resp.getOutputStream();
-            String error = null;
 
             String xmlOutput = req.getParameter("xml");
             if (xmlOutput != null && xmlOutput.equals("true")) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
index 8d2c5a28b476d2dc9a76f590b3a533a281232073..dfe796366912242e2feb853b89497b34d5b24c2c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
@@ -197,7 +197,6 @@ public class CheckCertServlet extends CMSServlet {
 
         try {
             ServletOutputStream out = resp.getOutputStream();
-            String error = null;
 
             String xmlOutput = req.getParameter("xml");
             if (xmlOutput != null && xmlOutput.equals("true")) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
index 9ca7a8a189cd69ac9a3a64fca866f2ccf106bcbe..a93512ccd60abd5806a7e7d90e6c124393a76690 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
@@ -179,7 +179,6 @@ public class ListCAServlet extends CMSServlet {
 
         try {
             ServletOutputStream out = resp.getOutputStream();
-            String error = null;
 
             String xmlOutput = req.getParameter("xml");
             if (xmlOutput != null && xmlOutput.equals("true")) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
index ab92a7c67a88ec426d15a2f11297c63f0135b362..4262940d0a8a9563d2ec9b03c3a7ae0c36e4c2dc 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
@@ -104,8 +104,6 @@ public class RemoveCAServlet extends CMSServlet {
         HttpServletResponse resp = cmsReq.getHttpResp();
         String auditMessage = null;
         String auditSubjectID = auditSubjectID();
-        String auditCA = ILogger.SIGNED_AUDIT_EMPTY_VALUE;
-        String auditCASubjectDN = ILogger.SIGNED_AUDIT_EMPTY_VALUE;
 
         IAuthToken authToken = authenticate(cmsReq);
 
@@ -197,7 +195,6 @@ public class RemoveCAServlet extends CMSServlet {
 
         try {
             ServletOutputStream out = resp.getOutputStream();
-            String error = null;
 
             String xmlOutput = req.getParameter("xml");
             if (xmlOutput != null && xmlOutput.equals("true")) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/processors/PKIProcessor.java b/pki/base/common/src/com/netscape/cms/servlet/processors/PKIProcessor.java
index df7b0c3d1573218d02718f3d11367262a52e80e2..5b78bb42a2c34d37fee705346165d6f4ae59b818 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/processors/PKIProcessor.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/processors/PKIProcessor.java
@@ -77,8 +77,6 @@ public class PKIProcessor implements IPKIProcessor {
 
         mServletId = servlet.getId();
 
-        HttpServletRequest httpReq = mRequest.getHttpReq();
-
     }
 
     public void process(CMSRequest cmsReq)
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
index 6c273311571907df795416f7a6bf266431204fdc..dd0ee7be78cf251d97536b7ad53d12bdc9ec196a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileReviewServlet.java
@@ -236,7 +236,6 @@ public class ProfileReviewServlet extends ProfileServlet {
         CMS.debug("ProfileReviewServlet: profileSetId=" + profileSetId);
         Enumeration<String> policyIds = (profileSetId != null && profileSetId.length() > 0) ?
                                  profile.getProfilePolicyIds(profileSetId) : null;
-        int count = 0;
         ArgList list = new ArgList();
 
         if (policyIds != null) {
@@ -251,7 +250,6 @@ public class ProfileReviewServlet extends ProfileServlet {
                 //     http parameters
                 handlePolicy(list, response, locale,
                         id, policy, req);
-                count++;
             }
         }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java b/pki/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java
index 623fa941f988d2a6156926adcbf0aa2ccdc4434a..8a32f5d8feb9e11e48641dfb1fc0104b56fd85d6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java
@@ -22,9 +22,7 @@ import java.util.ArrayList;
 import java.util.Hashtable;
 import java.util.List;
 
-import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java b/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
index fc45395e9121a30e7758259849c360fdde08a334..c96a30a857230668481c63c0ab45ab8a582aeef1 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/tks/TokenServlet.java
@@ -43,7 +43,6 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IPrettyPrintFormat;
 import com.netscape.certsrv.base.SessionContext;
-import com.netscape.certsrv.common.Constants;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.tks.ITKSAuthority;
 import com.netscape.cms.servlet.base.CMSServlet;
@@ -753,7 +752,7 @@ public class TokenServlet extends CMSServlet {
 
     private void processDiversifyKey(HttpServletRequest req,
             HttpServletResponse resp) throws EBaseException {
-        byte[] KeySetData, KeysValues, CUID, xCUID;
+        byte[] KeySetData, CUID, xCUID;
         byte[] xkeyInfo, xnewkeyInfo;
         boolean missingParam = false;
         String errorMsg = "";
@@ -825,7 +824,6 @@ public class TokenServlet extends CMSServlet {
             useSoftToken_s = "false";
 
         KeySetData = null;
-        String outputString = null;
         if (!missingParam) {
             xCUID = com.netscape.cmsutil.util.Utils.SpecialDecode(rCUID);
             if (xCUID == null || xCUID.length != 10) {
@@ -892,10 +890,6 @@ public class TokenServlet extends CMSServlet {
                             + ";to newMasterKeyName=" + newSelectedToken + ":" + newKeyNickName);
 
             resp.setContentType("text/html");
-
-            if (KeySetData != null) {
-                outputString = new String(KeySetData);
-            }
         } // ! missingParam
 
         //CMS.debug("TokenServlet:processDiversifyKey " +outputString);
@@ -1093,7 +1087,6 @@ public class TokenServlet extends CMSServlet {
         String value = "";
         String status = "0";
         if (encryptedData != null && encryptedData.length > 0) {
-            String outputString = new String(encryptedData);
             // sending both the pre-encrypted and encrypted data back
             value = "status=0&" + "data=" +
                          com.netscape.cmsutil.util.Utils.SpecialEncode(data) +
@@ -1342,9 +1335,6 @@ public class TokenServlet extends CMSServlet {
      */
     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/cmscore/apps/CMSEngine.java b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
index 384b4cd67e37aed5f33e93fcfb4b234c2b7499db..5071a1c80dd845cbd629c83da5e3b0a3623d9329 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java
@@ -17,7 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmscore.apps;
 
-import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
@@ -1563,8 +1562,6 @@ public class CMSEngine implements ICMSEngine {
 
             process.waitFor();
 
-            BufferedReader pOut = null;
-            String l = null;
         } catch (Exception e) {
 
         }
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/Upgrade.java b/pki/base/common/src/com/netscape/cmscore/apps/Upgrade.java
index b5307c448ea9d50de3b1dffd86f67ccf23394818..326e9b5e6b4b5ff8a00c46aa9645a3e4b49181c8 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/Upgrade.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/Upgrade.java
@@ -162,7 +162,6 @@ public final class Upgrade {
             throws EBaseException {
         boolean isCA = false;
         boolean isRA = false;
-        boolean isKRA = false;
 
         // determine what subsystems do we have?
         IConfigStore cs = c.getSubStore("ca");
@@ -174,10 +173,6 @@ public final class Upgrade {
         if (cs != null && cs.size() > 0) {
             isRA = true;
         }
-        cs = c.getSubStore("kra");
-        if (cs != null && cs.size() > 0) {
-            isKRA = true;
-        }
 
         Setup.installAuthImpls(c);
         Setup.installOIDMap(c);
diff --git a/pki/base/common/src/com/netscape/cmscore/authentication/SSLClientCertAuthentication.java b/pki/base/common/src/com/netscape/cmscore/authentication/SSLClientCertAuthentication.java
index 19438037b19381d3892783ba55eceb2e2def225c..3f0d7a87b468cea1ec4d83a0134a034d0aead139 100644
--- a/pki/base/common/src/com/netscape/cmscore/authentication/SSLClientCertAuthentication.java
+++ b/pki/base/common/src/com/netscape/cmscore/authentication/SSLClientCertAuthentication.java
@@ -129,7 +129,6 @@ public class SSLClientCertAuthentication implements IAuthManager {
         }
 
         String clientCertIssuerDN = clientCert.getIssuerDN().toString();
-        BigInteger[] bigIntArray = null;
 
         if (mCertDB != null) { /* is CA */
             ICertRecord record = null;
diff --git a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
index 1cc0330c7792721f7fce930d7e95655094d0b3a2..482bcc7b979cd7611d2b7514815548db3fc31ab0 100644
--- a/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
+++ b/pki/base/common/src/com/netscape/cmscore/base/PropConfigStore.java
@@ -251,7 +251,7 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      * @exception EBaseException failed to retrieve value
      */
     public String getString(String name) throws EBaseException {
-        String str = (String) get(name);
+        String str = get(name);
 
         if (str == null) {
             CMS.traceHashKey(mDebugType, getFullName(name), "<notpresent>");
@@ -629,7 +629,7 @@ public class PropConfigStore implements IConfigStore, Cloneable {
      */
     public IConfigStore getSubStore(String name) {
         String fullname = getFullName(name);
-        String reference = (String) mSource.get(fullname);
+        String reference = mSource.get(fullname);
 
         if (reference == null) {
             PropConfigStore ps = new PropConfigStore(fullname, mSource);
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 6ae37984057f41123f81fb49a2e6cd6fd8f4e8a2..0d004d3357bc818b11dd03c3d10b9f133e548c70 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertificateRepository.java
@@ -38,12 +38,10 @@ import netscape.security.x509.X509CertInfo;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.MetaInfo;
 import com.netscape.certsrv.base.SessionContext;
 import com.netscape.certsrv.ca.ICRLIssuingPoint;
 import com.netscape.certsrv.dbs.EDBException;
-import com.netscape.certsrv.dbs.IDBRegistry;
 import com.netscape.certsrv.dbs.IDBSSession;
 import com.netscape.certsrv.dbs.IDBSearchResults;
 import com.netscape.certsrv.dbs.IDBSubsystem;
@@ -90,13 +88,7 @@ public class CertificateRepository extends Repository
             throws EDBException {
         super(dbService, increment, baseDN);
         mBaseDN = certRepoBaseDN;
-
         mDBService = dbService;
-
-        // registers CMS database attributes
-        IDBRegistry reg = dbService.getRegistry();
-
-        IConfigStore cfg = mDBService.getConfigStore();
     }
 
     public ICertRecord createCertRecord(BigInteger id, Certificate cert, MetaInfo meta) {
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/DBVirtualList.java b/pki/base/common/src/com/netscape/cmscore/dbs/DBVirtualList.java
index 934cf1ea0f7fab6d45130f652e211671c76706c7..574ab41c0eea50fd210aac90d20a0ee0e9be84f2 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/DBVirtualList.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/DBVirtualList.java
@@ -640,8 +640,6 @@ public class DBVirtualList<E> implements IDBVirtualList<E> {
          * the caller should really check the index is within bound before this
          * but I'll take care of this just in case they are too irresponsible
          */
-        int baseJumpTo = 0;
-
         if (!mInitialized)
             mSize = getSize();
 
diff --git a/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java b/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
index bba95949da0277de79c61b230fee5abd54229c3a..dc4423357b079babf0ef1cb44fc65f9431d0bc07 100644
--- a/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
+++ b/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
@@ -19,7 +19,6 @@ package com.netscape.cmscore.extensions;
 
 import java.io.IOException;
 
-import netscape.security.util.DerOutputStream;
 import netscape.security.util.ObjectIdentifier;
 import netscape.security.x509.Extension;
 import netscape.security.x509.KeyUsageExtension;
@@ -196,7 +195,6 @@ public class KeyUsage implements ICMSExtension {
             ext = (KeyUsageExtension) extension;
         } else {
             try {
-                DerOutputStream der = new DerOutputStream();
                 byte[] value = extension.getExtensionValue();
 
                 ext = new KeyUsageExtension(new Boolean(true), value);
diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
index 654f3e494475f1a4ca4673aa07ded16c1982fc6b..79225a13f860563689fe907d30d47c2e0e2d7fd8 100644
--- a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
+++ b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java
@@ -156,21 +156,19 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
 
                 // register the job
                 mJobs.put(jobName, job);
+
             } catch (ClassNotFoundException e) {
-                String errMsg = "JobsScheduler:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString()));
                 throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath));
+
             } catch (IllegalAccessException e) {
-                String errMsg = "JobsScheduler:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString()));
                 throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath));
+
             } catch (InstantiationException e) {
-                String errMsg = "JobsScheduler: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString()));
                 throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath));
+
             } catch (EBaseException e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString()));
                 throw e;
@@ -237,7 +235,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
                 try {
                     Thread.sleep(duration);
                 } catch (InterruptedException e) {
-                    System.out.println(e.toString());
+                    System.out.println(e);
                 }
             }
             // if (duration == 0), it's time
@@ -494,19 +492,19 @@ public class JobsScheduler implements Runnable, IJobsScheduler {
             log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString()));
             if (Debug.ON)
-                Debug.trace("class NOT instantiated: " + e.toString());
+                Debug.trace("class NOT instantiated: " + e);
             throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className));
         } catch (ClassNotFoundException e) {
             log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString()));
             if (Debug.ON)
-                Debug.trace("class NOT instantiated: " + e.toString());
+                Debug.trace("class NOT instantiated: " + e);
             throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className));
         } catch (IllegalAccessException e) {
             log(ILogger.LL_FAILURE,
                     CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString()));
             if (Debug.ON)
-                Debug.trace("class NOT instantiated: " + e.toString());
+                Debug.trace("class NOT instantiated: " + e);
             throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className));
         }
     }
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 a0bc2d1450afa0d72f1860040ed258b623e01252..147eee07e9466b47afbc34960b983178ab8daf04 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
@@ -154,20 +154,17 @@ public class PublisherProcessor implements
                 isEnable = true;
 
             } catch (ClassNotFoundException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (IllegalAccessException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (InstantiationException e) {
-                String errMsg = "PublisherProcessor: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (Throwable e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_SKIP_PUBLISHER", insName, e.toString()));
                 // Let the server continue if it is a
@@ -241,20 +238,17 @@ public class PublisherProcessor implements
                 mapperInst.init(mConfig);
                 isEnable = true;
             } catch (ClassNotFoundException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (IllegalAccessException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (InstantiationException e) {
-                String errMsg = "PublisherProcessor: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (Throwable e) {
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_SKIP_MAPPER", insName, e.toString()));
                 // Let the server continue if it is a
@@ -331,20 +325,17 @@ public class PublisherProcessor implements
                 log(ILogger.LL_INFO, "rule instance " +
                         insName + " added");
             } catch (ClassNotFoundException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (IllegalAccessException e) {
-                String errMsg = "PublisherProcessor:: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (InstantiationException e) {
-                String errMsg = "PublisherProcessor: init()-" + e.toString();
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_LDAP_PUBLISHER_INIT_FAILED", e.toString()));
                 throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
+
             } catch (Throwable e) {
                 if (mConfig == null) {
                     throw new ELdapException(CMS.getUserMessage("CMS_LDAP_FAIL_LOAD_CLASS", className));
@@ -612,7 +603,7 @@ public class PublisherProcessor implements
     public Vector<String> getMapperInstanceParams(String insName) throws
             ELdapException {
         ILdapMapper mapperInst = null;
-        MapperProxy proxy = (MapperProxy) mMapperInsts.get(insName);
+        MapperProxy proxy = mMapperInsts.get(insName);
 
         if (proxy == null) {
             return null;
@@ -629,8 +620,7 @@ public class PublisherProcessor implements
     public Vector<String> getPublisherDefaultParams(String implName) throws
             ELdapException {
         // is this a registered implname?
-        PublisherPlugin plugin = (PublisherPlugin)
-                mPublisherPlugins.get(implName);
+        PublisherPlugin plugin = mPublisherPlugins.get(implName);
 
         if (plugin == null) {
             log(ILogger.LL_FAILURE,
@@ -841,7 +831,7 @@ public class PublisherProcessor implements
                     "Cannot mark cert 0x" + serialNo.toString(16)
                     + " published as " + published
                     + " in the ldap directory. Cert Record not found. Error: "
-                    + e.toString() 
+                    + e
                     + " Don't be alarmed if it's a subordinate ca or clone's ca siging cert. " 
                     + "Otherwise your internal db may be corrupted.");
         }
@@ -903,10 +893,10 @@ public class PublisherProcessor implements
             } catch (Exception e) {
                 // continue publishing even publisher has errors
                 //log(ILogger.LL_WARN, e.toString());
-                CMS.debug("PublisherProcessor::publishCACert returned error: " + e.toString());
+                CMS.debug("PublisherProcessor::publishCACert returned error: " + e);
                 error = true;
                 errorRule = errorRule + " " + rule.getInstanceName() +
-                        " error:" + e.toString();
+                        " error:" + e;
             }
         }
         // set the ldap published flag.
@@ -989,7 +979,6 @@ public class PublisherProcessor implements
      */
     public void publishXCertPair(byte[] pair)
             throws ELdapException {
-        boolean error = false;
         String errorRule = "";
 
         if (!enabled())
@@ -1036,11 +1025,10 @@ public class PublisherProcessor implements
             } catch (Exception e) {
                 // continue publishing even publisher has errors
                 //log(ILogger.LL_WARN, e.toString());
-                error = true;
                 errorRule = errorRule + " " + rule.getInstanceName() +
-                        " error:" + e.toString();
+                        " error:" + e;
 
-                CMS.debug("PublisherProcessor::publishXCertPair: error: " + e.toString());
+                CMS.debug("PublisherProcessor::publishXCertPair: error: " + e);
             }
         }
     }
@@ -1248,7 +1236,7 @@ public class PublisherProcessor implements
                     error = true;
                     errorRule = errorRule + " " + rule.getInstanceName();
 
-                    CMS.debug("PublisherProcessor::publishCRL: error: " + e.toString());
+                    CMS.debug("PublisherProcessor::publishCRL: error: " + e);
                 }
             }
         } catch (ELdapException e) {
@@ -1306,15 +1294,15 @@ public class PublisherProcessor implements
                     }
                 } catch (Exception e) {
                     CMS.debug(
-                            "Error publishing CRL to " + dn + ": " + e.toString());
+                            "Error publishing CRL to " + dn + ": " + e);
                     error = true;
                     errorRule = errorRule + " " + rule.getInstanceName();
-                    CMS.debug("PublisherProcessor::publishCRL: error: " + e.toString());
+                    CMS.debug("PublisherProcessor::publishCRL: error: " + e);
                 }
             }
         } catch (ELdapException e) {
             CMS.debug(
-                    "Error publishing CRL to " + dn + ": " + e.toString());
+                    "Error publishing CRL to " + dn + ": " + e);
             throw e;
         } finally {
             if (conn != null) {
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnFactory.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnFactory.java
index f7a7722320aae93f493d5d464cb215ac7905d20e..dc4c86547266b9aa1b3c6ddc835f124a9e7d9cf6 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnFactory.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnFactory.java
@@ -344,10 +344,6 @@ public class LdapAnonConnFactory implements ILdapConnFactory {
         if (anon.getFacId() != mConns) {
             // returning a connection not from this factory. 
             log(ILogger.LL_WARN, "returnConn: unknown connection.");
-
-            /* swallow this error but see who's doing it. */
-            ELdapException e =
-                    new ELdapException(CMS.getUserMessage("CMS_LDAP_UNKNOWN_RETURNED_CONN"));
         }
         // check if conn has already been returned.
         for (int i = 0; i < mNumConns; i++) {
@@ -357,8 +353,6 @@ public class LdapAnonConnFactory implements ILdapConnFactory {
                 /* swallow this error but see who's doing it. */
                 log(ILogger.LL_WARN,
                         "returnConn: previously returned connection.");
-                ELdapException e =
-                        new ELdapException(CMS.getUserMessage("CMS_LDAP_BAD_RETURNED_CONN"));
             }
         }
 
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
index 64f22d30225d286ab6bbeb90dfa41767d6b04d0e..b4839f7d50a2550d60b5999a046b3134106afdfa 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
@@ -417,19 +417,11 @@ public class LdapBoundConnFactory implements ILdapBoundConnFactory {
 
         if (boundconn.getFacId() != mConns) {
             log(ILogger.LL_WARN, "returnConn: unknown connection.");
-
-            /* swallow this exception but see who's doing it. */
-            ELdapException e =
-                    new ELdapException(CMS.getUserMessage("CMS_LDAP_UNKNOWN_RETURNED_CONN"));
         }
         for (int i = 0; i < mNumConns; i++) {
             if (mConns[i] == conn) {
                 CMS.debug(
                         "returnConn: previously returned connection.");
-
-                /* swallow this exception but see who's doing it */
-                ELdapException e =
-                        new ELdapException(CMS.getUserMessage("CMS_LDAP_BAD_RETURNED_CONN"));
             }
         }
         mConns[mNumConns++] = boundconn;
diff --git a/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java b/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
index 8ac304f8c7d04f5d3258bfd15c8a4d1310e9b38b..1cfce4e65ba5416ed6ccbd57ca545ae510ca3f89 100644
--- a/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/logging/LogSubsystem.java
@@ -126,17 +126,14 @@ public class LogSubsystem implements ILogSubsystem {
                 // for view from console
 
             } catch (ClassNotFoundException e) {
-                String errMsg = "LogSubsystem:: init()-" + e.toString();
-
                 throw new EBaseException(insName + ":Failed to instantiate class " + className);
+
             } catch (IllegalAccessException e) {
-                String errMsg = "LogSubsystem:: init()-" + e.toString();
-
                 throw new EBaseException(insName + ":Failed to instantiate class " + className);
+
             } catch (InstantiationException e) {
-                String errMsg = "LogSubsystem:: init()-" + e.toString();
-
                 throw new EBaseException(insName + ":Failed to instantiate class " + className);
+
             } catch (Throwable e) {
                 e.printStackTrace();
                 throw new EBaseException(insName
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java b/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
index 0a1a05f6efc1ad754e086d640ce7b43ccd5338a4..bdc16a24e3576186199b94092b281beaf628c88b 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
@@ -78,9 +78,7 @@ public class EmailTemplate implements IEmailTemplate {
 
         /* check if file exists and is accessible */
         if ((!template.exists()) || (!template.canRead()) || (template.isDirectory())) {
-            String error = "Template: " + mTemplateFile + " does not exist or invalid";
-
-            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_NOT_EXIST"));
+            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_NOT_EXIST", mTemplateFile));
             return false;
         }
 
@@ -90,9 +88,7 @@ public class EmailTemplate implements IEmailTemplate {
         try {
             input = new FileReader(template);
         } catch (FileNotFoundException e) {
-            String error = "Template: " + mTemplateFile + " not found";
-
-            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_NOT_FOUND"));
+            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_NOT_FOUND", mTemplateFile));
 
             return false;
         }
@@ -100,8 +96,6 @@ public class EmailTemplate implements IEmailTemplate {
         /* load template */
         mFileContents = loadFile(input);
         if (mFileContents == null) {
-            String error = "Template: Error loading file into string";
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_LOAD_ERROR"));
             return false;
         }
@@ -159,8 +153,6 @@ public class EmailTemplate implements IEmailTemplate {
                 buf.append("\n");
             }
         } catch (IOException e) {
-            String error = "Template: Error loading file";
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_NOTIFY_TEMPLATE_LOADING"));
             return null;
         }
diff --git a/pki/base/common/src/com/netscape/cmscore/policy/PolicySet.java b/pki/base/common/src/com/netscape/cmscore/policy/PolicySet.java
index 37780cfc2cc2539f4bc3edaead1dfc0a6d9456ca..bd38138ff0aa22124f99288b8859ee29e425706e 100644
--- a/pki/base/common/src/com/netscape/cmscore/policy/PolicySet.java
+++ b/pki/base/common/src/com/netscape/cmscore/policy/PolicySet.java
@@ -152,9 +152,8 @@ public class PolicySet implements IPolicySet {
      */
     public PolicyResult apply(IRequest req) {
         // If there are no rules, we are done.
-        int cnt;
 
-        if ((cnt = mRules.size()) == 0)
+        if (mRules.size() == 0)
             return PolicyResult.ACCEPTED;
 
         // All policies are applied before returning the result. Hence
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 b5f829f77ae2c5455cc8154768656c3245982b04..2435fa462a80b5fdcc17cad84e5e9f6e2822c052 100644
--- a/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
@@ -251,7 +251,7 @@ public class ProfileSubsystem implements IProfileSubsystem {
     public String getProfileEnableBy(String id) {
         if (!isProfileEnable(id))
             return null;
-        IProfile profile = (IProfile) mProfiles.get(id);
+        IProfile profile = mProfiles.get(id);
         String enableBy = null;
 
         try {
@@ -295,11 +295,11 @@ public class ProfileSubsystem implements IProfileSubsystem {
      */
     public IProfile getProfile(String id)
             throws EProfileException {
-        return (IProfile) mProfiles.get(id);
+        return mProfiles.get(id);
     }
 
     public String getProfileClassId(String id) {
-        return (String) mProfileClassIds.get(id);
+        return mProfileClassIds.get(id);
     }
 
     /**
diff --git a/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java b/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
index 3eeb39e0c08d26f9ac6aa56a09815e1898ce9380..fc7fb9087630b22feb90fcf272a89700a47e14b3 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
@@ -226,7 +226,6 @@ public abstract class CertificateInfo {
         //KeyCertUtil.setOCSPSigning(mKeyPair, exts, mProperties);
         KeyCertUtil.setAuthInfoAccess(mKeyPair, exts, mProperties);
         KeyCertUtil.setOCSPNoCheck(mKeyPair, exts, mProperties);
-        KeyPair caKeyPair = (KeyPair) mProperties.get(Constants.PR_CA_KEYPAIR);
         String aki = mProperties.getAKI();
 
         if ((aki != null) && (aki.equals(Constants.TRUE))) {
diff --git a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
index b6aaa02cc7308f80940397d149cc076d2bb85c38..8bcc74de56fc63427428032c814abc6225ca0eb3 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
@@ -852,7 +852,7 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
     public void isX500DN(String dn) throws EBaseException {
         try {
-            X500Name name = new X500Name(dn);
+            new X500Name(dn); // check for errors
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_SECURITY_X500_NAME", e.toString()));
             throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_X500_NAME", dn));
@@ -944,7 +944,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
     public KeyPair getECCKeyPair(KeyCertData properties) throws EBaseException {
         String token = Constants.PR_INTERNAL_TOKEN_NAME;
-        String keyType = "ECC";
         String keyCurve = "nistp512";
         String certType = null;
         KeyPair pair = null;
@@ -1067,7 +1066,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
             X509Certificate cert = getCertificate(nickname, serialno, issuername);
             if (cert instanceof TokenCertificate) {
                 TokenCertificate tcert = (TokenCertificate) cert;
-                CryptoStore store = tcert.getOwningToken().getCryptoStore();
 
                 CMS.debug("*** deleting this token cert");
                 tcert.getOwningToken().getCryptoStore().deleteCert(tcert);
@@ -1120,7 +1118,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
                             CMS.debug("*** removing root cert");
                             if (cert instanceof TokenCertificate) {
                                 TokenCertificate tcert = (TokenCertificate) cert;
-                                CryptoStore store = tcert.getOwningToken().getCryptoStore();
 
                                 CMS.debug("*** deleting this token cert");
                                 tcert.getOwningToken().getCryptoStore().deleteCert(tcert);
@@ -1175,8 +1172,9 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
                 for (int i = 0; i < list.length; i++) {
                     try {
+                        @SuppressWarnings("unused")
                         PrivateKey key =
-                                CryptoManager.getInstance().findPrivKeyByCert(list[i]);
+                                CryptoManager.getInstance().findPrivKeyByCert(list[i]); // check for errors
                         Debug.trace("JssSubsystem getRootCerts: find private key "
                                 + list[i].getNickname());
                     } catch (ObjectNotFoundException e) {
@@ -1247,8 +1245,9 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
                 for (int i = 0; i < list.length; i++) {
                     try {
+                        @SuppressWarnings("unused")
                         PrivateKey key =
-                                CryptoManager.getInstance().findPrivKeyByCert(list[i]);
+                                CryptoManager.getInstance().findPrivKeyByCert(list[i]); // check for errors
                         String nickname = list[i].getNickname();
                         if (tokenName.equals(Constants.PR_INTERNAL_TOKEN_NAME) ||
                                 tokenName.equals(Constants.PR_FULL_INTERNAL_TOKEN_NAME)) {
@@ -1307,7 +1306,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
 
             while (enums.hasMoreElements()) {
                 CryptoToken token = (CryptoToken) enums.nextElement();
-                String tokenName = token.getName();
 
                 CryptoStore store = token.getCryptoStore();
                 X509Certificate[] list = store.getCertificates();
@@ -1538,7 +1536,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
                         if (notAfter.equals(qualifier)) {
                             if (cert instanceof TokenCertificate) {
                                 TokenCertificate tcert = (TokenCertificate) cert;
-                                CryptoStore store = tcert.getOwningToken().getCryptoStore();
 
                                 tcert.getOwningToken().getCryptoStore().deleteCert(tcert);
                             } else {
@@ -1620,7 +1617,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
                     if (notAfter.equals(qualifier)) {
                         if (cert instanceof TokenCertificate) {
                             TokenCertificate tcert = (TokenCertificate) cert;
-                            CryptoStore store = tcert.getOwningToken().getCryptoStore();
 
                             tcert.getOwningToken().getCryptoStore().deleteCert(tcert);
                         } else {
@@ -1660,7 +1656,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
     public void deleteTokenCertificate(String nickname, String pathname) throws EBaseException {
         try {
             X509Certificate cert = CryptoManager.getInstance().findCertByNickname(nickname);
-            String issuerName = cert.getSubjectDN().getName();
             Principal principal = cert.getSubjectDN();
             DN dn = new DN(principal.getName());
             BigInteger serialno = cert.getSerialNumber();
@@ -1674,7 +1669,6 @@ public final class JssSubsystem implements ICryptoSubsystem {
             stream.close();
             if (cert instanceof TokenCertificate) {
                 TokenCertificate tcert = (TokenCertificate) cert;
-                CryptoStore store = tcert.getOwningToken().getCryptoStore();
 
                 tcert.getOwningToken().getCryptoStore().deleteCert(tcert);
             } else
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 1d03911b45f2be6a225961f4886bab15af932e57..3eef57718fc48c74803d724387a4c95a9fc38770 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
@@ -141,11 +141,11 @@ public class KeyCertUtil {
                 DerValue b_der = new DerValue(b);
 
                 while (b_der.data.available() != 0) {
-                    Extension de = new Extension(b_der.data.getDerValue());
+                    new Extension(b_der.data.getDerValue()); // check for errors
                 }
             } catch (IOException e) {
                 try {
-                    Extension de = new Extension(new DerValue(b));
+                    new Extension(new DerValue(b)); // check for errors
                 } catch (IOException ex) {
                     throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_CERT_EXTENSION"));
                 }
diff --git a/pki/base/common/src/com/netscape/cmscore/security/PWUtil.java b/pki/base/common/src/com/netscape/cmscore/security/PWUtil.java
index 524e7a50439d1aafc829e8e37c942df1a841db45..3938bf5d2ec1d4310dc858c856a1588d29699127 100644
--- a/pki/base/common/src/com/netscape/cmscore/security/PWUtil.java
+++ b/pki/base/common/src/com/netscape/cmscore/security/PWUtil.java
@@ -17,9 +17,6 @@
 // --- END COPYRIGHT BLOCK ---
 package com.netscape.cmscore.security;
 
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
 import org.mozilla.jss.util.Password;
 import org.mozilla.jss.util.PasswordCallback;
 
@@ -27,9 +24,6 @@ public class PWUtil {
     public static Password
             readPasswordFromStream()
                     throws PasswordCallback.GiveUpException {
-        BufferedReader in;
-
-        in = new BufferedReader(new InputStreamReader(System.in));
 
         StringBuffer buf = new StringBuffer();
         String passwordString = new String();
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 bf56061961e7cfcfd5b3f3bbb0d138da209358b4..1bf2518658536cb1d6e564116a01af9d694b40e9 100644
--- a/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
+++ b/pki/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
@@ -133,7 +133,6 @@ public final class UGSubsystem implements IUGSubsystem {
 
             mLdapConnFactory = new LdapBoundConnFactory();
             mLdapConnFactory.init(ldapConfig);
-            IConfigStore c = config.getSubStore(PROP_IMPL);
         } catch (EBaseException e) {
             if (CMS.isPreOpMode())
                 return;
@@ -250,16 +249,8 @@ public final class UGSubsystem implements IUGSubsystem {
 
             return (User) e.nextElement();
         } catch (LDAPException e) {
-            String errMsg = "findUser()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "findUser: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_USER", e.toString()));
         } catch (ELdapException e) {
-            String errMsg =
-                    "find User: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_INTERNAL_DB", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -307,19 +298,10 @@ public final class UGSubsystem implements IUGSubsystem {
 
             Enumeration<IUser> e = buildUsers(res);
 
-            return (User) e.nextElement();
+            return e.nextElement();
         } catch (LDAPException e) {
-            String errMsg = "findUsersByCert()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "findUsersByCert: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_USER_BY_CERT", e.toString()));
         } catch (ELdapException e) {
-            String errMsg =
-                    "find Users By Cert: " +
-                            "Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_USER_BY_CERT", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -349,16 +331,8 @@ public final class UGSubsystem implements IUGSubsystem {
 
             return e;
         } catch (LDAPException e) {
-            String errMsg = "findUsers()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "findUsersByCert: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_USERS", e.toString()));
         } catch (ELdapException e) {
-            String errMsg =
-                    "find Users: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_USERS", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -395,11 +369,6 @@ public final class UGSubsystem implements IUGSubsystem {
 
             return e;
         } catch (LDAPException e) {
-            String errMsg = "listUsers()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "findUsersByCert: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_LIST_USERS", e.toString()));
         } catch (Exception e) {
             throw new EUsrGrpException(CMS.getUserMessage("CMS_INTERNAL_ERROR"));
@@ -526,10 +495,7 @@ public final class UGSubsystem implements IUGSubsystem {
         if (userdn != null) {
             id.setUserDN(userdn);
         } else { // the impossible
-            String errMsg = "buildUser(): user DN not found: " +
-                    userdn;
-
-            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_BUILD_USER"));
+            log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_BUILD_USER", userdn));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_INTERNAL_ERROR"));
         }
@@ -738,9 +704,6 @@ public final class UGSubsystem implements IUGSubsystem {
             ldapconn = getConn();
             ldapconn.add(entry);
         } catch (ELdapException e) {
-            String errMsg =
-                    "add User: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_ADD_USER", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -807,18 +770,9 @@ public final class UGSubsystem implements IUGSubsystem {
                 if (Debug.ON) {
                     e.printStackTrace();
                 }
-                String errMsg = "addUserCert():" + e.toString();
-
-                if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                    errMsg = "findUsersByCert: " + "Internal DB is unavailable";
-                }
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_ADD_USER", e.toString()));
                 throw e;
             } catch (ELdapException e) {
-                String errMsg =
-                        "add User Cert: " +
-                                "Could not get connection to internaldb. Error " + e;
-
                 log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_ADD_USER", e.toString()));
             } finally {
                 if (ldapconn != null)
@@ -915,19 +869,9 @@ public final class UGSubsystem implements IUGSubsystem {
                             );
 
                 } catch (LDAPException e) {
-                    String errMsg = "removeUserCert():" + e;
-
-                    if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                        errMsg =
-                                "removeUserCert: " + "Internal DB is unavailable";
-                    }
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER", e.toString()));
                     throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_MOD_USER_FAIL"));
                 } catch (ELdapException e) {
-                    String errMsg =
-                            "remove User Cert: " +
-                                    "Could not get connection to internaldb. Error " + e;
-
                     log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER", e.toString()));
                 } finally {
                     if (ldapconn != null)
@@ -959,18 +903,10 @@ public final class UGSubsystem implements IUGSubsystem {
 
             ldapconn.modify(groupDN, singleChange);
         } catch (LDAPException e) {
-            String errMsg = "removeUserFromGroup()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "removeUser: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER_FROM_GROUP", e.toString()));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_REMOVE_USER_FAIL"));
         } catch (ELdapException e) {
-            String errMsg =
-                    "removeUserFromGroup: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER_FROM_GROUP", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -1001,18 +937,10 @@ public final class UGSubsystem implements IUGSubsystem {
                     );
 
         } catch (LDAPException e) {
-            String errMsg = "removeUser()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "removeUser: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER", e.toString()));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_REMOVE_USER_FAIL"));
         } catch (ELdapException e) {
-            String errMsg =
-                    "remove User: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_USER", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -1164,18 +1092,9 @@ public final class UGSubsystem implements IUGSubsystem {
 
             return buildGroups(res);
         } catch (LDAPException e) {
-            String errMsg =
-                    "findGroups: could not find group " + filter + ". Error " + e;
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "findGroups: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_GROUPS", e.toString()));
             return null;
         } catch (ELdapException e) {
-            String errMsg =
-                    "find Groups: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_FIND_GROUPS", e.toString()));
             return null;
         } finally {
@@ -1189,7 +1108,7 @@ public final class UGSubsystem implements IUGSubsystem {
 
         if (groups == null || !groups.hasMoreElements())
             return null;
-        return (Group) groups.nextElement();
+        return groups.nextElement();
     }
 
     /**
@@ -1217,16 +1136,8 @@ public final class UGSubsystem implements IUGSubsystem {
 
             return buildGroups(res);
         } catch (LDAPException e) {
-            String errMsg = "listGroups()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "listGroups: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_LIST_GROUPS", e.toString()));
         } catch (ELdapException e) {
-            String errMsg =
-                    "list Groups: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_LIST_GROUPS", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -1445,8 +1356,7 @@ public final class UGSubsystem implements IUGSubsystem {
             // that the filter matched, and so the user correctly
             // authenticated.
             if (res.hasMoreElements()) {
-                // actually read the entry
-                LDAPEntry entry = (LDAPEntry) res.nextElement();
+                res.nextElement(); // consume the entry
                 founduser = true;
             }
             Debug.trace("authorization result: " + founduser);
@@ -1510,18 +1420,10 @@ public final class UGSubsystem implements IUGSubsystem {
             ldapconn = getConn();
             ldapconn.add(entry);
         } catch (LDAPException e) {
-            String errMsg = "addGroup()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "addGroup: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_ADD_GROUP", e.toString()));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_ADD_GROUP_FAIL"));
         } catch (ELdapException e) {
-            String errMsg =
-                    "add Group: Could not get connection to internaldb. Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_ADD_GROUP", e.toString()));
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_ADD_GROUP_FAIL"));
         } finally {
@@ -1547,19 +1449,10 @@ public final class UGSubsystem implements IUGSubsystem {
             ldapconn = getConn();
             ldapconn.delete("cn=" + name + "," + getGroupBaseDN());
         } catch (LDAPException e) {
-            String errMsg = "removeGroup()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "removeGroup: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_GROUP", e.toString()));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_REMOVE_GROUP_FAIL"));
         } catch (ELdapException e) {
-            String errMsg =
-                    "remove Group: Could not get connection to internaldb. " +
-                            "Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_REMOVE_GROUP", e.toString()));
         } finally {
             if (ldapconn != null)
@@ -1612,11 +1505,6 @@ public final class UGSubsystem implements IUGSubsystem {
             ldapconn.modify("cn=" + grp.getGroupID() +
                     "," + getGroupBaseDN(), mod);
         } catch (LDAPException e) {
-            String errMsg = " modifyGroup()" + e.toString();
-
-            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
-                errMsg = "modifyGroup: " + "Internal DB is unavailable";
-            }
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_MODIFY_GROUP", e.toString()));
 
             throw new EUsrGrpException(CMS.getUserMessage("CMS_USRGRP_MOD_GROUP_FAIL"));
@@ -1671,10 +1559,6 @@ public final class UGSubsystem implements IUGSubsystem {
                 return entry.getDN();
             }
         } catch (ELdapException e) {
-            String errMsg =
-                    "convertUIDtoDN: Could not get connection to internaldb. " +
-                            "Error " + e;
-
             log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_USRGRP_CONVERT_UID", e.toString()));
         } finally {
             if (ldapconn != null)
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java b/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java
index 4355677108e48fcce24c565755bcd14ca3f08bc7..8a8854f8fc78ceb0510c9d8fd559c6334f7dc004 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java
@@ -153,7 +153,7 @@ public class AuditVerify {
             }
 
             // get list of log files
-            Vector logFiles = new Vector();
+            Vector<String> logFiles = new Vector<String>();
             BufferedReader r = new BufferedReader(new FileReader(logListFile));
             String listLine;
             while ((listLine = r.readLine()) != null) {
@@ -231,8 +231,6 @@ public class AuditVerify {
             String sigStopFile = null;
             int signedLines = 1;
 
-            boolean lastLineWasSig = false;
-
             for (int curfile = 0; curfile < logFiles.size(); ++curfile) {
                 String curfileName = (String) logFiles.elementAt(curfile);
                 BufferedReader br = new BufferedReader(new FileReader(curfileName));
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
index 18bfb51fc434d6687246501450a5eba531418062..d739fbcff6ee828b1cf609bbd229b0fbd55a53e2 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
@@ -45,7 +45,6 @@ import org.mozilla.jss.asn1.OBJECT_IDENTIFIER;
 import org.mozilla.jss.asn1.OCTET_STRING;
 import org.mozilla.jss.asn1.SEQUENCE;
 import org.mozilla.jss.asn1.SET;
-import org.mozilla.jss.crypto.CryptoStore;
 import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.crypto.DigestAlgorithm;
 import org.mozilla.jss.crypto.ObjectNotFoundException;
@@ -154,8 +153,6 @@ public class CMCEnroll {
                 throw new IOException("Internal Error - " + e.toString());
             }
 
-            String hasSki = "true";
-
             BigInteger serialno = signerCert.getSerialNumber();
             byte[] certB = signerCert.getEncoded();
             X509CertImpl impl = new X509CertImpl(certB);
@@ -374,8 +371,6 @@ public class CMCEnroll {
                 Password pass = new Password(pValue.toCharArray());
 
                 token.login(pass);
-                CryptoStore store = token.getCryptoStore();
-                X509Certificate[] list = store.getCertificates();
                 X509Certificate signerCert = null;
 
                 signerCert = cm.findCertByNickname(nValue);
@@ -425,9 +420,10 @@ public class CMCEnroll {
                 asciiBASE64Blob = getCMCBlob(signerCert, cm, nValue, asciiBASE64Blob);
                 // (5) Decode the ASCII BASE 64 blob enclosed in the
                 //     String() object into a BINARY BASE 64 byte[] object
-                byte binaryBASE64Blob[] = null;
 
-                binaryBASE64Blob = com.netscape.osutil.OSUtil.AtoB(asciiBASE64Blob);
+                @SuppressWarnings("unused")
+                byte binaryBASE64Blob[] =
+                        com.netscape.osutil.OSUtil.AtoB(asciiBASE64Blob); // check for errors
 
                 // (6) Finally, print the actual CMCEnroll blob to the
                 //     specified output file
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
index 197f29e15992bf6eadcc7fa83538bd6436db537b..a4368736cd73e437cdf9a92410e402b1f41887fd 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java
@@ -52,7 +52,6 @@ import org.mozilla.jss.asn1.OCTET_STRING;
 import org.mozilla.jss.asn1.SEQUENCE;
 import org.mozilla.jss.asn1.SET;
 import org.mozilla.jss.asn1.UTF8String;
-import org.mozilla.jss.crypto.CryptoStore;
 import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.crypto.DigestAlgorithm;
 import org.mozilla.jss.crypto.ObjectNotFoundException;
@@ -198,7 +197,6 @@ public class CMCRequest {
                             System.out.println("This is not a crmf request. Or this request has an error.");
                             System.exit(1);
                         }
-                        int nummsgs = crmfMsgs.size();
                         certReqMsg = (CertReqMsg) crmfMsgs.elementAt(0);
                         trq = new TaggedRequest(TaggedRequest.CRMF, null,
                                 certReqMsg);
@@ -798,7 +796,6 @@ public class CMCRequest {
         String numRequests = null;
         String dbdir = null, nickname = null;
         String ifilename = null, ofilename = null, password = null, format = null;
-        FileOutputStream outputBlob = null;
         String confirmCertEnable = "false", confirmCertIssuer = null, confirmCertSerial = null;
         String getCertEnable = "false", getCertIssuer = null, getCertSerial = null;
         String dataReturnEnable = "false", dataReturnData = null;
@@ -989,8 +986,6 @@ public class CMCRequest {
             Password pass = new Password(password.toCharArray());
 
             token.login(pass);
-            CryptoStore store = token.getCryptoStore();
-            X509Certificate[] list = store.getCertificates();
             X509Certificate signerCert = null;
 
             signerCert = cm.findCertByNickname(nickname);
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
index 3be8167a120e03c4ec916e4627155359d5dc2539..57be364d7f0cacdf00d5b837b2484f389ed09a59 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java
@@ -41,7 +41,6 @@ import org.mozilla.jss.asn1.OCTET_STRING;
 import org.mozilla.jss.asn1.SEQUENCE;
 import org.mozilla.jss.asn1.SET;
 import org.mozilla.jss.asn1.UTF8String;
-import org.mozilla.jss.crypto.CryptoStore;
 import org.mozilla.jss.crypto.CryptoToken;
 import org.mozilla.jss.crypto.DigestAlgorithm;
 import org.mozilla.jss.crypto.ObjectNotFoundException;
@@ -94,8 +93,6 @@ public class CMCRevoke {
      */
     public static void main(String[] s) {
 
-        FileOutputStream outputBlob = null;
-
         // default path is "."
         String mPath = ".";
         // default prefix is ""
@@ -182,8 +179,6 @@ public class CMCRevoke {
                 Password pass = new Password(hValue.toCharArray());
 
                 token.login(pass);
-                CryptoStore store = token.getCryptoStore();
-                X509Certificate[] list = store.getCertificates();
                 X509Certificate signerCert = null;
 
                 signerCert = cm.findCertByNickname(nValue);
@@ -290,8 +285,6 @@ public class CMCRevoke {
 
         try {
 
-            String hasSki = "true";
-
             BigInteger serialno = signerCert.getSerialNumber();
             byte[] certB = signerCert.getEncoded();
             X509CertImpl impl = new X509CertImpl(certB);
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 73c56ffea3002b71d4a4f8909d44ced06bfa9d00..c45148f7936968d5bd39e1b0b3e64f0e9e1536b5 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java
@@ -192,7 +192,6 @@ public class CRMFPopClient {
     }
 
     public static void main(String args[]) {
-        String USER_PREFIX = "user";
 
         int argsLen = getRealArgsLength(args);
 
@@ -261,8 +260,6 @@ public class CRMFPopClient {
         URLConnection conn = null;
         InputStream is = null;
         BufferedReader reader = null;
-        boolean success = false;
-        int num = 1;
         long total_time = 0;
         KeyPair pair = null;
 
@@ -515,7 +512,6 @@ public class CRMFPopClient {
                 while ((line = reader.readLine()) != null) {
                     System.out.println(line);
                     if (line.equals("CMS Enroll Request Success")) {
-                        success = true;
                         System.out.println("Enrollment Successful: ......");
                         System.out.println("");
                     }
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java b/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java
index 3b0e8b1ffb31ee5e35857733e4c7978c9b2a66f3..c3a91dcd785cf9455ac06426e8e049a99548a0b9 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java
@@ -2448,7 +2448,6 @@ public class DRMTool {
      */
     private static String output_dn(String record_type,
                                      String line) {
-        String data = null;
         String embedded_cn_data[] = null;
         String embedded_cn_output = null;
         String input = null;
@@ -3955,7 +3954,6 @@ public class DRMTool {
      */
     private static String output_extdata_auth_token_user(String record_type,
                                                           String line) {
-        String data = null;
         String output = null;
 
         try {
@@ -4003,7 +4001,6 @@ public class DRMTool {
      */
     private static String output_extdata_auth_token_user_dn(String record_type,
                                                              String line) {
-        String data = null;
         String output = null;
 
         try {
@@ -4310,7 +4307,6 @@ public class DRMTool {
      * @return true if the DRMTOOL config file is successfully processed
      */
     private static boolean process_drmtool_config_file() {
-        boolean success = false;
         BufferedReader reader = null;
         String line = null;
         String name_value_pair[] = null;
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 e9877fd8d2fcce49be544722d035e508c466a88f..8be0b98dd28388b502851f723b045a69320fb8e8 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java
@@ -272,7 +272,7 @@ public class PKCS12Export {
 
                 if (prikey == null) {
                     debug("Private key is null");
-                    byte[] localKeyId = addCertBag(certs[i], null, safeContents);
+                    addCertBag(certs[i], null, safeContents);
                 } else {
                     debug("Private key is not null");
                     byte localKeyId[] =
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
index e4d8106f7381c96cd94dae4bdf706659bc6e6754..abb09db62e417a5d230be6b7834f208b576cb69b 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
@@ -150,8 +150,6 @@ public class PasswordCache {
         String mPrefix = "";
         String mKeyIdString = null;
         byte[] mKeyId = null;
-        String mCertDB = CERTDB;
-        String mKeyDB = KEYDB;
         String mCacheFile = "pwcache.db";
 
         String pwdPath = null;
@@ -197,7 +195,6 @@ public class PasswordCache {
                 String keyFile = argv[i];
                 try {
                     BufferedReader r = new BufferedReader(new FileReader(keyFile));
-                    String listLine;
                     mKeyIdString = r.readLine();
                 } catch (Exception e) {
                     System.out.println("Error: " + e.toString());
@@ -793,8 +790,6 @@ class PWsdrCache {
             Process process = Runtime.getRuntime().exec(cmds);
 
             process.waitFor();
-            BufferedReader pOut = null;
-            String l = null;
 
             if (process.exitValue() == 0) {
 
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
index 9d91429273fac666a7f9597027012345ec2d1033..ddbd95c8dad9cad71a0881747ec854224a666674 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
@@ -25,7 +25,6 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.security.cert.CertificateException;
-import java.util.Enumeration;
 import java.util.Locale;
 
 import netscape.security.util.CertPrettyPrint;
@@ -190,8 +189,6 @@ public class PrettyPrintCert {
                 CertificateSubjectName csn = (CertificateSubjectName)
                         certinfo.get(X509CertInfo.SUBJECT);
 
-                Enumeration<String> en = csn.getAttributeNames();
-
                 X500Name dname = (X500Name) csn.get(CertificateSubjectName.DN_NAME);
 
                 pp = "";
diff --git a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
index 4e35d982cd9cd203385a7d5278143311547fc4bd..c195a78ae302712a2a30ef400295957d6c7521dc 100644
--- a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
+++ b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
@@ -1133,7 +1133,6 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
         String auditSubjectID = auditSubjectID();
         String auditRecoveryID = reqID;
         String auditAgents = ILogger.SIGNED_AUDIT_EMPTY_VALUE;
-        String auditPublicKey = ILogger.SIGNED_AUDIT_EMPTY_VALUE;
 
         IRequestQueue queue = null;
         IRequest r = null;
@@ -1426,7 +1425,6 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
             if (nc != null && nc.size() > 0) {
                 // Initialize Request In Queue notification listener
                 IConfigStore rq = nc.getSubStore(PROP_REQ_IN_Q_SUBSTORE);
-                IAuthority cSub = (IAuthority) this;
 
                 String requestInQListenerClassName =
                         nc.getString("certificateIssuedListenerClassName",
diff --git a/pki/base/kra/src/com/netscape/kra/NetkeyKeygenService.java b/pki/base/kra/src/com/netscape/kra/NetkeyKeygenService.java
index 09dc4d95c1e2a4d4a30c1c0869c928257f64756c..ecce2eaa9e99bba84b63c9ebd8ed9711cea13f20 100644
--- a/pki/base/kra/src/com/netscape/kra/NetkeyKeygenService.java
+++ b/pki/base/kra/src/com/netscape/kra/NetkeyKeygenService.java
@@ -301,9 +301,7 @@ public class NetkeyKeygenService implements IService {
             throws EBaseException {
         String auditMessage = null;
         String auditSubjectID = null;
-        String auditRequesterID = "TPSagent";
         String auditArchiveID = ILogger.UNIDENTIFIED;
-        String auditPublicKey = ILogger.UNIDENTIFIED;
         byte[] wrapped_des_key;
 
         byte iv[] = { 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 };
diff --git a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
index 3a860f447c1d5ff1688e3e00e97e56b2dd10ca5b..7575ea9f46fee64e5537211ebff4aa5ff00b7af2 100644
--- a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java
@@ -197,9 +197,7 @@ public class TokenKeyRecoveryService implements IService {
     public boolean serviceRequest(IRequest request) throws EBaseException {
         String auditMessage = null;
         String auditSubjectID = null;
-        String auditRequesterID = "TPSagent";
         String auditRecoveryID = ILogger.UNIDENTIFIED;
-        String auditPublicKey = ILogger.UNIDENTIFIED;
         String iv_s = "";
 
         CMS.debug("KRA services token key recovery request");
@@ -553,7 +551,9 @@ public class TokenKeyRecoveryService implements IService {
             privateKeyIn.getSequence(0);
             DerValue privateKeyDer = new DerValue(privateKeyIn.getOctetString());
             DerInputStream privateKeyDerIn = privateKeyDer.data;
-            BigInt privateKeyVersion = privateKeyDerIn.getInteger();
+
+            @SuppressWarnings("unused")
+            BigInt privateKeyVersion = privateKeyDerIn.getInteger(); // consume stream
             BigInt privateKeyModulus = privateKeyDerIn.getInteger();
             BigInt privateKeyExponent = privateKeyDerIn.getInteger();
 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
index 84dd68a1ceb27d5bcb09e7d4b46473133fbb37e1..ee41e5a194d60f56051da545e065cc5d371743ff 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureCA.java
@@ -261,7 +261,6 @@ public class ConfigureCA {
 
     public boolean TokenChoicePanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             String query_string = null;
 
@@ -332,9 +331,8 @@ public class ConfigureCA {
 
     public boolean DisplayCertChainPanel() {
         try {
-            HTTPResponse hr = null;
             String query_string = "p=4" + "&op=next" + "&xml=true";
-            hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+            hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
             return true;
         } catch (Exception e) {
             System.out.println("Exception in DisplayCertChainPanel(): " + e.toString());
@@ -345,7 +343,6 @@ public class ConfigureCA {
 
     public boolean SecurityDomainLoginPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
 
             String subca_url = "https://" + cs_hostname + ":" + cs_port +
@@ -394,7 +391,6 @@ public class ConfigureCA {
 
     public boolean CreateCAPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             String query_string = null;
 
@@ -454,7 +450,6 @@ public class ConfigureCA {
 
     public boolean HierarchyPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
 
             String query_string = "p=8" + "&op=next" + "&xml=true";
@@ -479,7 +474,6 @@ public class ConfigureCA {
 
     public boolean LdapConnectionPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
 
             String query_string = "p=9" + "&op=next" + "&xml=true" + "&host="
@@ -509,7 +503,6 @@ public class ConfigureCA {
 
     public boolean KeyPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             ByteArrayInputStream bais = null;
             ParseXML px = new ParseXML();
@@ -602,7 +595,6 @@ public class ConfigureCA {
 
     public boolean CertSubjectPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             ByteArrayInputStream bais = null;
             ParseXML px = new ParseXML();
@@ -749,7 +741,6 @@ public class ConfigureCA {
 
     public boolean CertificatePanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
 
             String query_string = "p=12" + "&op=next" + "&xml=true" + "&subsystem="
@@ -778,14 +769,12 @@ public class ConfigureCA {
 
     public boolean CertificatePanelExternal() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             ByteArrayInputStream bais = null;
             ParseXML px = new ParseXML();
             ArrayList<String> req_list = null;
             ArrayList<String> cert_list = null;
             ArrayList<String> dn_list = null;
-            ArrayList<String> pp_list = null;
             String genString = "...certificate be generated internally...";
 
             String query_string = "p=12" + "&op=apply" + "&xml=true" + "&subsystem="
@@ -873,7 +862,6 @@ public class ConfigureCA {
 
     public boolean BackupPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
 
             if (save_p12.equalsIgnoreCase("true")) {
@@ -906,7 +894,7 @@ public class ConfigureCA {
                     String line = null;
                     while ((line = br.readLine()) != null)
                         System.out.println("Error: " + line);
-                    int exitVal = proc.waitFor();
+                    proc.waitFor();
 
                     // verify p12 file
                     // Decode the P12 file
@@ -977,7 +965,6 @@ public class ConfigureCA {
 
     public boolean AdminCertReqPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             ByteArrayInputStream bais = null;
             ParseXML px = new ParseXML();
@@ -1087,7 +1074,6 @@ public class ConfigureCA {
 
     public boolean UpdateDomainPanel() {
         try {
-            boolean st = false;
             HTTPResponse hr = null;
             ByteArrayInputStream bais = null;
             ParseXML px = new ParseXML();
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
index bf599ed4c0a8446d4ccd4125ed11368eba79071a..254d9bcecc719c9ccca05943fad700550ecf621e 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java
@@ -611,8 +611,6 @@ public class ConfigureOCSP {
         ParseXML px = new ParseXML();
         String admin_cert_request = null;
 
-        String cert_subject = "CN=ocsp-" + admin_user;
-
         ComCrypto cCrypt = new ComCrypto(client_certdb_dir,
                                         client_certdb_pwd,
                                         agent_cert_subject,
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
index d8a6c7feb9226f86409527e26c9923e7ce41b7bd..cade95fa823b20bca638a43154f4c131738812ec 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureRA.java
@@ -255,7 +255,6 @@ public class ConfigureRA {
         px.prettyprintxml();
 
         sleep_time();
-        String ca_url = "https://" + ca_hostname + ":" + ca_ssl_port;
 
         // CA choice panel
         query_string = "p=4" +
@@ -381,8 +380,6 @@ public class ConfigureRA {
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
 
-        String ca_url = "https://" + ca_hostname + ":" + ca_ssl_port;
-
         String query_string = "p=9" +
                     "&sslserver=" +
                     URLEncoder.encode(ra_server_cert_subject_name) +
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
index 4c33a8479b24964d6b780586469a7fdf0b6bb3ff..62947e4a23083b7bb1e4536c15acd5db49dfef9f 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java
@@ -297,18 +297,13 @@ public class ConfigureSubCA {
     }
 
     public boolean SecurityDomainLoginPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-
         String subca_url = "https://" + cs_hostname + ":" + cs_port +
                             "/ca/admin/console/config/wizard" +
                             "?p=5&subsystem=CA";
 
         String query_string = "url=" + URLEncoder.encode(subca_url);
 
-        hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
 
         String query_string_1 = "uid=" + sd_admin_name +
                                 "&pwd=" + URLEncoder.encode(sd_admin_password) +
@@ -340,20 +335,14 @@ public class ConfigureSubCA {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-        String query_string = null;
-
-        query_string = "p=5" + "&op=next" + "&xml=true" +
+        String query_string = "p=5" + "&op=next" + "&xml=true" +
                         "&choice=newsubsystem" +
                         "&subsystemName=" +
                         URLEncoder.encode(subsystem_name) +
                         "&subsystemName=" +
                         URLEncoder.encode(subsystem_name) +
                         "&urls=0";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
         // parse xml
         // bais = new ByteArrayInputStream(hr.getHTML().getBytes());
         // px.parse(bais);
@@ -493,8 +482,6 @@ public class ConfigureSubCA {
         ArrayList<String> cert_list = null;
         ArrayList<String> dn_list = null;
 
-        String domain_url = "https://" + ca_hostname + ":" + ca_ssl_port;
-
         String query_string = "p=11" + "&op=next" + "&xml=true" +
                 "&signing=" +
                 URLEncoder.encode(subca_sign_cert_subject_name) +
@@ -574,14 +561,9 @@ public class ConfigureSubCA {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> pp_list = null;
 
         String query_string = "p=12" + "&op=next" + "&xml=true" +
                             "&signing=" +
@@ -654,14 +636,11 @@ public class ConfigureSubCA {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
         String admin_cert_request = null;
 
-        String cert_subject = "CN=" + "subca-" + admin_user;
-
         ComCrypto cCrypt = new ComCrypto(client_certdb_dir,
                                         client_certdb_pwd,
                                         agent_cert_subject,
@@ -716,15 +695,12 @@ public class ConfigureSubCA {
 
     public boolean AdminCertImportPanel() {
         boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String query_string = "serialNumber=" + admin_serial_number +
                             "&importCert=" + "true" +
                             "";
 
-        hr = hc.sslConnect(cs_hostname, cs_port, admin_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(cs_hostname, cs_port, admin_uri, query_string);
 
         // get response data
         // String cert_to_import = 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
index acc6996731ba04ce8e9516f75eea48de0e586e23..5fad4790e5a56ae516aef4d846ef33d21f07e531 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java
@@ -268,14 +268,8 @@ public class ConfigureTKS {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-        String query_string = null;
-
-        query_string = "p=4" + "&op=next" + "&xml=true";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        String query_string = "p=4" + "&op=next" + "&xml=true";
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
         // parse xml
         // bais = new ByteArrayInputStream(hr.getHTML().getBytes());
         // px.parse(bais);
@@ -286,18 +280,13 @@ public class ConfigureTKS {
     }
 
     public boolean SecurityDomainLoginPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-
         String tks_url = "https://" + cs_hostname + ":" + cs_port +
                             "/tks/admin/console/config/wizard" +
                             "?p=5&subsystem=TKS";
 
         String query_string = "url=" + URLEncoder.encode(tks_url);
 
-        hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
 
         String query_string_1 = "uid=" + sd_admin_name +
                                 "&pwd=" + URLEncoder.encode(sd_admin_password) +
@@ -490,14 +479,9 @@ public class ConfigureTKS {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> pp_list = null;
 
         String query_string = "p=10" + "&op=next" + "&xml=true" +
                             "&subsystem=" +
@@ -544,14 +528,9 @@ public class ConfigureTKS {
     }
 
     public boolean SavePKCS12Panel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-
         String query_string = "";
 
-        hr = hc.sslConnect(cs_hostname, cs_port, pkcs12_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(cs_hostname, cs_port, pkcs12_uri, query_string);
 
         // dump hr.getResponseData() to file
 
@@ -595,14 +574,11 @@ public class ConfigureTKS {
     }
 
     public boolean AdminCertReqPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
         String admin_cert_request = null;
 
-        String cert_subject = "CN=tks-" + admin_user;
-
         ComCrypto cCrypt = new ComCrypto(client_certdb_dir,
                                         client_certdb_pwd,
                                         agent_cert_subject,
@@ -656,15 +632,12 @@ public class ConfigureTKS {
 
     public boolean AdminCertImportPanel() {
         boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
 
         String query_string = "serialNumber=" + admin_serial_number +
                             "&importCert=" + "true" +
                             "";
 
-        hr = hc.sslConnect(sd_hostname, sd_admin_port, admin_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(sd_hostname, sd_admin_port, admin_uri, query_string);
 
         // get response data
         // String cert_to_import = 
diff --git a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
index 10cdc7821ad2bf10291dcd53720b4d7abd4dab94..4982a2f2d90510983696f5b7fec8a8ce7953be1d 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java
@@ -20,7 +20,6 @@ package com.netscape.pkisilent;
 
 import java.io.ByteArrayInputStream;
 import java.net.URLEncoder;
-import java.util.ArrayList;
 
 import com.netscape.osutil.OSUtil;
 import com.netscape.pkisilent.argparser.ArgParser;
@@ -221,32 +220,21 @@ public class ConfigureTPS {
     }
 
     public boolean DisplayChainPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-        String query_string = null;
-
-        query_string = "p=4" + "&op=next" + "&xml=true";
-        hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+        String query_string = "p=4" + "&op=next" + "&xml=true";
+        hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
 
         return true;
 
     }
 
     public boolean SecurityDomainLoginPanel() {
-        boolean st = false;
-        HTTPResponse hr = null;
-        ByteArrayInputStream bais = null;
-        ParseXML px = new ParseXML();
-
         String tps_url = "https://" + cs_hostname + ":" + cs_port +
                             "/tps/admin/console/config/wizard" +
                             "?p=3&subsystem=TPS";
 
         String query_string = "url=" + URLEncoder.encode(tps_url) + "";
 
-        hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
+        HTTPResponse hr = hc.sslConnect(sd_hostname, sd_admin_port, sd_login_uri, query_string);
 
         String query_string_1 = "uid=" + sd_admin_name +
                                 "&pwd=" + URLEncoder.encode(sd_admin_password) +
@@ -302,7 +290,6 @@ public class ConfigureTPS {
         px.prettyprintxml();
 
         sleep_time();
-        String ca_url = "https://" + ca_hostname + ":" + ca_ssl_port;
 
         // CA choice panel
         query_string = "p=6" +
@@ -337,8 +324,6 @@ public class ConfigureTPS {
             ss_keygen = "keygen";
         }
 
-        String drm_url = "https://" + drm_hostname + ":" + drm_ssl_port;
-
         query_string = "p=8" +
                         "&choice=" + ss_keygen +
                         "&urls=0" +
@@ -474,12 +459,9 @@ public class ConfigureTPS {
     }
 
     public boolean KeyPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> friendly_list = null;
-        ArrayList<String> dn_list = null;
 
         String query_string = "p=11" +
                             "&keytype=" + key_type +
@@ -508,16 +490,9 @@ public class ConfigureTPS {
     }
 
     public boolean CertSubjectPanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> friendly_list = null;
-
-        String ca_url = "https://" + ca_hostname + ":" + ca_ssl_port;
 
         String query_string = "p=12" +
                     "&sslserver=" +
@@ -549,14 +524,9 @@ public class ConfigureTPS {
     }
 
     public boolean CertificatePanel() {
-        boolean st = false;
         HTTPResponse hr = null;
         ByteArrayInputStream bais = null;
         ParseXML px = new ParseXML();
-        ArrayList<String> req_list = null;
-        ArrayList<String> cert_list = null;
-        ArrayList<String> dn_list = null;
-        ArrayList<String> pp_list = null;
 
         String query_string = "p=13" +
                             "&sslserver=" +
diff --git a/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java b/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
index d6f02d9c6d91e1b3ca046aef83bae106425f14b8..ed5f98b1de8741cd1e1d2a1f243f8d02815b5c04 100755
--- a/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
@@ -811,7 +811,6 @@ public class ArgParser {
             }
             }
             if (outOfRange) {
-                String errmsg = "value " + s + " not in range ";
                 throw new ArgParseException(
                         name, "value '" + s + "' not in range " + rangeDesc);
             }
@@ -1040,7 +1039,6 @@ public class ArgParser {
     private void scanRangeSpec(Record rec, String s)
             throws IllegalArgumentException {
         StringScanner scanner = new StringScanner(s);
-        int i0, i = 1;
         char c, c0, c1;
 
         scanner.setStringDelimiters(")],}");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java b/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
index d0222897d79fc0edfed2179a028e57410d53c269..91a273df6a253e60b4e0bb8cf682ece04741019a 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java
@@ -463,12 +463,10 @@ public class CMSLDAP {
      **/
 
     public boolean TurnOnSSL(String certPrefix, String certName, String sslport) {
-        String dn;
         String CIPHERS =
                 "-rsa_null_md5,+rsa_fips_3des_sha,+rsa_fips_des_sha,+rsa_3des_sha,+rsa_rc4_128_md5,+rsa_des_sha,+rsa_rc2_40_md5,+rsa_rc4_40_md5";
 
         try {
-            boolean found = false;
             int searchScope = LDAPv2.SCOPE_SUB;
             String getAttrs[] = { "nssslactivation" };
 
@@ -507,9 +505,10 @@ public class CMSLDAP {
 
             // conn.delete("cn=RSA,cn=encryption,cn=config"); 		
             try {
-                LDAPSearchResults results = conn.search(
+                conn.search(
                         "cn=RSA,cn=encryption,cn=config", searchScope, null,
-                        getAttrs, false);
+                        getAttrs, false); // check for errors
+
                 LDAPAttribute cn = new LDAPAttribute("cn", "RSA");
                 LDAPAttribute ssltoken = new LDAPAttribute("nsssltoken",
                         "internal (software)");
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java b/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
index d619afcc26075f9f692509a1bc4afc61de6063c1..1c10db8fbbab20392cd9e3c9ef003af008963e1d 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java
@@ -18,11 +18,7 @@ package com.netscape.pkisilent.common;
 // All rights reserved.
 // --- END COPYRIGHT BLOCK ---
 
-import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
 import java.security.KeyPair;
 
 import netscape.security.x509.X500Name;
@@ -492,13 +488,6 @@ public class ComCrypto {
     }
 
     public String generateCRMFrequest() {
-        URL url = null;
-        URLConnection conn = null;
-        InputStream is = null;
-        BufferedReader reader = null;
-        boolean success = false;
-        int num = 1;
-        long total_time = 0;
         KeyPair pair = null;
 
         System.out.println("Debug : initialize crypto Manager");
@@ -622,9 +611,6 @@ public class ComCrypto {
 
     public String generateCRMFtransport() {
 
-        boolean success = false;
-        int num = 1;
-        long total_time = 0;
         KeyPair pair = null;
 
         try {
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/Request.java b/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
index 9ee7000136cbb4668717870a263cd77b889d7860..0f0827d67ceeebeb467a4a60a9829d67a3daed16 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/Request.java
@@ -349,7 +349,6 @@ public class Request extends TestClient {
         String AUTHID = "header.authorityid = ";
         String seqnum = "record.seqNum";
 
-        int size = s.capacity();
         String res = s.toString();
         int ret = 0;
 
@@ -635,7 +634,6 @@ public class Request extends TestClient {
             StringBuffer s = new StringBuffer();
 
             s = con.getPage();
-            String line;
 
             if (debug) {
                 System.out.println(s.toString());
@@ -967,7 +965,6 @@ public class Request extends TestClient {
         seqNumFrom = x.intValue();
 
         Integer y = new Integer(To);
-        int t = y.intValue();
 
         if ((y.intValue() - seqNumFrom) > 50) {
             maxCount = 50;
diff --git a/pki/base/silent/src/com/netscape/pkisilent/common/checkRequest.java b/pki/base/silent/src/com/netscape/pkisilent/common/checkRequest.java
index 99a6e084907f12232dedb313e7d2971758212b21..c4599ffde62f5a70c556b28faefdf8a5400d6dc1 100644
--- a/pki/base/silent/src/com/netscape/pkisilent/common/checkRequest.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/common/checkRequest.java
@@ -257,7 +257,6 @@ public class checkRequest extends TestClient {
                 FileOutputStream fos = new FileOutputStream(certfile);
 
                 if (ldapformat.equals("true")) {
-                    Integer m = new Integer("1");
                     String tmp = "description: 2;"
                             + Integer.parseInt(serialNumber, 16) + ";" + issuer
                             + ";" + subject + "\n";
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 c2ac547e69e629fb1526cf435572847327eb69da..98b8a0bd1d795ab6f2d2a32f32c69e59be9cabbb 100644
--- a/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/pki/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -328,11 +328,7 @@ public class CryptoUtil {
      * formats a cert request
      */
     public static String reqFormat(String content) {
-        int beginIndex = CERTREQ_BEGIN_HEADING.length();
-        int endIndex = CERTREQ_END_HEADING.length();
-
         String result = CERTREQ_BEGIN_HEADING + "\n";
-        int index = 0;
 
         while (content.length() >= LINE_COUNT) {
             result = result + content.substring(0, LINE_COUNT) + "\n";
@@ -392,11 +388,7 @@ public class CryptoUtil {
         if (content == null || content.length() == 0) {
             return "";
         }
-        int beginIndex = CERT_BEGIN_HEADING.length();
-        int endIndex = CERT_END_HEADING.length();
-
         String result = CERT_BEGIN_HEADING + "\n";
-        int index = 0;
 
         while (content.length() >= LINE_COUNT) {
             result = result + content.substring(0, LINE_COUNT) + "\n";
@@ -997,14 +989,14 @@ public class CryptoUtil {
 
         while (enums.hasMoreElements()) {
             CryptoToken token = (CryptoToken) enums.nextElement();
-            String tokenName = token.getName();
 
             CryptoStore store = token.getCryptoStore();
             org.mozilla.jss.crypto.X509Certificate list[] = store.getCertificates();
 
             for (int i = 0; i < list.length; i++) {
                 try {
-                    PrivateKey key = cm.findPrivKeyByCert(list[i]);
+                    @SuppressWarnings("unused")
+                    PrivateKey key = cm.findPrivKeyByCert(list[i]); // check for errors
                     X509CertImpl impl = null;
 
                     try {
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java b/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
index 2ad67578fd093db3aaf4eca0f1673eeea636ae4f..438c70c2333b8652996a3a27aab64e86aac33ae5 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/HttpClient.java
@@ -198,9 +198,6 @@ public class HttpClient {
         //System.out.println(content);
 
         if (args.length >= 4 && args[3].equalsIgnoreCase("keep-alive")) {
-            int len;
-            char[] msgbody;
-
             for (int i = 0; i < 2; i++) {
                 if (i == 1)
                     req.setHeader("Connection", "Close");
diff --git a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
index d0bef4b2a2b7371824d03d4e748bf40f4f62df71..c2013a5d2503e5fbdeb9f5dd9e4afd99d5e49b11 100644
--- a/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
+++ b/pki/base/util/src/com/netscape/cmsutil/http/JssSSLSocketFactory.java
@@ -23,7 +23,6 @@ import java.net.SocketException;
 import java.net.UnknownHostException;
 
 import org.mozilla.jss.CryptoManager;
-import org.mozilla.jss.crypto.X509Certificate;
 import org.mozilla.jss.ssl.SSLCertificateApprovalCallback;
 import org.mozilla.jss.ssl.SSLClientCertificateSelectionCallback;
 import org.mozilla.jss.ssl.SSLHandshakeCompletedEvent;
diff --git a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
index a5dd108ae37b04026af64ffb4a912f18c5d6ddd5..03bc68723c28d879f9f679778308a5954241462b 100644
--- a/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/pki/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -241,7 +241,6 @@ public class CRSPKIMessage {
     // getHashAlgorithm is added to work around issue 636217
     private String getHashAlgorithm(OBJECT_IDENTIFIER algorithmOID) {
         String hashAlgorithm = null;
-        OBJECT_IDENTIFIER oid = MD5_DIGEST;
         if (algorithmOID != null) {
             if (algorithmOID.equals(MD5_DIGEST)) {
                 hashAlgorithm = "MD5";
diff --git a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
index 07916fb6af0ce0ce17ba4523b834bd571b3c8edc..06892fd84c756917aa961e0ac4817d2c5a8fb496 100644
--- a/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
+++ b/pki/base/util/src/com/netscape/cmsutil/util/Utils.java
@@ -60,8 +60,6 @@ public class Utils {
             }
             Process process = Runtime.getRuntime().exec(cmds);
             process.waitFor();
-            BufferedReader pOut = null;
-            String l = null;
 
             if (process.exitValue() == 0) {
                 /**
diff --git a/pki/base/util/src/netscape/security/acl/OwnerImpl.java b/pki/base/util/src/netscape/security/acl/OwnerImpl.java
index 2e96cfaaa2313f591e6f443163a5bb44c7e7fc42..3f47a1dd8a0e8e0ed4709e206c383a3b89de0db4 100644
--- a/pki/base/util/src/netscape/security/acl/OwnerImpl.java
+++ b/pki/base/util/src/netscape/security/acl/OwnerImpl.java
@@ -85,7 +85,7 @@ public class OwnerImpl implements Owner {
         //
         // check if there is atleast 2 members left.
         //
-        Object o = e.nextElement();
+        e.nextElement(); // consume next element
         if (e.hasMoreElements())
             return ownerGroup.removeMember(owner);
         else
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS10.java b/pki/base/util/src/netscape/security/pkcs/PKCS10.java
index b8c0aedc4bb647c5a814d4c64da55bd69ba9e16a..cb0e6edf44fe131c99dd1709fdb22a85e4dbdf7d 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS10.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS10.java
@@ -141,10 +141,9 @@ public class PKCS10 {
         //
         // Inner sequence:  version, name, key, attributes
         //
-        BigInt serial;
-        DerValue val;
+        @SuppressWarnings("unused")
+        BigInt serial = seq[0].data.getInteger(); // consume serial
 
-        serial = seq[0].data.getInteger();
         /*
         	if (serial.toInt () != 0)
         	    throw new IllegalArgumentException ("not PKCS #10 v1");
@@ -156,8 +155,6 @@ public class PKCS10 {
         subjectPublicKeyInfo = X509Key.parse(new DerValue(val1));
         PublicKey publicKey = X509Key.parsePublicKey(new DerValue(val1));
 
-        String keystr = subjectPublicKeyInfo.toString();
-
         // Cope with a somewhat common illegal PKCS #10 format
         if (seq[0].data.available() != 0)
             attributeSet = new PKCS10Attributes(seq[0].data);
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
index 6fc89610a1366f9e11e059565d383e159d07c7e2..7c5f64582166256fb808ad3e08fd642322c9549a 100644
--- a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
+++ b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java
@@ -31,7 +31,6 @@ import java.security.Provider;
 import java.security.Security;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
-import java.util.Properties;
 
 import netscape.security.util.BigInt;
 import netscape.security.util.DerOutputStream;
@@ -171,8 +170,6 @@ public class PKCS8Key implements PrivateKey {
          */
         String classname = "";
         try {
-            Properties props;
-            String keytype;
             Provider sunProvider;
 
             sunProvider = Security.getProvider("SUN");
diff --git a/pki/base/util/src/netscape/security/provider/SHA.java b/pki/base/util/src/netscape/security/provider/SHA.java
index 5aed992648f1c71b6442a59e294589d41ee3739b..42a6b8b90776bdd4b2633298ad36342ed9748115 100644
--- a/pki/base/util/src/netscape/security/provider/SHA.java
+++ b/pki/base/util/src/netscape/security/provider/SHA.java
@@ -112,7 +112,6 @@ public class SHA extends MessageDigestSpi implements Cloneable {
      */
     public void engineUpdate(byte b[], int off, int len) {
         int word;
-        int offset;
 
         if ((off < 0) || (len < 0) || (off + len > b.length))
             throw new ArrayIndexOutOfBoundsException();
@@ -179,7 +178,7 @@ public class SHA extends MessageDigestSpi implements Cloneable {
         byte hashvalue[] = new byte[SHA_LENGTH];
 
         try {
-            int outLen = engineDigest(hashvalue, 0, hashvalue.length);
+            engineDigest(hashvalue, 0, hashvalue.length);
         } catch (DigestException e) {
             throw new InternalError("");
         }
diff --git a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
index fc7e837ce9d5b30e131fe0d315cf81c5d01c7783..d5f5100bf406ba93a0d06e1a57bb55855724265d 100644
--- a/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
+++ b/pki/base/util/src/netscape/security/x509/IssuingDistributionPointExtension.java
@@ -196,7 +196,9 @@ public class IssuingDistributionPointExtension extends Extension
                                 try {
                                     BitArray reasons = opt.getUnalignedBitString();
                                     issuingDistributionPoint.setOnlySomeReasons(reasons);
-                                    byte[] a = reasons.toByteArray();
+
+                                    @SuppressWarnings("unused")
+                                    byte[] a = reasons.toByteArray(); // check for errors
                                 } catch (IOException e) {
                                     throw new IOException("Invalid encoding of IssuingDistributionPoint " + e);
                                 }
diff --git a/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java b/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
index 52ff67017e7661e4a8e966e10234d1c48a5a30eb..1245cc6bddd55332f6289fc2f9da3b39a483f6ee 100644
--- a/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
+++ b/pki/base/util/src/netscape/security/x509/LdapV3DNStrConverter.java
@@ -108,8 +108,6 @@ public class LdapV3DNStrConverter extends LdapDNStrConverter {
             throws IOException {
         StringReader dn_reader = new StringReader(dn);
         PushbackReader in = new PushbackReader(dn_reader, 5);
-        Vector<RDN> rdnVector = new Vector<RDN>();
-        RDN[] names;
 
         return parseDN(in, encodingOrder);
     }
diff --git a/pki/base/util/src/netscape/security/x509/X509CertImpl.java b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
index d2d77cb3a77f2ffda9da77c584c36862f430f6da..9c62b36a6c374b9caf8982b15e9153ac4c980053 100755
--- a/pki/base/util/src/netscape/security/x509/X509CertImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CertImpl.java
@@ -1195,7 +1195,8 @@ public class X509CertImpl extends X509Certificate
          */
         protected Object readResolve() throws java.io.ObjectStreamException {
             try {
-                CertificateFactory cf = CertificateFactory.getInstance(type1);
+                @SuppressWarnings("unused")
+                CertificateFactory cf = CertificateFactory.getInstance(type1); // check for errors
                 return new X509CertImpl(data1);
 
                 /*
diff --git a/pki/base/util/src/netscape/security/x509/X509Key.java b/pki/base/util/src/netscape/security/x509/X509Key.java
index 546ce363e682414b22a4c5e79563528d53ba0328..a8253c0d8b887dc41c730007c9d60f3a169575dc 100644
--- a/pki/base/util/src/netscape/security/x509/X509Key.java
+++ b/pki/base/util/src/netscape/security/x509/X509Key.java
@@ -30,7 +30,6 @@ import java.security.PublicKey;
 import java.security.Security;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.X509EncodedKeySpec;
-import java.util.Properties;
 
 import netscape.security.util.DerOutputStream;
 import netscape.security.util.DerValue;
@@ -185,8 +184,6 @@ public class X509Key implements PublicKey {
          */
         String classname = "";
         try {
-            Properties props;
-            String keytype;
             Provider sunProvider;
 
             sunProvider = Security.getProvider("SUN");
-- 
1.7.7.4

