commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Heuer <heue...@acm.org>
Subject Re: [collections] JDK1.5
Date Wed, 23 Jun 2004 22:30:16 GMT

I most definitely have the itch, but frankly, that's a lot of typing.  :(

[collections] HEAD compiles with 1.5 but as expected generates a pile of
unchecked warnings, such as

    [javac]
/home/heuer/working/jakarta-commons/collections/src/java/org/apache/commons/collections/set/MapBackedSet.java:130:
warning: [unchecked] unchecked call to removeAll(java.util.Collection<?>)
as a member of the raw type java.util.Set
    [javac]         return map.keySet().removeAll(coll);
    [javac]                                      ^
    [javac]
/home/heuer/working/jakarta-commons/collections/src/java/org/apache/commons/collections/set/MapBackedSet.java:134:
warning: [unchecked] unchecked call to retainAll(java.util.Collection<?>)
as a member of the raw type java.util.Set
    [javac]         return map.keySet().retainAll(coll);
    [javac]                                      ^
    [javac]
/home/heuer/working/jakarta-commons/collections/src/java/org/apache/commons/collections/set/MapBackedSet.java:146:
warning: [unchecked] unchecked call to <T>toArray(T[]) as a member of the
raw type java.util.Set
    [javac]         return map.keySet().toArray(array);


The tests don't compile because of some variables named 'enum' in
TestCollectionUtils.

Just add

# javac v1.5 support
maven.compile.source=1.5
maven.compile.target=1.5
maven.compile.fork=true
maven.compile.compilerargs=-Xlint:unchecked

to the [collections] project.properties to build with maven (rc3 & ant
1.6) and jdk 1.5 (beta3 build 56).

   michael


On Wed, 23 Jun 2004, Stephen Colebourne wrote:

> While release 3.1 is being tidied up (still time to vote ;-), I thought I'd
> just put out a note about JDK1.5.
>
> One of the key enhancements in JDK1.5 is generics which allows typed classes
> using the angle bracket notation. The biggest area this impacts is
> collections. Clearly questions have to be raised as to how this affects
> [collections].
>
> So far, I have done no work to see if [collections] will compile under
> JDK1.5. My expectation is that it will, but there are no guarantees.
>
> To take full advantage of generics will involve a considerable rewrite of
> [collections]. It will affect every class, and produce a version that only
> compiles on JDK1.5. I have no doubt that Sun spent many mandays changing the
> JDK classes to achieve this update.
>
> Personally, I have no plans to update [collections] to JDK1.5 (no itch, too
> much effort). If anyone else does, feel free to come in and either change
> [collections], or (more likely) create a new [collections15] project.
>
> Stephen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message