Hi all,
I let findBugs chew on the jbpm-3.1.4.jar and it spit 220 errors and warnings. The
reported errors are classified in 4 categories each with their own bug patterns, bug kinds
and priority. For me the annoying "errors" are those related to correctness as
it entails that the code does not do what the programmer intended in the first place.
There are two such categories: correctness and multithreaded correctness. I list the
reported error below.
Being a static code analyzer findBugs only looks at the bytecode so some of these
"errors" may never surface in the application.
How can one go about to submit patches for these issues?
Best regards,
Johan
Multithreaded correctness bugs
anonymous wrote : M M DC_DOUBLECHECK DC: Possible doublecheck on
org.jbpm.jpdl.el.impl.BeanInfoManager.mInitialized in
org.jbpm.jpdl.el.impl.BeanInfoManager.checkInitialized(Logger) At
BeanInfoManager.java:[lines 198-200]
| M M IS2_INCONSISTENT_SYNC IS: Inconsistent synchronization of
org.jbpm.jpdl.el.impl.BeanInfoManager.mInitialized; locked 66% of time Unsynchronized
access at BeanInfoManager.java:[line 198]
| M M IS2_INCONSISTENT_SYNC IS: Inconsistent synchronization of
org.jbpm.persistence.db.DbPersistenceServiceFactory.configuration; locked 75% of time
Unsynchronized access at DbPersistenceServiceFactory.java:[line 146]
| M M IS2_INCONSISTENT_SYNC IS: Inconsistent synchronization of
org.jbpm.persistence.db.DbPersistenceServiceFactory.schemaExport; locked 75% of time
Unsynchronized access at DbPersistenceServiceFactory.java:[line 152]
| M M IS2_INCONSISTENT_SYNC IS: Inconsistent synchronization of
org.jbpm.persistence.db.DbPersistenceServiceFactory.sessionFactory; locked 66% of time
Unsynchronized access at DbPersistenceServiceFactory.java:[line 155]
| M M STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE STCAL: Call to method of static
java.text.DateFormat in org.jbpm.scheduler.exe.Timer.toString() At Timer.java:[line 140]
| M M STCAL_STATIC_SIMPLE_DATA_FORMAT_INSTANCE STCAL: Found static field of type
java.text.DateFormat in org.jbpm.scheduler.exe.Timer.dateFormat In Timer.java
| M M STCAL_STATIC_SIMPLE_DATA_FORMAT_INSTANCE STCAL: Found static field of type
java.text.DateFormat in org.jbpm.scheduler.impl.SchedulerMain.dateFormat In
SchedulerMain.java
| M M STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE STCAL: Call to method of static
java.text.DateFormat in
org.jbpm.scheduler.impl.SchedulerMain$LogListener.timerExecuted(Date, Timer) At
SchedulerMain.java:[line 60]
|
Correctness bugs
anonymous wrote : M C NP_UNWRITTEN_FIELD NP: Read of unwritten field taskInstance in
org.jbpm.command.TaskInstanceEndCommand.execute() At TaskInstanceEndCommand.java:[line
36]
| M C NP_UNWRITTEN_FIELD NP: Read of unwritten field taskInstance in
org.jbpm.command.TaskInstanceEndCommand.execute() At TaskInstanceEndCommand.java:[line
38]
| H C UWF_NULL_FIELD UwF: Field only ever set to null:
org.jbpm.command.TaskInstanceEndCommand.taskInstance At TaskInstanceEndCommand.java:[line
31]
| M C NP_UNWRITTEN_FIELD NP: Read of unwritten field className in
org.jbpm.context.exe.matcher.ClassNameMatcher.matches(Object) At
ClassNameMatcher.java:[line 40]
| M C NP_UNWRITTEN_FIELD NP: Read of unwritten field className in
org.jbpm.context.exe.matcher.ClassNameMatcher.matches(Object) At
ClassNameMatcher.java:[line 46]
| H C UWF_NULL_FIELD UwF: Field only ever set to null:
org.jbpm.context.exe.matcher.ClassNameMatcher.className At ClassNameMatcher.java:[line
30]
| M C RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE RCN: Nullcheck of tokens at line 405
of value previously dereferenced in
org.jbpm.db.GraphSession.deleteProcessInstance(ProcessInstance, boolean, boolean, boolean)
At GraphSession.java:[line 374]
| M C DMI_INVOKING_TOSTRING_ON_ARRAY DMI: Invocation of toString on an array in
org.jbpm.db.TaskMgmtSession.findTaskInstances(String[]) At TaskMgmtSession.java:[line
89]
| M C NP_NULL_ON_SOME_PATH_EXCEPTION NP: Possible null pointer dereference of outputMap
in org.jbpm.graph.node.Fork.execute(ExecutionContext) on exception path Dereferenced at
Fork.java:[line 108]
| M C BC_IMPOSSIBLE_INSTANCEOF BC: instanceof will always return false in
org.jbpm.graph.node.Join.execute(ExecutionContext), since a java.util.Map can't be a
java.lang.Boolean At Join.java:[line 121]
| H C RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE RCN: Nullcheck of method at line 42
of value previously dereferenced in
org.jbpm.instantiation.BeanInstantiator.setPropertyValue(Class, Object, String, Element)
At BeanInstantiator.java:[line 39]
| M C IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN IP: The parameter processDefinition to
org.jbpm.jpdl.par.JpdlArchiveParser.readFromArchive(ProcessArchive, ProcessDefinition) is
dead upon entry but overwritten At JpdlArchiveParser.java:[line 51]
| M C NP_NULL_ON_SOME_PATH_EXCEPTION NP: Possible null pointer dereference of node in
org.jbpm.jpdl.xml.JpdlXmlReader.readNodes(Element, NodeCollection) on exception path
Dereferenced at JpdlXmlReader.java:[line 227]
| M C NP_NULL_PARAM_DEREF NP: Method call in
org.jbpm.jpdl.xml.JpdlXmlReader.createAction(Element) passes null for unconditionally
dereferenced parameter of readAction(Element, Action) Method invoked at
JpdlXmlReader.java:[line 591]
-
http://findbugs.sf.net
- btw an eclipse plugin exists
- Presentation @google
http://video.google.com/videoplay?docid=-8150751070230264609
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067716#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...