Loading... (original) (raw)
Type:
Bug
Resolution: Fixed
Priority:
P4
Fix Version/s: 11
Affects Version/s: 8, 9, 10, 11
Component/s: core-libs
Labels:
Subcomponent:
java.langResolved In Build:
b16Verification:
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204378 | 11.0.1 | Xueming Shen | P4 | Resolved | Fixed | team |
A DESCRIPTION OF THE PROBLEM :
In the documentation of String.split it says: "If n is non-positive then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."
But non-positive is used meaning negative but it is not correct. For further information see:
https://math.stackexchange.com/questions/1023616/difference-between-nonpositive-and-negative-numbers#1023619
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"If n is negative then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."
ACTUAL -
"If n is non-positive then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-
backported by
JDK-8204378 String.split non-positive term incorrect use
- Resolved