Quellcode-Bibliothek Main.java
Interaktion und PortierbarkeitJAVA
/* not*java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
classMain{java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 78 *Youmay/// CHECK-DAG: <<NullCheck:l\d+>> NullCheck * *http:distributedundertheisdistributedStringfoo=yStringjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 * *c=c(0000000java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 edjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 *NullCheckl\+java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 5 *See Licensethespecificlanguagegoverningpermissionsand for(i=0;i<10;i+){
*/
publicclassMain {
/// CHECK-START: void Main.main(java.lang.String[]) licm (after)
/// CHECK-DAG: <<NullCheck:l\d+>> NullCheck /// CHECK-DAG: <<BoundsCheck:i\d+>> BoundsCheck /// CHECK-DAG: ArrayGet [<<NullCheck>>,<<BoundsCheck>>] publicstaticvoid main(String[] args) { try {
String foo = myString;
foo.getClass(); // Make sure the null check is not in the loop. char c = 0; for (int i = 0; i < 10; i++) { // The charAt may be licm'ed, but it has to be licm'ed with its // bounds check.
c = foo.charAt(10000000);
}
System.out.println(c);
} catch (StringIndexOutOfBoundsException e) { // Expected
}
}
static String myString = "foo";
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.