'enum' should not be used as an identifier, since it is a reserved keyword from source level 1.5.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2004-10-15 00:43:29 +00:00
parent 4d7e4b5e78
commit 3dbb90fe58
1 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ import org.apache.commons.lang.ClassUtils;
* @author Apache Avalon project
* @author Stephen Colebourne
* @since 2.1 (class existed in enum package from v1.0)
* @version $Id: ValuedEnum.java,v 1.3 2004/09/30 06:35:52 bayard Exp $
* @version $Id: ValuedEnum.java,v 1.4 2004/10/15 00:43:29 ggregory Exp $
*/
public abstract class ValuedEnum extends Enum {
@ -139,9 +139,9 @@ public abstract class ValuedEnum extends Enum {
}
List list = Enum.getEnumList(enumClass);
for (Iterator it = list.iterator(); it.hasNext();) {
ValuedEnum enum = (ValuedEnum) it.next();
if (enum.getValue() == value) {
return enum;
ValuedEnum enumeration = (ValuedEnum) it.next();
if (enumeration.getValue() == value) {
return enumeration;
}
}
return null;