users@jaxb.java.net

Re: warnings for unchecked calls on j2sdk1.5

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Mon, 12 Apr 2004 14:48:31 -0400

R Seth wrote:

> Thanks for the reply. My comments are inlined..
>
> */Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>/* wrote:
>
>
> > But these are classes generated by JAXB binder for an input XML file.
> > JAXB binder parses the given XML file using an XML schema thus
> > generating these classes. If either the JAXB tool or the XML
> schema does
> > not support generation of "generics-savvy" classes (one example of
> > warning attached below), then it can not be fixed, right!
>
> Yep. But you see, it also has to be able to generate 1.3 compatible code
> as well. So all I'm saying is, if the only fix is to "generify" the
> code,
> then we have to introduce a compiler switch and so on, and given that we
> will be having a release soon-ish, I don't think we can start working on
> this fix right now. We also need to make relevant changes to our Java
> code generator library to handle JDK 1.5 concepts. That's what I meant
> by "it is going to take a while to get it done."
>
> >>Yep. But you see, it also has to be able to generate 1.3
> compatible code
>
> I apologise for not being conversant with the exact state of affairs
> in the JAXB project. I am guessing that the effort in your group is
> for future releases of JAXB. But it seems like you guys are also
> working on fixing current bugs. May be thats what you meant by
> generating compatible code for Java 1.3.. So I take it that there is
> no way to generate "clean" code (without warnings) using JAXB for
> Java 1.5!
>

We are working on both. The problem is that JAXB support for new JDK 1.5
language features is being handled by the JAXB 2.0 specification, which
is being actively developed by the JAXB expert group.

Even when JAXB 2.0 is released, it will still need to be able to generate
code that will run on pre-JDK 1.5 VM's. JDK 1.5 language extensions will
probably require compilation switches and schema customizations to support.

> But as we are using JAXB in our huge project that uses Java 1.5,
> there should be some hope that the new java1.5 compatible JAXB
> release is round the corner. Otherwise we will have to further think
> about continuing with Jaxb as the parsing tool.

As far as we know, JAXB 1.0.x is compatible with JDK 1.5 today. Are you
experiencing errors using JAXB with JDK 1.5 or is it just that you don't
like seeing all the warning messages?

> Since you guys are
> working towards that, could you give a rough idea of when that may
> happen?
>

There is no public timetable for its release, but I wouldn't expect it to
be "around the corner".

--Ryan

> Again thanks for help.
>
>
> > I guess I just want to understand how well compatible JAXB is
> with java
> > 1.5. If it is not then the classes generated by it are always
> going to
> > create little troubles like this when compiled with java 1.5.
>
> Since JDK1.5 should be backward compatible with JDK1.4, other than
> warnings, I'd expect it to work fully with JDK 1.5.
>
>
> > Any help or pointers is highly appreciated.
> > ----------------------------
> > jaxb/impl/runtime/GrammarInfoFacade.java:123: warning:
> [unchecked] unchecked call to toArray(T[]) as a member of the raw
> type java.util.ArrayList
> > (GrammarInfo[])(gis.toArray( new GrammarInfo[ gis.size() ] ) ) );
> > ----------------------------------------
>
> regards,
> --
> Kohsuke Kawaguchi
> Sun Microsystems kohsuke.kawaguchi_at_sun.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> <http://taxes.yahoo.com/filing.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net