Re: JDOM 1.1 released!

Victor Toni <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
Michael Kay wrote:
>> Can anyone cite what other projects have done in this 
>> situation? 
>>     
>
> Saxon 9.0 has introduced a new API, s9api, that exploits generics. Existing
> users can continue to use older APIs. I'm hoping I can drop JDK 1.4 support
> within a year or so - I suspect that people who need to stick with old Java
> releases have no great urgency to move to new Saxon releases. 
>
> For JDOM, version 1.0 (and hopefully 1.1) are very stable, and I think you
> could safely adopt the position "if you want to use an old JDK, then you can
> use an old JDOM as well".
>
> Michael Kay
> http://www.saxonica.com/
>   

I suspect that enhancing JDOM with Generics is not as trivial as one 
would think especially when one wants to go the whole way. One of the 
reasons is erasure:
An example:

In AttributeList there are these two methods:
    void add(int,Attribute);
    public void add(int,Object);


Enhancing AttributeList with Generics would result in something like:
AttributeList<A extends Attribute> {
    void add(int,Attribute);
    public void add(int,A);
}

which is not allowed. Reducing the code to
AttributeList<A extends Attribute> {
    public void add(int,A);
}
is possible but will break some code. I worry that a "JDOM 1.5" can't be 
drop in replacement...


Victor Toni
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.