users@jersey.java.net

Re: [Jersey] Changes (fixes?) during wadl improvement

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Wed, 18 Jun 2008 10:24:10 +0200

Hi Martin,

On Wed, Jun 18, 2008 at 09:00:36AM +0200, Martin Grotzke wrote:
> Hi,
>
> while working on the wadl-improvement, I changed two things, as
> otherwise the build did not go through for me. I just want to mention
> them so that you (Paul, Jakub) can have a look at them and confirm if
> they are correct or what might be the reason (I didn't take much time to
> check the issues).
>
> 1) The path in jersey/build.xml for jflex was not reflecting the renamed
> packages:
>
> Index: jersey/build.xml
> ===================================================================
> --- jersey/build.xml (revision 1081)
> +++ jersey/build.xml (working copy)
> @@ -487,7 +487,7 @@
> <java jar="lib/aux/JFlex.jar" fork="true">
> <arg value="--nobak"/>
> <arg value="-d"/>
> - <arg path="src/impl/com/sun/ws/rest/impl/json/reader"/>
> + <arg path="src/impl/com/sun/jersey/impl/json/reader"/>
> <arg value="etc/json.flex"/>
> </java>
> </target>

Good catch! In fact, there is a need to update [etc/json.flex] as well.
I will do that on my own, you can then merge the above mentioned change to the main trunk.

Thanks,

~Jakub

>
>
> 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.
>
> For now I commit these changes in the wadl-improvement branch, before we
> do the merge you should have had a look at these things and
> confirmed/rejected.
>
> Thanx && cheers,
> Martin
>



-- 
http://blogs.sun.com/japod