diff -r a11c1cb542bb -r ec52b4d094c0 src/java.base/share/classes/java/lang/String.java --- a/src/java.base/share/classes/java/lang/String.java Wed May 23 16:26:29 2018 +0200 +++ b/src/java.base/share/classes/java/lang/String.java Wed May 23 08:49:00 2018 -0700 @@ -2180,14 +2180,23 @@ * *

The {@code limit} parameter controls the number of times the * pattern is applied and therefore affects the length of the resulting - * array. If the limit n is greater than zero then the pattern - * will be applied at most n - 1 times, the array's - * length will be no greater than n, and the array's last entry - * will contain all input beyond the last matched delimiter. 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 pattern will be applied as many times as possible, the array can - * have any length, and trailing empty strings will be discarded. + * array. + *

* *

The string {@code "boo:and:foo"}, for example, yields the * following results with these parameters: