-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
8
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The test failed with unexpected StringIndexOutOfBoundsException.
such is also in https://github.com/openjdk/jdk/commit/e341e35276315a5140ddec11a7e659d57328e9a0
We think you can replace charAt(0) with startsWith to avoid StringIndexOutOfBoundsException.
ACTUAL -
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.startEntity(XMLDTDScannerImpl.java:586)
---------- BEGIN SOURCE ----------
@Test
public void test_startEntity_2_2() throws com.sun.org.apache.xerces.internal.xni.XNIException{
String string1 = "";
com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier xMLResourceIdentifier2 = null;
String string3 = "a ";
com.sun.org.apache.xerces.internal.xni.Augmentations augmentations4 = null;
com.sun.org.apache.xerces.internal.util.SymbolTable symbolTable5 = new com.sun.org.apache.xerces.internal.util.SymbolTable();
XMLErrorReporter xMLErrorReporter6 = new XMLErrorReporter();
XMLEntityManager xMLEntityManager7 = new XMLEntityManager();
XMLDTDScannerImpl xMLDTDScannerImpl0 = new XMLDTDScannerImpl(symbolTable5, xMLErrorReporter6, xMLEntityManager7);
xMLDTDScannerImpl0.startEntity(string1, xMLResourceIdentifier2, string3, augmentations4);
}
---------- END SOURCE ----------
The test failed with unexpected StringIndexOutOfBoundsException.
such is also in https://github.com/openjdk/jdk/commit/e341e35276315a5140ddec11a7e659d57328e9a0
We think you can replace charAt(0) with startsWith to avoid StringIndexOutOfBoundsException.
ACTUAL -
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.startEntity(XMLDTDScannerImpl.java:586)
---------- BEGIN SOURCE ----------
@Test
public void test_startEntity_2_2() throws com.sun.org.apache.xerces.internal.xni.XNIException{
String string1 = "";
com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier xMLResourceIdentifier2 = null;
String string3 = "a ";
com.sun.org.apache.xerces.internal.xni.Augmentations augmentations4 = null;
com.sun.org.apache.xerces.internal.util.SymbolTable symbolTable5 = new com.sun.org.apache.xerces.internal.util.SymbolTable();
XMLErrorReporter xMLErrorReporter6 = new XMLErrorReporter();
XMLEntityManager xMLEntityManager7 = new XMLEntityManager();
XMLDTDScannerImpl xMLDTDScannerImpl0 = new XMLDTDScannerImpl(symbolTable5, xMLErrorReporter6, xMLEntityManager7);
xMLDTDScannerImpl0.startEntity(string1, xMLResourceIdentifier2, string3, augmentations4);
}
---------- END SOURCE ----------