[Pki-devel] [PATCH] 23 Fixes for READ_OBJECT_SYNC, WRITE_TO_STATIC_FIELD and some Miscellaneous cases in Coverty for DogTag 10

Endi Sukma Dewata edewata at redhat.com
Tue Jul 17 16:39:42 UTC 2012


On 7/13/2012 12:39 PM, Abhishek Koneru wrote:
> Please review the attached patch with fixes for the remaining issues in
> Coverity.

A few comments:

1. In CMSEngine.java please move the mServerCertNickname definition next 
to the other non-static members.

2. In CertUtils.java:845 the certusage could be null so you might want 
to check for both conditions:

   if (certusage == null || certusage.equals(""))

3. In GenericASN1Extension.java the class has 3 constructors. In the 
first two it sets the mConfig with the value from the parameter. 
However, in the last constructor the mConfig is not set. In the original 
code the mConfig is static, so the value depends on the execution of the 
first 2 constructors. This is not a good programming practice, but if we 
convert it to non-static a code using the third constructor may fail 
because the mConfig will always be null. I'd suggest we fix this in a 
separate ticket.

-- 
Endi S. Dewata





More information about the Pki-devel mailing list