On Wed, 2008-06-18 at 11:29 +0200, Paul Sandoz wrote:
> Martin Grotzke wrote:
> > 2) The InjectableProviderFactory didn't compile for me because of a
> > generics issue:
> >
> > Index: jersey/src/impl/com/sun/jersey/impl/application/InjectableProviderFactory.java
> > ===================================================================
> > --- jersey/src/impl/com/sun/jersey/impl/application/InjectableProviderFactory.java (revision 1081)
> > +++ jersey/src/impl/com/sun/jersey/impl/application/InjectableProviderFactory.java (working copy)
> > @@ -385,7 +385,7 @@
> > }
> > });
> >
> > - for (Constructor<T> con : c.getConstructors()) {
> > + for (Constructor<?> con : c.getConstructors()) {
> > List<Injectable> is = new ArrayList<Injectable>();
> > int ps = con.getParameterTypes().length;
> > for (int p = 0; p < ps; p++) {
> > @@ -400,7 +400,7 @@
> > }
> > is.add(i);
> > }
> > - cs.add(new ConstructorInjectablePair<T>(con, is));
> > + cs.add(new ConstructorInjectablePair<T>( (Constructor<T>)con, is));
> > }
> >
> > return cs.first();
> >
> > I'm running 1.6.0_04.
> >
>
> That does not compile for 1.5.x.
>
> In 1.5.x:
>
> public Constructor[] getConstructors()
> throws SecurityException
>
> In 1.6.x:
>
> public Constructor<?>[] getConstructors()
> throws SecurityException
>
> I fixed it in the trunk a couple of days ago and used the non generic
> versions of Constructor.
Ok, I also changed this in the branch, so that the 1.6.x version won't
go into the trunk.
Cheers,
Martin
>
> Paul.