-
Type:
Bug
-
Resolution: Incomplete
-
Priority:
P4
-
None
-
Affects Version/s: 8u231
-
Component/s: core-libs
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
in java.lang.String source code
new String(char value[], int offset, int count) method
if (count <= 0) {
if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}if (offset <= value.length) {
this.value = "".value;
return;
}
}
appear duplicate Judgment.on change
if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}
if(count == 0){ }
efficiency will be better
in java.lang.String source code
new String(char value[], int offset, int count) method
if (count <= 0) {
if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}if (offset <= value.length) {
this.value = "".value;
return;
}
}
appear duplicate Judgment.on change
if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}
if(count == 0){ }
efficiency will be better