[jdom-interest] Java 1.5 language features.

Talden talden at gmail.com
Tue Feb 27 02:53:25 PST 2007


The intention would be to provide a generic form of the same API such
that an application using JDOM 1.0 under java1.5 would be able to drop
in the generic version.

In reality this may not be possible as there are type-erasure cases
where signature conflicts prevent such a vanilla conversion (the
compiler prevents these combinations).

I have already checked out the head and once I get some free time I'll
make a first pass. If I establish that type-erasure conflicts will
force some subtle API changes I'll discuss these on the list.

--
Talden
http://www.flickr.com/photos/Talden


On 2/27/07, Michael Kay <mike at saxonica.com> wrote:
> > 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/
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>


More information about the jdom-interest mailing list