-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
b78
-
x86
-
windows_2000, windows_xp
Name: rmT116609 Date: 02/19/2003
DESCRIPTION OF THE PROBLEM :
Current String.indexOf(String, int) (as found at http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html#indexOf(java.lang.String,%20int), and within src.zip
included with JDK 1.4.0_01) states that k is:
k >= Math.min(fromIndex, str.length()) &&
this.startsWith(str, k)
Should state:
k >= Math.min(fromIndex, this.length()) &&
this.startsWith(str, k)
If the current statement was true, then any searches for
the empty string starting at any position would always
return 0: (k >= Math.min(fromIndex, "".length()).
(Review ID: 160826)
======================================================================
DESCRIPTION OF THE PROBLEM :
Current String.indexOf(String, int) (as found at http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html#indexOf(java.lang.String,%20int), and within src.zip
included with JDK 1.4.0_01) states that k is:
k >= Math.min(fromIndex, str.length()) &&
this.startsWith(str, k)
Should state:
k >= Math.min(fromIndex, this.length()) &&
this.startsWith(str, k)
If the current statement was true, then any searches for
the empty string starting at any position would always
return 0: (k >= Math.min(fromIndex, "".length()).
(Review ID: 160826)
======================================================================