quality@glassfish.java.net

Re: Findbugs update.

From: Geoffrey Halliwell <Geoffrey.Halliwell_at_Sun.COM>
Date: Fri, 28 Apr 2006 08:33:45 -0700

Hey - our quality alias is working!


Aditya Dada wrote On 04/27/06 21:53,:
> Thanks Jan for fixing Infinite loop #2. With that gone, glassfish is now
> of better quality ;)
>
> Jan Luehe changed the world a bit at a time, and said on 4/27/2006 9:39
> PM:
>
>
>>
>>Jan Luehe wrote On 04/26/06 17:07,:
>>
>>
>>>Hi Aditya,
>>>
>>>Aditya Dada wrote On 04/26/06 16:54,:
>>>
>>>
>>>>Sometime ago, I blogged about findbugs, and its use on glassfish.
>>>>(see: http://weblogs.java.net/blog/aditya_dada/)
>>>>Findbugs tool has been very helpful in finding out high priority
>>>>issues like infinite loops. In the past, and with the help of Jerome
>>>>Dochez, we were able to inform the teams whose code included an
>>>>infinite loop, and get it corrected. Some infinite loops present in
>>>>the third-party code is still out of our scope to get fixed during
>>>>timeframes that suit us. We have been able to reduce the number from
>>>>an all time high of 8 to 4, now. For those interested, here are the
>>>>culprits that still remain in Glassfish code:
>>>>
>>>>Infinite Loop #1
>>>> In class com.sun.messaging.jmq.util.CacheHashMap
>>>> In method com.sun.messaging.jmq.util.CacheHashMap.capacity()
>>>> At CacheHashMap.java:[line 43]
>>>>
>>>>Infinite Loop #2
>>>> In class com.sun.org.apache.commons.modeler.Registry
>>>> In method
>>>>com.sun.org.apache.commons.modeler.Registry.setServer(javax.management.MBeanServer)
>>>>
>>>> At Registry.java:[line 551]
>>>
>>>
>>>
>>>I've compared com.sun.org.apache.commons.modeler.Registry with the
>>>commons-modeler sources @Apache, and noticed the infinite loop has been
>>>fixed there.
>>>
>>>I will make a corresponding change to our local repository, as follows:
>>>
>>>Index: Registry.java
>>>===================================================================
>>>RCS file:
>>>/m/jws-mirror/jakarta-commons/com-sun-commons-modeler-1.1-src/src/java/com/sun/org/apache/commons/modeler/Registry.java,v
>>>
>>>retrieving revision 1.1
>>>diff -u -r1.1 Registry.java
>>>--- Registry.java 28 Feb 2006 20:55:03 -0000 1.1
>>>+++ Registry.java 27 Apr 2006 00:04:40 -0000
>>>@@ -548,7 +548,7 @@
>>> * @deprecated Use the instance method
>>> */
>>> public static void setServer(MBeanServer mbeanServer) {
>>>- Registry.getRegistry().setServer(mbeanServer);
>>>+ Registry.getRegistry().setMBeanServer(mbeanServer);
>>> }
>>>
>>> /**
>>>
>>>and will ask Terena to repromote commons-modeler.
>>
>>
>>Done!
>>
>>Infinite Loop #2 from above will have been resolved in the next
>>promoted build.
>>
>>
>>Jan
>>
>>
>>
>>>Thanks,
>>>
>>>
>>>Jan
>>>
>>>
>>>
>>>
>>>>Infinite Loop #3
>>>> In class com.sun.xml.stream.ZephyrWriterFactory
>>>> In method
>>>>com.sun.xml.stream.ZephyrWriterFactory.createXMLStreamWriter(javax.xml.transform.Result)
>>>>
>>>> At ZephyrWriterFactory.java:[line 85]
>>>>
>>>>Infinite Loop #4
>>>> In class oracle.toplink.essentials.sessions.Project
>>>> In method
>>>>oracle.toplink.essentials.sessions.Project.getClassDescriptorForAlias(String)
>>>>
>>>> At Project.java:[line 778]
>>>>
>>>>
>>>>While on the topic of FindBugs, I think it is appropriate to
>>>>mention, and applaud, the effort of the JSF team, that found, and
>>>>then fixed all high priority warnings found by Findbugs. Way to go
>>>>JSF team!
>>>>
>>>>-Aditya
>>>>
>>>
>