commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Hawthorne <ma...@apache.org>
Subject Re: [all] enum keyword in Java 1.5
Date Thu, 19 Feb 2004 19:46:35 GMT
Gary Gregory wrote:
>>If you haven't heard, the word 'enum' is a keyword in Java 1.5.  This
>>causes some errors here and there.
>>Now that the 1.5 beta is out, should we be making an effort to remove
>>this word from our sources?
> 
> 
> +1
> And package names too I suppose. What happens when you compile [lang]?

Here's the output:

java:compile:
     [echo] Compiling to 
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/target/classes
     [javac] Compiling 63 source files to 
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/target/classes
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/ValuedEnum.java:16:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
package org.apache.commons.lang.enum;
                                 ^
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/ValuedEnum.java:139:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
             ValuedEnum enum = (ValuedEnum) it.next();
                        ^
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/ValuedEnum.java:140:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
             if (enum.getValue() == value) {
                 ^
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/ValuedEnum.java:141:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
                 return enum;
                        ^
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/Enum.java:16:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
package org.apache.commons.lang.enum;
                                 ^
/home/matth/files/tech/appdev/projects/apache/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/EnumUtils.java:16:

as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
package org.apache.commons.lang.enum;
                                 ^
6 errors

BUILD FAILED


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