[jboss-dev] MC 2.2.x update

Adrian Brock abrock at redhat.com
Tue Jan 12 16:02:02 EST 2010


On Tue, 2010-01-12 at 21:34 +0100, Ales Justin wrote:
> Is there some formal docs on how to follow versioning wrt spi/api  
> changes?

Binary compatiblity is in the jls
http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html
You broke rule 13.4.6

But there is more to it than that.

e.g. 
Adding a method to an interface doesn't break existing classes
that implement it, providing you don't invoke the new method on that
class. 

But it does stop you recompiling the class without
implementing the method - which is a source incompatibility.

That's why it is better to add a new method using a mixin interface
and test whether the class implements it before invoking it.

There's no section on source compatibility in the jls. :-)

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss by Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list