dev@glassfish.java.net

Re: ACTION: FindBugs 2.0

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Thu, 23 Feb 2012 00:18:17 -0800

You need to build the findbugs module manually. If you do a complete
build using gfbuild.sh, it will take care of that for you. Or, just
cd into the findbugs directory at the top and do "mvn install". Then
you should be able to run FindBugs in your other module.

Oh, and thanks for fixing these bugs!


Koper, Dies wrote on 02/22/2012 05:02 PM:
> I recently received one of those personalized reminders and I'd like to
> confirm my fix will not cause any new reminders.
> But I can't get findbugs to run locally:
>
> None of the below (ran in the web\web-core module) worked:
>
> mvn findbugs:findbugs
> mvn -Dfindbugs.threshold=Low findbugs:findbugs
> mvn -Prelease-phase1 install
> mvn -Dfindbugs.version=2.4.0 -Dfindbugs.threshold=Low findbugs:findbugs
>
> All give:
>
> [ERROR] Failed to execute goal
> org.codehaus.mojo:findbugs-maven-plugin:2.4.0:findbugs (default-cli) on
> project web-core: Execution default-cli of goal
> org.codehaus.mojo:findbugs-maven-plugin:2.4.0:findbugs failed: Plugin
> org.codehaus.mojo:findbugs-maven-plugin:2.4.0 or one of its dependencies
> could not be resolved: Failure to find
> org.glassfish:findbugs:jar:4.0-SNAPSHOT in
> http://maven.glassfish.org/content/groups/glassfish was cached in the
> local repository, resolution will
> not be reattempted until the update interval of glassfish-repo-archive
> has elapsed or updates are forced -> [Help 1]
>
> Please advise.
>
> Also, I checked on hudson, but yesterday's run found 0 warnings. Is it
> not configured yet to include Low priority bugs?
>
> Thanks,
> Dies
>
>
>> -----Original Message-----
>> From: Bill Shannon [mailto:bill.shannon_at_oracle.com]
>> Sent: Thursday, 16 February 2012 9:27 AM
>> To: dev_at_glassfish.java.net
>> Subject: Re: ACTION: FindBugs 2.0
>>
>> I've checked in the change that updates us to FindBugs 2.0.
>>
>> All the bugs listed below have already been fixed. Thank you to
> everyone
>> for taking care of that so quickly!
>>
>> Let me know of any problems.
>>
>> Bill Shannon wrote on 02/07/12 12:29:
>>> Next Wednesday (Feb 15) we'll be converting to the newest version of
>>> FindBugs. This new version detects additional bugs, described here:
>>> http://findbugs.sourceforge.net/findbugs2.html#newBugPatterns
>>>
>>> Some of these newly detected bugs are high priority bugs and MUST BE
>> FIXED
>>> immediately, per our rules:
>>> https://wikis.oracle.com/display/GlassFish/FindBugs
>>>
>>> If any of these bugs aren't fixed (or excluded), they'll prevent us
> from
>>> promoting builds.
>>>
>>> Within Oracle, you can view these new bug instances here:
>>> http://hudson-sca.us.oracle.com/job/glassfish-findbugs-
>> shannon/43/findbugsResult/
>>>
>>> The complete list is below. Owners will be getting personalized
> reminders
>>> shortly.
>>>
>>> The most popular new bugs are these:
>>> http://findbugs.sourceforge.net/bugDescriptions.html#SE_BAD_FIELD
>>>
>> http://findbugs.sourceforge.net/bugDescriptions.html#ML_SYNC_ON_FIEL
>> D_TO_GUARD_CHANGING_THAT_FIELD
>>>
>>>
>> http://findbugs.sourceforge.net/bugDescriptions.html#RC_REF_COMPARIS
>> ON_BAD_PRACTICE
>>>
>>>
>>> Owners of other workspaces that are also using FindBugs should
> contact
>>> me to coordinate the conversion to FindBugs 2.0.
>>>
>>>
>>> If you want to run FindBugs 2.0 yourself before this switch, add
>>> "-Dfindbugs.version=2.4.0" to your mvn command.
>>>
>>>
>>> -----
>>> appserver/persistence/cmp/support-
>> sqlstore/src/main/java/com/sun/jdo/spi/persistence/support/sqlstore/im
>> pl/PersistenceManagerFactoryImpl.java:70:
>>> SE_BAD_FIELD: Class
>>>
>>
> com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFact
> o
>> ryImpl
>>> defines non-transient non-serializable instance field
> connectionLogWriter
>>>
>>
> appserver/persistence/cmp/utility/src/main/java/com/sun/jdo/spi/persist
>> ence/utility/WeakValueHashMap.java:68:
>>> SE_BAD_FIELD: Class
>> com.sun.jdo.spi.persistence.utility.WeakValueHashMap defines
>>> non-transient non-serializable instance field queue
>>> appserver/ejb/ejb-
>>
> container/src/main/java/com/sun/ejb/containers/util/pool/AbstractPool.ja
>> va:360:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> AbstractPool.list in futile attempt to guard it
>>> appserver/verifier/verifier-
>>
> impl/src/main/java/com/sun/enterprise/tools/verifier/tests/webservices/
>> HandlerPortNameCheck.java:78:
>>> BC_IMPOSSIBLE_CAST: Impossible cast from
>>> com.sun.enterprise.deployment.WebServiceHandlerChain to
>>> com.sun.enterprise.deployment.WebServiceHandler in
>>>
>>
> com.sun.enterprise.tools.verifier.tests.webservices.HandlerPortNameCheck
> .
>> check(WebServiceEndpoint)
>>>
>>>
>> appserver/admingui/common/src/main/java/org/glassfish/admingui/com
>> mon/tree/ListTreeAdaptor.java:147:
>>> RC_REF_COMPARISON_BAD_PRACTICE: Suspicious comparison of a
>> Integer reference to
>>> constant in
>>>
>>
> org.glassfish.admingui.common.tree.ListTreeAdaptor.getChildTreeNodeObje
>> cts(Object)
>>>
>> appserver/admingui/common/src/main/java/org/glassfish/admingui/com
>> mon/tree/ListTreeAdaptor.java:324:
>>> RC_REF_COMPARISON_BAD_PRACTICE: Suspicious comparison of a
>> Integer reference to
>>> constant in
>>>
>> org.glassfish.admingui.common.tree.ListTreeAdaptor.getFacets(UICompone
>> nt, Object)
>>>
>> appserver/admingui/common/src/main/java/org/glassfish/admingui/com
>> mon/tree/ListTreeAdaptor.java:214:
>>> RC_REF_COMPARISON_BAD_PRACTICE: Suspicious comparison of a
>> Integer reference to
>>> constant in
>>>
>>
> org.glassfish.admingui.common.tree.ListTreeAdaptor.getFactoryOptions(Ob
>> ject)
>>>
>> appserver/admingui/common/src/main/java/org/glassfish/admingui/com
>> mon/tree/ListTreeAdaptor.java:296:
>>> RC_REF_COMPARISON_BAD_PRACTICE: Suspicious comparison of a
>> Integer reference to
>>> constant in
>> org.glassfish.admingui.common.tree.ListTreeAdaptor.getId(Object)
>>> appserver/web/web-
>> glue/src/main/java/com/sun/enterprise/web/VirtualServer.java:157:
>>> SE_BAD_FIELD: Class com.sun.enterprise.web.VirtualServer defines
> non-
>> transient
>>> non-serializable instance field accessLogValve
>>> appserver/web/web-
>> glue/src/main/java/com/sun/enterprise/web/VirtualServer.java:157:
>>> SE_BAD_FIELD: Class com.sun.enterprise.web.VirtualServer defines
> non-
>> transient
>>> non-serializable instance field config
>>> appserver/web/web-
>> glue/src/main/java/com/sun/enterprise/web/VirtualServer.java:157:
>>> SE_BAD_FIELD: Class com.sun.enterprise.web.VirtualServer defines
> non-
>> transient
>>> non-serializable instance field factory
>>> appserver/web/web-
>> glue/src/main/java/com/sun/enterprise/web/VirtualServer.java:157:
>>> SE_BAD_FIELD: Class com.sun.enterprise.web.VirtualServer defines
> non-
>> transient
>>> non-serializable instance field grizzlyService
>>> appserver/web/web-
>> glue/src/main/java/com/sun/enterprise/web/VirtualServer.java:157:
>>> SE_BAD_FIELD: Class com.sun.enterprise.web.VirtualServer defines
> non-
>> transient
>>> non-serializable instance field webContainer
>>> appserver/web/web-
>>
> core/src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java:
>> 829:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ApplicationHttpRequest.parameters in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardContext.java:120:
>>> SE_BAD_FIELD: Class org.apache.catalina.core.StandardContext defines
>>> non-transient non-serializable instance field alternateDocBases
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardContext.java:120:
>>> SE_BAD_FIELD: Class org.apache.catalina.core.StandardContext defines
>>> non-transient non-serializable instance field filterRegisMap
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardContext.java:120:
>>> SE_BAD_FIELD: Class org.apache.catalina.core.StandardContext defines
>>> non-transient non-serializable instance field messageDestinations
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardContext.java:120:
>>> SE_BAD_FIELD: Class org.apache.catalina.core.StandardContext defines
>>> non-transient non-serializable instance field servletRegisMap
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardServer.java:445:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> StandardServer.services in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardServer.java:633:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> StandardServer.services in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardService.java:322:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> StandardService.connectors in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/catalina/core/StandardService.java:440:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> StandardService.connectors in futile attempt to guard it
>>> appserver/web/web-
>>
> core/src/main/java/org/apache/catalina/servlets/DefaultServlet.java:165:
>>> SE_BAD_FIELD: Class org.apache.catalina.servlets.DefaultServlet
> defines
>>> non-transient non-serializable instance field alternateDocBases
>>> appserver/web/web-
>>
> core/src/main/java/org/apache/tomcat/util/modeler/ConstructorInfo.java:
>> 150:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ConstructorInfo.parameters in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/tomcat/util/modeler/ManagedBean.java:2
>> 58:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ManagedBean.attributes in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/tomcat/util/modeler/ManagedBean.java:2
>> 77:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ManagedBean.constructors in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/tomcat/util/modeler/ManagedBean.java:3
>> 08:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ManagedBean.notifications in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/tomcat/util/modeler/ManagedBean.java:3
>> 26:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> ManagedBean.operations in futile attempt to guard it
>>> appserver/web/web-
>>
> core/src/main/java/org/apache/tomcat/util/modeler/NotificationInfo.java:
>> 135:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> NotificationInfo.notifTypes in futile attempt to guard it
>>> appserver/web/web-
>> core/src/main/java/org/apache/tomcat/util/modeler/OperationInfo.java:2
>> 23:
>>> ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD:
>> Synchronization on
>>> OperationInfo.parameters in futile attempt to guard it
>>
>
>