RFR 8027640 : String.indexOf(String,int) for the empty string case not specified

Brent Christian brent.christian at oracle.com
Mon Feb 24 23:52:23 UTC 2014

Please review my changes for:

The webrev is here:

This is a small cleanup to reconcile the String[last]indexOf() spec with 
longstanding behavior.  There are no changes to executable code.

In String, the "Math.min(fromIndex, this.length())" clause is brought 
over from String[Buffer|Builder] for indexOf(String,int) and 
lastIndexOf(String,int).  This resolves the issue for which the bug was 

To further sync up the [last]indexOf() docs, I ported the 6940381 
wording improvements from String to String[Buffer|Builder].  I also made 
a few doclint updates to the code in question.


More information about the core-libs-dev mailing list