/* *Copyright(c)1997,2010,Oracleand/oritsaffiliates.Allrightsreserved. ALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER. * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit *underthetermsoftheGNUGeneralPublicLicenseversion2only,as *publishedbytheFreeSoftwareFoundation. * *Thiscodeisdistributedinthehopethatitwillbeuseful,butWITHOUT *ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor *FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense *versionjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *accompaniedthiscode). * *YoushouldhavereceivedacopyoftheGNUGeneralPublicLicenseversion *2alongwiththiswork;ifnot,writetotheFreeSoftwareFoundation, *Inc.,51FranklinSt,FifthFloor,Boston,MA02110-1301USA. * *PleasecontactOracle,500OracleParkway,RedwoodShores,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 13 *orvisitwww.oracle.comifyouneedadditionalinformationorhaveany *questions.
*/
/* @test @BufferedReadershouldthrowanOutOfMemoryErrorwhenthe limitveryjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 @bug6350733 @buildBigMark runmain/othervmjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
*/
import..;
publicclassjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
publicstaticvoid main(String[] args) throws IOException {
String line; int i = 0;
String dir = System.getProperty("test.src", ".");
BufferedReader br
= new BufferedReader(new FileReader(new File(dir, "BigMark.java")), 100);
try { // BR.fill() call to new char[Integer.MAX_VALUE] should succeed
br.mark(Integer.MAX_VALUE);
line = br.readLine();
} catch (OutOfMemoryError x) {
x.printStackTrace(); throw x;
}
System.out.println("OutOfMemoryError not thrown as expected");
}
}
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.5Bemerkung:
¤
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.