[Pki-devel] [Patch] 0002-Big-numbers-fix-for-CA-and-DRM

Andrew Wnuk awnuk at redhat.com
Fri Jan 13 17:24:19 UTC 2012


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 at redhat.com
>> https://www.redhat.com/mailman/listinfo/pki-devel
>




More information about the Pki-devel mailing list