[jdom-interest] Java 1.5 language features.

Michael Kay mike at saxonica.com
Tue Feb 27 01:41:15 PST 2007


> As discussed previously on this list, adding generics but no 
> other new features should be backwards compatible with APIs 
> requiring JDOM 1.0, just like the generified java.util.* 
> collections in JDK 1.5 are backwards compatible with older APIs.

You need to be very careful what you mean by "backwards compatible".

I think the following statements are true:

(a) if the JDOM interfaces are changed to use generics, then the JDOM code
must be compiled under JDK 1.5, in which case it will only run under JDK 1.5
or later, and any client applications must therefore be run under JDK 1.5,
though they do not need to be recompiled.

(b) if you compile JDOM under 1.5, even without any source code changes, and
users drop it in as a replacement for the existing JAR file, then if they
are running 1.4 their applications will stop working.

Michael Kay
http://www.saxonica.com/



More information about the jdom-interest mailing list