[jdom-interest] Java 1.5 language features.

Endre Stølsvik jdom at stolsvik.com
Tue Feb 27 05:54:24 PST 2007

Jason Hunter wrote:
> Talden wrote:
>> Is there work going on now (not yet released) that would make
>> introducing a 2.0 (Java 5 + required) and maintaining the old 1.0
>> (Java 1.4) a difficult endeavor?  Is there an issue with officially
>> marking the 1.4 support as 'maintenance only'?
> What happens when Software A uses JDOM 2.0 while Software B uses JDOM 
> 1.0, and you want to write Software C that uses both Software A and 
> Software B?  Can you just drop in JDOM 2.0, ignore JDOM 1.0, and have 
> Software B (built maybe against an old version of Java) satisfied? 
> Anyone have experience with this?

   " ... the assignment is legal, but it generates an unchecked warning.
The warning is needed, because the fact is that the compiler can't
guarantee its correctness. "
   " Now let's consider the inverse case. Imagine that Fooblibar.com
chose to convert their API to use generics, but that some of their
clients haven't yet. ... "

   " Earlier, we showed how new and legacy code can interoperate. Now,
it's time to look at the harder problem of "generifying" old code. "
   " You also need to ensure that the revised API retains binary
compatibility with old clients. This implies that the erasure of the API
must be the same as the original, ungenerified API. In most cases, this
falls out naturally, but there are some subtle cases. ... "

javac -source=1.5 -target=1.3  ?


More information about the jdom-interest mailing list