diff options
author | Adam Young <ayoung@redhat.com> | 2011-11-18 14:39:59 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2012-01-04 11:24:45 -0500 |
commit | 9c3c8ee12bfc4b0bd3a6a57382f90d7c0ff8abbb (patch) | |
tree | d7f2dc5b6a4e01493428d487b9491aed2e7b461f /pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java | |
parent | e06776464042c557f2a66cbca874507e2be521a8 (diff) | |
download | pki-9c3c8ee12bfc4b0bd3a6a57382f90d7c0ff8abbb.tar.gz pki-9c3c8ee12bfc4b0bd3a6a57382f90d7c0ff8abbb.tar.xz pki-9c3c8ee12bfc4b0bd3a6a57382f90d7c0ff8abbb.zip |
typesafety db and logging
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java index e8d7df9c..3477360e 100644 --- a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java +++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordList.java @@ -24,6 +24,7 @@ import java.util.Vector; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.dbs.IDBVirtualList; import com.netscape.certsrv.dbs.IElementProcessor; +import com.netscape.certsrv.dbs.certdb.ICertRecord; import com.netscape.certsrv.dbs.certdb.ICertRecordList; @@ -36,12 +37,12 @@ import com.netscape.certsrv.dbs.certdb.ICertRecordList; */ public class CertRecordList implements ICertRecordList { - private IDBVirtualList mVlist = null; + private IDBVirtualList<ICertRecord> mVlist = null; /** * Constructs a request list. */ - public CertRecordList(IDBVirtualList vlist) { + public CertRecordList(IDBVirtualList<ICertRecord> vlist) { mVlist = vlist; } @@ -89,12 +90,12 @@ public class CertRecordList implements ICertRecordList { * It's no good to call this if you didnt check * if the startidx, endidx are valid. */ - public Enumeration getCertRecords(int startidx, int endidx) + public Enumeration<ICertRecord> getCertRecords(int startidx, int endidx) throws EBaseException { - Vector entries = new Vector(); + Vector<ICertRecord> entries = new Vector<ICertRecord>(); for (int i = startidx; i <= endidx; i++) { - Object element = mVlist.getElementAt(i); + ICertRecord element = mVlist.getElementAt(i); // CMS.debug("gerCertRecords[" + i + "] element: " + element); if (element != null) { @@ -104,12 +105,11 @@ public class CertRecordList implements ICertRecordList { return entries.elements(); } - public Object getCertRecord(int index) + public ICertRecord getCertRecord(int index) throws EBaseException { - Object element = mVlist.getElementAt(index); + return mVlist.getElementAt(index); - return element; } |