IllegalArgumentException with @Enumerated(EnumType.ORDINAL)
-----------------------------------------------------------
Key: ANN-664
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-664
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.0.ga
Reporter: Pavel
i have enum
public enum RunType {
DELETED(-1),
UNKNOW(0),
MANUAL(1),
AUTO(2);
private final int value;
RunType(int value) { this.value = value; }
public int value() { return value; }
}
when value equls -1 i have IllegalArgumentException
code from EnumType.nullSafeGet
if ( ordinal < 0 || ordinal >= values.length ) {
throw new IllegalArgumentException( "Unknown ordinal value for enum " +
enumClass + ": " + ordinal );
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira