The Jexl 2.0 branch now has only a few binary incompatibilities
reported by Clirr.

According to the JLS [1], adding methods to an interface does not
break *binary* compatibility; however of course it will break source
compatibility.
Either Clirr is not distinguishing the binary/source cases, or it gets it wrong.
The test case that I added to the 2.0.1 test branch confirms that new
methods *can* be added.

This just leaves the following errors, which do cause binary
compatibilty problems:

ERROR: 7006: org.apache.commons.jexl2.JexlEngine: Return type of
method 'protected org.apache.commons.jexl2.JexlInfo
createInfo(java.lang.String, int, int)' has been changed to
org.apache.commons.jexl2.DebugInfo
ERROR: 7006: org.apache.commons.jexl2.JexlEngine: Return type of
method 'protected org.apache.commons.jexl2.JexlInfo debugInfo()' has
been changed to org.apache.commons.jexl2.DebugInfo

Now DebugInfo implements JexlInfo, and I think the method return types
could/should be reverted to the original, i.e. JexlInfo.

I've tested locally, and found that reverting to JexlInfo as the
return type for the two methods does not cause any tests to fail.

This is because currently the code accesses the DebugInfo class via
JexlInfo#getDebugInfo().

WDYT? Would that be OK?

If required, the additional DebugInfo methods could be added to the
JexlInfo interface, after all the Javadoc says:

"Interface for objects carrying information usefull to debugging."

The change needed to JexlEngine turns out to be very simple, basically
just using JexlInfo instead of DebugInfo.

[1] 
http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html#45347

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to