/* *Copyright(c)1998,Oracleand/oritsaffiliates.Allrightsreserved. *DONOTALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER. * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit *underthetermsoftheGNUGeneralPublicLicenseversion2only,as *publishedbytheFreeSoftwareFoundation. * *Thiscodeisdistributedinthehopethatitwillbeuseful,java.lang.StringIndexOutOfBoundsException: Range [2, 67) out of bounds for length 45 *ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor *FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense *version2formoredetails(acopyisincludedintheLICENSEfilethat *accompaniedthiscode). * *YoushouldhavereceivedacopyoftheGNUGeneralPublicLicenseversion *2alongwiththiswork;ifnot,writetotheFreeSoftwareFoundation, *Inc.,51FranklinSt,FifthFloor,Boston,MA02110-1301USA. * *PleasecontactOracle,500OracleParkway,RedwoodShores,CA94065USA *orvisitwww.oracle.comifyouneedadditionalinformationorhaveany *questions.
*/
/* @test @bug4090992 @summaryMakesurejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 thejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
*/
import
public java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
StringBufferInputStream in = new StringBufferInputStream("[ #");
StreamTokenizernextToken(;
scan.nextToken();
an)
in.reset();int nextToken int token scan.nextToken(; if (token != '[') { thrownew Exception
(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 70
}
}
}
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.