Andrea Aime a écrit : > Hmm, gt2 trunk is meant to be built with java 1.5 anyways. > The error seem to be due to a different handling in generics between > 1.5 and 1.6? Do anyone know if they changed anything in 1.6 about that?
Yes there is some difference between 1.5 and 1.6 in corner cases, but from my experience with NumberRange 1.6 is usually better. For example: <N extends Number & Comparable<? super N>> NumberRange<N> convertAndCast(Range<? extends Number> range, Class<N> type) { // Some processing return new NumberRange<N>(type, range); } Is legal but fail with Java 1.5 will it is correcly accepted by Java 1.6. But I admit that this is convolved case. I have not hear about the opposite way around however (code accepted by Java 1.5 but failing with Java 1.6)... A temporary workaround (until someone resolve the case) is to force a unparameterized cast: wrap((Range) range); Break parameterized type safety, but at least fix the build in the maintime... Martin ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel