Bugfix: incorrect bounds check in IntegerRange

This commit is contained in:
Kris De Volder
2017-01-20 15:40:20 -08:00
parent a322835368
commit 7fc85b79c9

View File

@@ -27,11 +27,11 @@ public class IntegerRange {
}
public boolean isTooLarge(int x) {
return upperBound==null || x > upperBound;
return upperBound!=null && x > upperBound;
}
public boolean isTooSmall(int x) {
return lowerBound==null || x < lowerBound;
return lowerBound!=null && x < lowerBound;
}
private IntegerRange(Integer lowerBound, Integer upperBound) {