users@jaxb.java.net

Re: warnings for unchecked calls on j2sdk1.5

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 12 Apr 2004 09:56:07 -0700

> 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."


> 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 <T>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