mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in Arrays.binarySearch
This commit is contained in:
parent
a3eaa1fc18
commit
0064d399be
|
@ -977,6 +977,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1006,6 +1009,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1035,6 +1041,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1064,6 +1073,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1093,6 +1105,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1122,6 +1137,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1151,6 +1169,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1188,6 +1209,9 @@ public class TArrays extends TObject {
|
||||||
if (fromIndex > toIndex) {
|
if (fromIndex > toIndex) {
|
||||||
throw new TIllegalArgumentException();
|
throw new TIllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
if (fromIndex == toIndex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
int l = fromIndex;
|
int l = fromIndex;
|
||||||
int u = toIndex - 1;
|
int u = toIndex - 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user