Don't compare encoded values with item references by item index

This commit is contained in:
Ben Gruver 2012-06-20 16:29:54 -07:00
parent 7bb622e0b1
commit 0aa30d93f8
5 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ public class EnumEncodedValue extends EncodedValue {
protected int compareValue(EncodedValue o) {
EnumEncodedValue other = (EnumEncodedValue)o;
return value.getIndex() - other.value.getIndex();
return value.compareTo(other.value);
}
/** {@inheritDoc} */

View File

@ -80,7 +80,7 @@ public class FieldEncodedValue extends EncodedValue {
protected int compareValue(EncodedValue o) {
FieldEncodedValue other = (FieldEncodedValue)o;
return value.getIndex()-other.value.getIndex();
return value.compareTo(other.value);
}
/** {@inheritDoc} */

View File

@ -80,7 +80,7 @@ public class MethodEncodedValue extends EncodedValue {
protected int compareValue(EncodedValue o) {
MethodEncodedValue other = (MethodEncodedValue)o;
return value.getIndex() - other.value.getIndex();
return value.compareTo(other.value);
}
/** {@inheritDoc} */

View File

@ -81,7 +81,7 @@ public class StringEncodedValue extends EncodedValue {
protected int compareValue(EncodedValue o) {
StringEncodedValue other = (StringEncodedValue)o;
return value.getIndex() - other.value.getIndex();
return value.compareTo(other.value);
}
/** {@inheritDoc} */

View File

@ -80,7 +80,7 @@ public class TypeEncodedValue extends EncodedValue {
protected int compareValue(EncodedValue o) {
TypeEncodedValue other = (TypeEncodedValue)o;
return value.getIndex() - other.value.getIndex();
return value.compareTo(other.value);
}
/** {@inheritDoc} */