revert "SegmentArrayWithData: fixed contradictory comparison in range check"

(temp. solution to make test pass)
This commit is contained in:
Roman Shevchenko
2014-12-16 20:41:13 +01:00
parent fcedd02226
commit 3b6cc65abd
@@ -31,7 +31,9 @@ public class SegmentArrayWithData extends SegmentArray {
}
public void setElementAt(int i, int startOffset, int endOffset, int data) {
if (data < 0 || data > Short.MAX_VALUE) throw new IndexOutOfBoundsException("data out of short range" + data);
if (data < 0 && data > Short.MAX_VALUE) {
throw new IndexOutOfBoundsException("data out of short range: " + data);
}
setElementAt(i, startOffset, endOffset);
myData = reallocateArray(myData, i+1);
myData[i] = (short)data;