[Pki-devel] [PATCH] 0017-call-statics-statically

Adam Young ayoung at redhat.com
Tue Dec 6 15:21:41 UTC 2011


On 12/05/2011 10:41 PM, Ade Lee wrote:
> pki/base/common/src/com/netscape/cms/logging/LogFile.java :
>   -- remove unused variable logStatus and logSigning
>
> OCSPServlet.java - remove unused variable urldecoder
>
> CryptoUtil.java: remove unused variable sigAlgId
>                   this will also remove a deprecation.
>
> GenericASN1Extension.java : this just looks wrong


I agree it looks wrong,  but the change is actually in keeping with haw 
the pattern vairable was used.  I think the mistake is that pattern 
should not be  static.
Changing it from static to private  does not bring in any compilation 
warnings
  but that constructror in general looks wrong
NAME = name;
         OID = oid;
          mConfig = config;
  those are all statics.
  the problem is, I think,  with the NAME field.  I was digging through 
that during the Generics cleanup and here's what I think is supposed to 
happen:  for most extensions,  they use the name as a static field for 
al ook up:  crete a new instance of this kind of class for that 
extension, the vast majority of them have NAME match the  
classname...some with the word extension, some without.

  GenericASN1Extension does not work that way.  Generic is defined at 
run time,  so this implementation says to me that there can really only 
ever be one extension defined,  but nothing ever enfroces that
  so I think that this change,  while weird,  is strictly speaking 
correct.  I suggest we make the change,  and open a ticket to deal with 
the Statics in this class.

> PKCS8Key.java : same thing here

Here the static is a key used, and should be a constant 0.  Changing it 
to the proper naming convention.



Updated patch attached.

>
> Ade
>
>
>
> On Sun, 2011-12-04 at 23:42 -0500, Ade Lee wrote:
>> This patch does not apply cleanly for me on the new repo.
>>
>> Does it apply for anyone else?
>> Ade
>>
>> On Fri, 2011-12-02 at 17:03 -0500, Adam Young wrote:
>>> On 11/14/2011 10:48 AM, Adam Young wrote:
>>>> On 11/10/2011 10:30 PM, Adam Young wrote:
>>>>> _______________________________________________
>>>>> Pki-devel mailing list
>>>>> Pki-devel at redhat.com
>>>>> https://www.redhat.com/mailman/listinfo/pki-devel
>>>>
>>>>
>>>> _______________________________________________
>>>> Pki-devel mailing list
>>>> Pki-devel at redhat.com
>>>> https://www.redhat.com/mailman/listinfo/pki-devel
>>> Rebased on top of the current master
>>> _______________________________________________
>>> Pki-devel mailing list
>>> Pki-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/pki-devel
>>
>> _______________________________________________
>> Pki-devel mailing list
>> Pki-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/pki-devel
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dogtag-admiyo-0017-2-call-statics-statically.patch
URL: <http://listman.redhat.com/archives/pki-devel/attachments/20111206/e9f5d325/attachment.ksh>


More information about the Pki-devel mailing list