users@jaxb.java.net

Re: warnings for unchecked calls on j2sdk1.5

From: R Seth <rseth12312_at_yahoo.com>
Date: Mon, 12 Apr 2004 11:24:21 -0700 (PDT)

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!

   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. Since you guys are working towards that, could you give a rough idea of when that may happen?

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