This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception. Bugs: 756133, 758505. This patch has been reviewed and tested for RHCS8 branches.
Andrew, I looked at your patch specifically for formatting issues. To do this, I applied your patch and then ran the eclipse formatter over the files that you had changed. I found differences -- mostly to do with spacing -- in the file QueryReq.java, as you can see below. I actually think that the changes suggested by the formatter make the code more readable in this case. Given that we have just gone through the exercise of formatting the entire code base - so that everything is correctly and uniformly formatted - I'm going to propose that we add the step of running the formatter over files /code that has changed prior to patch submission to the development process. If anyone thinks this is too stringent or onerous a requirement, speak up now. Ade --- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java +++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java @@ -419,18 +419,18 @@ public class QueryReq extends CMSServlet { id, jumptoend, filter, - ((count < 0)? count-1: count+1), + ((count < 0) ? count - 1 : count + 1), "requestId"); int maxCount = 0; if (count < 0 && jumptoend) { maxCount = -count; } else if (count < 0) { - maxCount = -count+1; + maxCount = -count + 1; } else { maxCount = count; } - int totalCount = (jumptoend)? maxCount: + int totalCount = (jumptoend) ? maxCount : (list.getSize() - list.getCurrentIndex()); header.addIntegerValue(OUT_TOTALCOUNT, totalCount); header.addIntegerValue(OUT_CURRENTCOUNT, list.getSize()); @@ -495,7 +495,7 @@ public class QueryReq extends CMSServlet { */ private void trim(Vector v, RequestId marker) { int i = v.size() - 1; - if (((IRequest)v.elementAt(i)).getRequestId().toString().equals( + if (((IRequest) v.elementAt(i)).getRequestId().toString().equals( marker.toString())) { v.remove(i); } @@ -535,9 +535,9 @@ public class QueryReq extends CMSServlet { */ private Vector normalizeOrder(Vector list) { - BigInteger firstrequestnum = new BigInteger(((IRequest)list.elementAt(0)) + BigInteger firstrequestnum = new BigInteger(((IRequest) list.elementAt(0)) .getRequestId().toString()); - BigInteger lastrequestnum = new BigInteger(((IRequest)list.elementAt(list + BigInteger lastrequestnum = new BigInteger(((IRequest) list.elementAt(list .size() - 1)).getRequestId().toString()); boolean reverse = false; if (firstrequestnum.compareTo(lastrequestnum) > 0) { On Thu, 2012-01-12 at 17:47 -0800, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
On 01/13/2012 07:28 AM, Ade Lee wrote:
Andrew,
I looked at your patch specifically for formatting issues. To do this, I applied your patch and then ran the eclipse formatter over the files that you had changed. I found differences -- mostly to do with spacing -- in the file QueryReq.java, as you can see below.
I actually think that the changes suggested by the formatter make the code more readable in this case.
Given that we have just gone through the exercise of formatting the entire code base - so that everything is correctly and uniformly formatted - I'm going to propose that we add the step of running the formatter over files /code that has changed prior to patch submission to the development process. If anyone thinks this is too stringent or onerous a requirement, speak up now.
Please create corresponding "how-to" page.
Ade
--- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java +++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java @@ -419,18 +419,18 @@ public class QueryReq extends CMSServlet { id, jumptoend, filter, - ((count< 0)? count-1: count+1), + ((count< 0) ? count - 1 : count + 1), "requestId");
int maxCount = 0; if (count< 0&& jumptoend) { maxCount = -count; } else if (count< 0) { - maxCount = -count+1; + maxCount = -count + 1; } else { maxCount = count; } - int totalCount = (jumptoend)? maxCount: + int totalCount = (jumptoend) ? maxCount : (list.getSize() - list.getCurrentIndex()); header.addIntegerValue(OUT_TOTALCOUNT, totalCount); header.addIntegerValue(OUT_CURRENTCOUNT, list.getSize()); @@ -495,7 +495,7 @@ public class QueryReq extends CMSServlet { */ private void trim(Vector v, RequestId marker) { int i = v.size() - 1; - if (((IRequest)v.elementAt(i)).getRequestId().toString().equals( + if (((IRequest) v.elementAt(i)).getRequestId().toString().equals( marker.toString())) { v.remove(i); } @@ -535,9 +535,9 @@ public class QueryReq extends CMSServlet { */ private Vector normalizeOrder(Vector list) {
- BigInteger firstrequestnum = new BigInteger(((IRequest)list.elementAt(0)) + BigInteger firstrequestnum = new BigInteger(((IRequest) list.elementAt(0)) .getRequestId().toString()); - BigInteger lastrequestnum = new BigInteger(((IRequest)list.elementAt(list + BigInteger lastrequestnum = new BigInteger(((IRequest) list.elementAt(list .size() - 1)).getRequestId().toString()); boolean reverse = false; if (firstrequestnum.compareTo(lastrequestnum)> 0) {
On Thu, 2012-01-12 at 17:47 -0800, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
On 01/12/2012 05:47 PM, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
Attached automatically reformatted big number patch.
On 01/13/2012 12:27 PM, Andrew Wnuk wrote:
On 01/12/2012 05:47 PM, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
Attached automatically reformatted big number patch.
Corrected attachment.
Worked with Ade to attempt to clear up some Formatting issues on this one. He presented instructions on how to proceed which is what I performed. Hopefully re-formatted patch has been pushed. ----- Original Message ----- From: "Andrew Wnuk" <awnuk@redhat.com> To: pki-devel@redhat.com Sent: Friday, January 13, 2012 1:16:53 PM Subject: Re: [Pki-devel] [Patch] 0002-Big-numbers-fix-for-CA-and-DRM On 01/13/2012 12:27 PM, Andrew Wnuk wrote:
On 01/12/2012 05:47 PM, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
Attached automatically reformatted big number patch.
Corrected attachment. _______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
On 01/13/2012 05:19 PM, John Magne wrote:
Worked with Ade to attempt to clear up some Formatting issues on this one.
He presented instructions on how to proceed which is what I performed.
Hopefully re-formatted patch has been pushed. Pushed to DOGTAG_9_BRANCH.
----- Original Message ----- From: "Andrew Wnuk"<awnuk@redhat.com> To: pki-devel@redhat.com Sent: Friday, January 13, 2012 1:16:53 PM Subject: Re: [Pki-devel] [Patch] 0002-Big-numbers-fix-for-CA-and-DRM
On 01/13/2012 12:27 PM, Andrew Wnuk wrote:
On 01/12/2012 05:47 PM, Andrew Wnuk wrote:
This patch resolves multiple issues related to use of big numbers on CA and DRM It also provides a fix for incomplete recovery requests causing null pointer exception.
Bugs: 756133, 758505.
This patch has been reviewed and tested for RHCS8 branches.
Attached automatically reformatted big number patch.
Corrected attachment.
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
participants (3)
-
Ade Lee -
Andrew Wnuk -
John Magne