lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: 2.9/3.0 plan & Java 1.5
Date Sat, 13 Dec 2008 22:25:31 GMT
Parameterization of input parameters is also compile-compatible, you only
get warnings. You are still able to compile old java programs without
generics using new Java versions (this is how Java itself solves the
compatibility problem) The whole Java collection API uses generics, and you
can simply use it completely without generics.

You only have problems, if somebody uses generics is his own code around
Lucene and the new Lucene API uses other parameterization than this user
(e.g. closer types etc.). But most time this code would not work before,
too.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Yonik Seeley [mailto:yseeley@gmail.com]
> Sent: Saturday, December 13, 2008 11:16 PM
> To: java-dev@lucene.apache.org
> Subject: Re: 2.9/3.0 plan & Java 1.5
> 
> Parametrization of return types should be fully back compatible.
> Parameterization of input parameters would be run-time compatible (due
> to type erasure), but not compile-time compatible.
> 
> -Yonik
> 
> On Sat, Dec 13, 2008 at 5:07 PM, Michael McCandless
> <lucene@mikemccandless.com> wrote:
> >
> > Grant Ingersoll wrote:
> >
> >> IIRC, we also agreed that we didn't feel any compelling reason to make
> a
> >> sweeping change to generics, but would likely just add them as we see
> 'em,
> >> unless of course someone wants to do a wholesale patch.
> >
> > I like that approach.
> >
> >> In the case of generics, I see no reason why we can't intro them over
> >> time, people using the non-generic forms will still work.
> >
> > I don't fully understand the back compatibility of generics, but I did
> try
> > changing Document.getFields to return List<Fieldable> and even
> List<Integer>
> > (hmm), as well as separately changing a caller of that API to assign to
> a
> > List<Fieldable> type, and things compile & test fine.
> >
> > Does anyone know of any gotchyas that'd happen if in fact we slowly over
> > time changed existing APIs to use generics?
> 
> 
> > EG I haven't yet tested for JAR drop-in compatibility, eg if in 3.1 we
> > wanted to swap in more generics, would a 3.0 app be able to drop in the
> 3.1
> > Lucene jar w/o problems?
> >
> > Mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message