-
Bug
-
Resolution: Fixed
-
P3
-
1.1
-
1.1fcs
-
sparc
-
solaris_2.5
-
Not verified
Method Vector.lastIndexOf(elem,index) fails for elementData[k] == elem where
k== index.
Please check the following Program should return 5 insted returns 2.
---------8<----------------------------------------------
import java.util.Vector;
public class VectorTest {
public static void main(String[] argv) {
Vector v = new Vector();
v.addElement("0");
v.addElement("1");
v.addElement("2");
v.addElement("3");
v.addElement("4");
v.addElement("2");
v.addElement("6");
System.out.println("v.lastIndexOf(\"2\",5) returns:" + v.lastIndexOf("2",5));
}
}
k== index.
Please check the following Program should return 5 insted returns 2.
---------8<----------------------------------------------
import java.util.Vector;
public class VectorTest {
public static void main(String[] argv) {
Vector v = new Vector();
v.addElement("0");
v.addElement("1");
v.addElement("2");
v.addElement("3");
v.addElement("4");
v.addElement("2");
v.addElement("6");
System.out.println("v.lastIndexOf(\"2\",5) returns:" + v.lastIndexOf("2",5));
}
}