mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert "SegmentArrayWithData: fixed contradictory comparison in range check"
(temp. solution to make test pass)
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user