mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 14:31:02 -04:00
fixed two findbugs issues
This commit is contained in:
parent
73f2ec2c64
commit
e85604e3b6
@ -105,7 +105,7 @@ public class NodeException extends Exception {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||||
// ignore an error accessing the ElementTypeDescription
|
// ignore an error accessing the ElementTypeDescription
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,24 @@ public final class NumStringComparator implements Comparator<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
NumString numString = (NumString) o;
|
||||||
|
|
||||||
|
if (num != numString.num) return false;
|
||||||
|
return str != null ? str.equalsIgnoreCase(numString.str) : numString.str == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = num;
|
||||||
|
result = 31 * result + (str != null ? str.toLowerCase().hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(NumString other) {
|
public int compareTo(NumString other) {
|
||||||
if (isNum && other.isNum) {
|
if (isNum && other.isNum) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user