Just thought to run Findbugs on the code.

There are a lot of cases of the statement:

private Log appLog = LogFactory.getLog(...)

which appear in serializable classes.

However Log does not appear to be Serializable, so this will cause a
problem if the classes are serialised. So long as the Log fields are
private, they could just be made static and final.

==

org.apache.commons.scxml.io.SCXMLDigester.digest() has:
        if (scxml != null) {
            ModelUpdater.updateSCXML(scxml);
        }
        scxml.setLegacy(true); // could be null - should be in
previous if statement

==

Class org.apache.commons.scxml.model.Data defines non-transient
non-serializable instance field node

==

org.apache.commons.scxml.env.jexl.JexlEvaluator.evalCond(Context,
String) has Boolean return type and returns explicit null

org.apache.commons.scxml.env.jsp.ELEvaluator.evalCond(Context, String)
has Boolean return type and returns explicit null

These will cause problems if used later with autoboxing.

==

Inconsistent synchronization of
org.apache.commons.scxml.SCXMLExecutor.errorReporter; locked 76% of
time

Similarly for eventDispatcher, stateMachine, superStep in the same class

It appears that the class will be used in multiple threads, so if
those variables can be accessed from multiple threads, then all access
to them will need to be synchronized.

==

There are a few other Findbugs warnings - mainly in the test code. Let
me know if you want the full list (though if you use Eclipse, it's
probably easier to add the Findbugs plugin).

==

I also just noticed that there are a few instance fields that could be
made final - e.g. most of the items set up in the
org.apache.commons.scxml.SCInstance.SCInstance constructor.
This would improve thread-safety.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to