diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-05 15:08:18 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-09 10:22:03 -0500 |
commit | 3f24e55923fc986af4c6a08b2b8d45704a905627 (patch) | |
tree | 716415853b5676b801f6707634305b59b9af8603 /base/common/src/com/netscape/cms/ocsp/DefStore.java | |
parent | 7c7b9d023cd466c1771068badc020dab36beb553 (diff) | |
download | pki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.gz pki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.xz pki-3f24e55923fc986af4c6a08b2b8d45704a905627.zip |
Removed unnecessary type casts.
Unnecessary type casts have been removed using Eclipse Quick Fix.
Ticket #134
Diffstat (limited to 'base/common/src/com/netscape/cms/ocsp/DefStore.java')
-rw-r--r-- | base/common/src/com/netscape/cms/ocsp/DefStore.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/base/common/src/com/netscape/cms/ocsp/DefStore.java b/base/common/src/com/netscape/cms/ocsp/DefStore.java index f9798270a..5cee87273 100644 --- a/base/common/src/com/netscape/cms/ocsp/DefStore.java +++ b/base/common/src/com/netscape/cms/ocsp/DefStore.java @@ -203,7 +203,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { } public long getReqCount(String id) { - Long c = (Long) mReqCounts.get(id); + Long c = mReqCounts.get(id); if (c == null) return 0; @@ -234,8 +234,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { IDBSSession s = mDBService.createSession(); try { - ICRLIssuingPointRecord cp = (ICRLIssuingPointRecord) - readCRLIssuingPoint(caName); + ICRLIssuingPointRecord cp = readCRLIssuingPoint(caName); if (cp == null) return; // nothing to do @@ -264,7 +263,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { getBaseDN(); while (recs != null && recs.hasMoreElements()) { - ICertRecord rec = (ICertRecord) recs.nextElement(); + ICertRecord rec = recs.nextElement(); String cert_dn = "cn=" + rec.getSerialNumber().toString() + "," + rep_dn; @@ -424,8 +423,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { X509CRLImpl theCRL = null; ICRLIssuingPointRecord theRec = null; byte keyhsh[] = cid.getIssuerKeyHash().toByteArray(); - CRLIPContainer matched = (CRLIPContainer) - mCacheCRLIssuingPoints.get(new String(keyhsh)); + CRLIPContainer matched = mCacheCRLIssuingPoints.get(new String(keyhsh)); if (matched == null) { Enumeration<ICRLIssuingPointRecord> recs = searchCRLIssuingPointRecord( @@ -513,8 +511,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { CMS.debug("DefStore: evaluating crl cache"); Hashtable<BigInteger, RevokedCertificate> cache = theRec.getCRLCacheNoClone(); if (cache != null) { - RevokedCertificate rc = (RevokedCertificate) - cache.get(new BigInteger(serialNo.toString())); + RevokedCertificate rc = cache.get(new BigInteger(serialNo.toString())); if (rc == null) { if (isNotFoundGood()) { certStatus = new GoodInfo(); @@ -671,7 +668,7 @@ public class DefStore implements IDefStore, IExtendedPluginInfo { String dn = "cn=" + transformDN(name) + "," + getBaseDN(); - s.add(dn, (ICRLIssuingPointRecord) rec); + s.add(dn, rec); } finally { if (s != null) s.close(); |