You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stuart Guthrie <sf...@eurekait.com> on 2005/04/14 03:29:06 UTC

commons-pool doesn't compile on java 1.5

I've checked recent archive and this compile error doesn't seem to be
listed. 

    [javac] Compiling 19 source files
to /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/build/classes

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:238: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]                 Enumeration enum = stack.elements();
    [javac]                             ^

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:239: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]                 while(enum.hasMoreElements()) {
    [javac]                       ^

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:241: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]
_factory.destroyObject(key,enum.nextElement());
    [javac]                                                    ^

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:199: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]             Enumeration enum = _pool.elements();
    [javac]                         ^

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:200: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]             while(enum.hasMoreElements()) {
    [javac]                   ^

[javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:202: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
    [javac]
_factory.destroyObject(enum.nextElement());
    [javac]                                            ^
    [javac] 6 errors

I can fix this (obviously) should I send a patch and to whom?

HTH

Stuart Guthrie



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


Re: commons-pool doesn't compile on java 1.5

Posted by Martin van den Bemt <ml...@mvdb.net>.
Sorry for the late reply.
This is already fixed in svn (the 1.3-dev version).
You can use that one, or fix commons-poool 1.2 for you personal use.
So no patches needed..

Mvgr,
Martin


Stuart Guthrie wrote:
> I've checked recent archive and this compile error doesn't seem to be
> listed. 
> 
>     [javac] Compiling 19 source files
> to /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/build/classes
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:238: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]                 Enumeration enum = stack.elements();
>     [javac]                             ^
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:239: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]                 while(enum.hasMoreElements()) {
>     [javac]                       ^
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:241: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]
> _factory.destroyObject(key,enum.nextElement());
>     [javac]                                                    ^
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:199: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]             Enumeration enum = _pool.elements();
>     [javac]                         ^
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:200: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]             while(enum.hasMoreElements()) {
>     [javac]                   ^
> 
> [javac] /var/tmp/portage/commons-pool-1.2/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackObjectPool.java:202: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
>     [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>     [javac]
> _factory.destroyObject(enum.nextElement());
>     [javac]                                            ^
>     [javac] 6 errors
> 
> I can fix this (obviously) should I send a patch and to whom?
> 
> HTH
> 
> Stuart Guthrie
> 
> 
> 
> ---------------------------------------------------------------------
> 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