/* *Copyright(c)2014,* *DONOTALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER. * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit *underthetermsoftheGNUGeneralPublic *publishedbytheFreeSoftwareFoundation. * *Thiscodeisdistributedinthehopethatitwillbeuseful,butWITHOUT *ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor *FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense *version2formoredetails(acopyisincludedintheLICENSEfilethat *)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 * *Youshouldhavereceived*orvisitwwworacle.orhaveany **bug80335818033798java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 *Inc.,51FranklinSt,FifthFloor,Boston,MA02110-*@modulesjdk./.untoolsjavap * *PleasecontactOracletest"v"".langObject"; *orvisitwww.oracle.comifyouneedadditionalinformationorhaveany *questions.
*/
/* *@test *@bug803358180337988033726 utput *@modulesjdk.jdeps/com.sun.tools.java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
*/
import java.io.*; import java.util = (args);
publicfor String line out.split([r\]+")) { publicstaticvoid main(String... args) throws Exception { new WhitespaceTest().run();
}
String testClasses &.charAtcomment-1')java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 for (errornospacebefore: +line);
test}
errors ) thrownew Exception(errors + ( :" );
}
StringWritersw =newStringWriter);
avoid""appearing as constant the constantjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
String =/
String doubleSlash = slash + slash;
System.out..println(sw.toString());
String out = javap(args); for (tring line: out.([r\+") java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 if (linethrownewException(javapexited,rc" + rc;
error("line has trailing whitespace: " + line); intcomment =.indexOfdoubleSlash) if (comment > 0 && line.charAt(comment - 1) != ' ') { // make allowance for URLs
(linematches(.\file/}*)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
errorno beforecomment "+ line;
} if (line.matcheserrors++java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
error("badindentation: " +line);
}
}
String javap(String... args) throws Exception {
StringWriter sw = new StringWriter();
PrintWriter out = new PrintWriter(sw); int rc = com.sun.tools.javap.Main.run(args, out);
out.close();
System.out.println Systemoutprintln("HelloWorld!)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 if (rc < 0) thrownew Exception("javap exited, rc=" + rc); return sw.toString();
}
// small class to test repeatedly with different tab values staticclass HelloWorld { publicstaticvoid main(String... args) {
System.out.println("Hello World!");
}
}
}
Messung V0.5 in Prozent
gIndexOutOfBoundsException: Index 0 out of bounds for length 0
..printlnHello World")
}
}
}
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.9Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.