[jdom-interest] Java 1.5 language features.

Talden talden at gmail.com
Sun Feb 25 17:56:05 PST 2007


Or you release a new version with generics and introduce maintenance
builds for the 1.4 supporting version when and if bugs need to be
fixed.  You can't wait for an entire user.base to move on - there are
still people using 1.1.x after all.

NB: @SuppressWarnings really should be the exception rather than the
rule (EG filling in those edge cases where Suns partial generics
implementation shows its gaps).  I wouldn't want to have to pepper the
code with suppression for every touch point where we use JDOM.

--
Talden

On 2/26/07, Jason Hunter <jhunter at servlets.com> wrote:
> Michael Kay wrote:
> >> Is there any effort being placed towards introducing Java 1.5
> >> language features into the JDOM API?
> >
> > I've got the same issue with Saxon. I would love to introduce generics into
> > the API, but there are still too many users on 1.4 who can't be left behind.
> >
> > At the moment with Saxon I'm thinking of introducing a 1.5 API that uses
> > generics, to sit alongside the 1.4 API. I'm also thinking of sitting it out
> > and waiting until 1.4 is no longer a requirement. It's not easy to decide
> > between these two options, and the same applies I'm sure to JDOM.
>
> Exactly.  You either drop support for Java 1.4 (that's premature I think
> still), skip features introduced in Java 1.5 (the present course of
> action), or produce two JARs (a potential source of subtle bugs).
>
> It's indeed unfortunate that the warnings are so prevalent in Java 1.5,
> especially for code patterns that in Java 1.4 are the best code possible
> to write.  They provided us with @SuppressWarnings, but of course that
> requires Java 1.5.
>
> -jh-
>


More information about the jdom-interest mailing list