Previously if a certificate request page only has one entry the entry itself will be removed from the page, resulting in a blank page.
The QueryReq.trim() has been modified not to remove the marker entry if it's the only element in the list. https://fedorahosted.org/pki/ticket/2450 -- Endi S. Dewata
>From 3ab15d190aee113d88090c547fefa83b879de751 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" <[email protected]> Date: Thu, 26 Jan 2017 23:38:53 +0100 Subject: [PATCH] Fixed problem searching the latest certificate request. Previously if a certificate request page only has one entry the entry itself will be removed from the page, resulting in a blank page. The QueryReq.trim() has been modified not to remove the marker entry if it's the only element in the list. https://fedorahosted.org/pki/ticket/2450 --- base/server/cms/src/com/netscape/cms/servlet/request/QueryReq.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/server/cms/src/com/netscape/cms/servlet/request/QueryReq.java b/base/server/cms/src/com/netscape/cms/servlet/request/QueryReq.java index d05da103d1f2370f84768ca67353effce8d51c2d..376349b8a9764ce65e3f4e4ecdaa2f685fb9bc40 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/request/QueryReq.java +++ b/base/server/cms/src/com/netscape/cms/servlet/request/QueryReq.java @@ -503,6 +503,12 @@ public class QueryReq extends CMSServlet { */ private void trim(Vector<IRequest> v, RequestId marker) { int i = v.size() - 1; + + if (i == 0) { + // do not remove the only element in the list + return; + } + if (v.elementAt(i).getRequestId().toString().equals( marker.toString())) { v.remove(i); -- 2.5.5
_______________________________________________ Pki-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/pki-devel
