-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
7u51, 8-pool
-
x86
-
other
FULL PRODUCT VERSION :
java version "1.7.0_40-ea"
Java(TM) SE Runtime Environment (build 1.7.0_40-ea-b29)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b48, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X Yosemite, Version 10.10.1
EXTRA RELEVANT SYSTEM CONFIGURATION :
Not applicable
A DESCRIPTION OF THE PROBLEM :
s.indexOf(String, index) does not work properly in the case that the first argument is empty and the second argument is greater than the length of s.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Evaluate the call
"ab".indexOf("", 3)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
System.out.println("ab".indexOf("", 3));
---------- END SOURCE ----------
java version "1.7.0_40-ea"
Java(TM) SE Runtime Environment (build 1.7.0_40-ea-b29)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b48, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X Yosemite, Version 10.10.1
EXTRA RELEVANT SYSTEM CONFIGURATION :
Not applicable
A DESCRIPTION OF THE PROBLEM :
s.indexOf(String, index) does not work properly in the case that the first argument is empty and the second argument is greater than the length of s.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Evaluate the call
"ab".indexOf("", 3)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
System.out.println("ab".indexOf("", 3));
---------- END SOURCE ----------
- duplicates
-
JDK-8027640 String.indexOf(String,int) for the empty string case not specified
- Resolved