From d5c6e6c69e678a79f9e8cd312e6007ad88026a36 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Mon, 6 Feb 2012 15:44:34 -0600 Subject: Added generics (part 4). This patch brings down the warnings from 3427 to 2917. Ticket #2 --- .../common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java') diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java index 828ef0e6c..95c777701 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java +++ b/pki/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java @@ -284,7 +284,7 @@ public class SrchKeyForRecovery extends CMSServlet { timeLimit = mTimeLimits; } CMS.debug("Start searching ... timelimit=" + timeLimit); - Enumeration e = mKeyDB.searchKeys(filter, maxResults, timeLimit); + Enumeration e = mKeyDB.searchKeys(filter, maxResults, timeLimit); int count = 0; if (e == null) { @@ -292,8 +292,7 @@ public class SrchKeyForRecovery extends CMSServlet { null); } else { while (e.hasMoreElements()) { - IKeyRecord rec = (IKeyRecord) - e.nextElement(); + IKeyRecord rec = e.nextElement(); // rec is null when we specify maxResults // DS will return an err=4, which triggers // a LDAPException.SIZE_LIMIT_ExCEEDED -- cgit