admin@glassfish.java.net

Re: CODE REVIEW: FindBugs fixes (DLS dead store [more])

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Thu, 27 Sep 2007 12:31:49 -0500

Lloyd L Chambers wrote:
> Is that true for *both* the appserv-commons code and admin-core code?
Probably best to ask him.

I wrote to Jagadesh about the ones in clientbeans. I mentioned to him
that there were other generated classes in other packages that he might
want to address but I did not specifically refer to other FindBugs warnings.

- Tim
>
> On Sep 25, 2007, at 5:24 PM, Timothy Quinn wrote:
>
>>
>> Jagadesh is already pursuing this with the NB/schema2beans folks. I
>> believe he has also placed these files on the FindBugs exclusion list.
>>
>> Kedar Mhaswade wrote:
>>> AFAIK, this is generated code and we should let schema2beans know about
>>> it.
>>>
>>> - Kedar
>>>
>>> Lloyd L Chambers wrote:
>>>> Same situation in
>>>> appserv-commons/com/sun/enterprise/config/clientbeans
>>>>
>>>> Index: src/java/com/sun/enterprise/config/clientbeans/CertDb.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/CertDb.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 CertDb.java
>>>> 139,141c139
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/ClientCredential.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/ClientCredential.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 ClientCredential.java
>>>> 252,254c252
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/ElementProperty.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/ElementProperty.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 ElementProperty.java
>>>> 139,141c139
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/MessageSecurityConfig.java
>>>>
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/MessageSecurityConfig.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 MessageSecurityConfig.java
>>>> 259,261c259
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/ProviderConfig.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/ProviderConfig.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 ProviderConfig.java
>>>> 320,322c320
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/RequestPolicy.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/RequestPolicy.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 RequestPolicy.java
>>>> 139,141c139
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/ResponsePolicy.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/ResponsePolicy.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 ResponsePolicy.java
>>>> 139,141c139
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index: src/java/com/sun/enterprise/config/clientbeans/Security.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/Security.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 Security.java
>>>> 166,168c166
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>> Index:
>>>> src/java/com/sun/enterprise/config/clientbeans/TargetServer.java
>>>> ===================================================================
>>>> RCS file:
>>>> /cvs/glassfish/appserv-commons/src/java/com/sun/enterprise/config/clientbeans/TargetServer.java,v
>>>>
>>>> retrieving revision 1.8
>>>> diff -r1.8 TargetServer.java
>>>> 200,202c200
>>>> < if(attr == null) return null;
>>>> < attr = attr.trim();
>>>> < return null;
>>>> ---
>>>> > return null;
>>>>
>>>>
>>>>
>>>> ---------------------------------------------
>>>>
>>>>
>>>> On Sep 25, 2007, at 3:33 PM, Lloyd L Chambers wrote:
>>>>
>>>>> (This is for the trunk)
>>>>>
>>>>> All of the form:
>>>>>
>>>>> DLS: Dead store to attr in
>>>>> <class>.getDefaultAttributeValue(String) (H)
>>>>>
>>>>> in
>>>>> admin-core/config-api/src/java/com/sun/enterprise/config/serverbeans
>>>>>
>>>>> Original code looks like:
>>>>> public static String getDefaultAttributeValue(String attr) {
>>>>> if(attr == null) return null;
>>>>> attr = attr.trim();
>>>>> return null;
>>>>> }
>>>>>
>>>>> Changed to:
>>>>> public static String getDefaultAttributeValue(String attr) {
>>>>> return null;
>>>>> }
>>>>>
>>>>> Looks like this has been there forever, no doubt a copy/paste
>>>>> thing. Certain other files insert code in between; these are
>>>>> files that don't do anything except return null.
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>