Re: Fwd: Re: [SrcML] Java 1.5 update
Status: Beta
Brought to you by:
crashchaos
From: Dennis W. <den...@in...> - 2005-05-28 10:08:12
|
Dennis Waldherr wrote: > Frank Raiser wrote: > >> As I said we're compiling with -Xlint:unchecked now _and_ I've >> rewritten big parts of the code to minimize the amount of warnings >> by adding proper generics. This means there are no more occurences >> of List or Vector without a generic type specification added to it. >> As for my example method it was an invention only and I don't know >> if it exists as such in the source code (so it could very well be >> List<Method> by now). However that is not the point I'm trying to get >> across. >> The main problem is that it is no longer List.addAll(Collection c), >> but now we are implicitly calling List<E>.addAll(Collection<E> c) and >> we're running into the above 'problem' whenever the first and second E >> differ. >> >> >> > Well the List interface specifies addAll to be "|*addAll > <http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#addAll%28java.util.Collection%29>*(Collection > <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html><? > extends E > <http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html>> c)|" in > which the "second" E (being '?') may differ as long as it's subtype of > the first E. O o Ok this link garbage wasn't meant to be sent... actually I wanted to write addAll(<? extends Collection>) (good work Thunderbird :/ ) - Dennis |