[ http://issues.apache.org/jira/browse/LANG-259?page=comments#action_12412802 ]
Ralf Hauser commented on LANG-259: ---------------------------------- similarly, it should detect double entries of this kind... public static final int JAVA1_0_VALUE = 100; public static final int JAVA1_0_0VALUE = 100; ... public static final JavaVersionEnum JAVA1_0 = new JavaVersionEnum( "Java 1.0", JAVA1_0_VALUE ); public static final JavaVersionEnum JAVA1_0_0 = new JavaVersionEnum( "Java 1.0.0", JAVA1_0_0VALUE ); ------ ps, the last line in the previous comment should have been public static final JavaVersionEnum JAVA1_0_0 = new JavaVersionEnum( "Java 1.0.0", JAVA1_0_VALUE ); > ValuedEnum.compareTo(Object other) not typesafe - it easily could be... > ----------------------------------------------------------------------- > > Key: LANG-259 > URL: http://issues.apache.org/jira/browse/LANG-259 > Project: Commons Lang > Type: Bug > Versions: 2.1 > Environment: all > Reporter: Ralf Hauser > > int org.apache.commons.lang.enums.ValuedEnum.compareTo(Object other) > is not typesafe - if the int-values are the same, it will return "0" even > for two totally different sub-classes of ValuedEnum -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
