This commit is contained in:
@@ -83,6 +83,7 @@ public final class DeMember<R extends Reader, T, F> {
|
|||||||
public int compareTo(boolean fieldSort, DeMember<R, T, F> o) {
|
public int compareTo(boolean fieldSort, DeMember<R, T, F> o) {
|
||||||
if (o == null) return -1;
|
if (o == null) return -1;
|
||||||
if (this.index != o.index) return (this.index == 0 ? Integer.MAX_VALUE : this.index) - (o.index == 0 ? Integer.MAX_VALUE : o.index);
|
if (this.index != o.index) return (this.index == 0 ? Integer.MAX_VALUE : this.index) - (o.index == 0 ? Integer.MAX_VALUE : o.index);
|
||||||
|
if (this.index != 0) throw new RuntimeException("fields (" + attribute.field() + ", " + o.attribute.field() + ") have same ConvertColumn.index(" + this.index + ") in " + attribute.declaringClass());
|
||||||
return fieldSort ? this.attribute.field().compareTo(o.attribute.field()) : 0;
|
return fieldSort ? this.attribute.field().compareTo(o.attribute.field()) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public final class EnMember<W extends Writer, T, F> {
|
|||||||
public int compareTo(boolean fieldSort, EnMember<W, T, F> o) {
|
public int compareTo(boolean fieldSort, EnMember<W, T, F> o) {
|
||||||
if (o == null) return -1;
|
if (o == null) return -1;
|
||||||
if (this.index != o.index) return (this.index == 0 ? Integer.MAX_VALUE : this.index) - (o.index == 0 ? Integer.MAX_VALUE : o.index);
|
if (this.index != o.index) return (this.index == 0 ? Integer.MAX_VALUE : this.index) - (o.index == 0 ? Integer.MAX_VALUE : o.index);
|
||||||
|
if (this.index != 0) throw new RuntimeException("fields (" + attribute.field() + ", " + o.attribute.field() + ") have same ConvertColumn.index(" + this.index + ") in " + attribute.declaringClass());
|
||||||
return fieldSort ? this.attribute.field().compareTo(o.attribute.field()) : 0;
|
return fieldSort ? this.attribute.field().compareTo(o.attribute.field()) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user