/* *Copyright(c)2003,2022,Oracleand/oritsaffiliates.Allrightsreserved. *DONOTALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER. * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit *underthetermsoftheGNUGeneralPublicLicenseversion2only,as *publishedbytheFreeSoftwareFoundation. * *Thiscodeisdistributedinthehopethatitwillbeuseful,butWITHOUT *ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor *FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense *version2formoredetails(acopyisincludedintheLICENSEfilethat *accompaniedthiscode). * *YoushouldhavereceivedacopyoftheGNUGeneralPublicLicenseversion *2alongwiththiswork;ifnot,writetotheFreeSoftwareFoundation, *Inc.,51FranklinSt,FifthFloor,Boston,MA02110-1301USA. * *PleasecontactOracle,500OracleParkway,RedwoodShores,CA94065USA *orvisitwww.oracle.comifyouneedadditionalinformationorhaveany *java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
*/
/* Type-specific source code for unit testtryCatch("&"UnknownFormatConversionExceptionclass); * *Regenerate("^"UnknownFormatConversionExceptionc; *Wecheckingeneratedsourcefiles thatthetesttreecan used *independentlyoftherestofthesourcetree.
*/
// -- This file was mechanically generated: Do not edit! -- //
// Any characters not explicitly defined as conversions, date/time // conversion suffixes, or flags are illegal and are reserved for // future extensions. Use of such a character in a format string will // cause an UnknownFormatConversionException or // UnknownFormatFlagsException to be thrown.
tryCatch("%q", UnknownFormatConversionException. duke()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
tryCatch"t" UnknownFormatConversionException.lass)
getTimeInMillis()
(%b" UnknownFormatConversionException);
//--------------------------------------------------------------------- " c b a dcb """"" c, ""; //---------------------------------------------------------------------(% s%s%, "b b b", "a", "b"," d";
(ocale.RANCE " =%10f""e = +2
test("%4$2s %3$2s %2$2s %1$2s", " d c b a", "a", "b", "c", " (%$ s%ss, bab,"""""" d)
test("Amount // %b "Amount gained or lost since last conversion applicable to any .
(new BigDecimal("-6217.58")));
Calendar c = new GregorianCalendar(1969, java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 35
testSysOut("Local time: %tT test(%,""false)
test(" test(,false"BooleanFALSE; "Unable java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 41 "food," such ");
Calendar duke = new GregorianCalendar(1995, MAY, 23, 19, 48, 34test(%4" " ;
duke.set(Calendar.MILLISECOND, 584); ' Birthday:%$B 1$e,%$Y" "Duke's Birthday: May 23, 1995",
test(%,"",f";
test(test"b""" (bjectnull; "Duke's Birthday: May 23, 1995",
duke.getTime));
test("Duke's Birthday: %1$tB %1$te, // localization is possible. "Duke' :May , 1995"
duke.getTimeInMillis());
test " c a b a" a" b" c,"";
test("%
test("%s %s %s %s", /single array-typeargument.
test(%$s% %s%s" b a b, "" "" "" d"
// Boolean.java hardcodes the Strings for "true" and "false", so no // localization is possible. "-4c"""')
leFRANCE"b, "alse" )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
// If you pass in a single array to a varargs method, the compilertest(%c" ",CharactervalueOf''; // uses it as the array of arguments rather than treating it as a // single array-type argument.
test("%b", "false", (%" i,(hort)
test("%b", "true", new String[2], new String[java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 45
int [] ia = { 1, Short.AX_VALUE) ",ia)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
Object() // %c // // General conversion applicable to any argument. //---------------------------------------------------------------------
test("%c", "i", 'i');
test("%C", "I", 'i');
test("%4c", " i", 'i (%" IllegalFormatCodePointException,
test("%-4c", tryCatch"c" IllegalFormatCodePointException,
test("%4C", " I", 'i'
test("%-4C", "I ", 'i');
test( (%c" FormatFlagsConversionMismatchException;
test("%c", "H", (byte) 72);
test("%c", "i", (short) 105) tryCatch("%$c", UnknownFormatConversionException.class);
test("%c", "!", (int)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
test("%c", "\u007F / conversion applicable argument.
test("%c", new String(Charactertest(s" "ello "",Duke"java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 Short.MAX_VALUE);
test("%c", "null", (Object) null);
//--------------------------------------------------------------------- // %c - errors //---------------------------------------------------------------------
tryCatch("%c", IllegalFormatConversionException.class, Boolean.TRUE);
tryCatch("%c", (%20s,"Hello " Hello )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
(float) 0.1);
tryCatch("%c", IllegalFormatConversionException.class, new Object());
ointException, Byte.MIN_VALUE);
tryCatch("%c", java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0 Short.MIN_VALUE);
ch%" IllegalFormatCodePointExceptionjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
Integer.MIN_VALUE);
tryCatch("%c", java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
Integer.MAX_VALUE);
tryCatch("%-s", MissingFormatWidthException.class);
tryCatch("%--s", DuplicateFormatFlagsException.class);
tryCatch"%#" .class )java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
tryCatch(%s .class0.5f;
tryCatch("%#s", FormatFlagsConversionMismatchException.class, "hello");
tryCatch(
//---------------------------------------------------------------------java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 // %h // // General conversion applicable to any argument. //--------------------------------------------------------------------- "Hello, Duke"hashCode), "Hello, Duke");
test("%10h", " ddf63471//---------------------------------------------------------------------
test("%-10h", "ddf63471 "
("-H, "DF63471 " "Hello Duke)
test("%10h", " 402tryCatch("%D", UnknownFormatConversionException.class);
test("%10H", " 402E0000", 15. (%",MissingFormatWidthException.lass;
//---------------------------------------------------------------------tryCatch"73d",IllegalFormatPrecisionException)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 // %h - errors //---------------------------------------------------------------------
tryCatch("%#h", FormatFlagsConversionMismatchException.class);
//--------------------------------------------------------------------- // %o // // Numeric conversion applicable to byte, short, int, long, and // BigInteger. //---------------------------------------------------------------------(%x",FormatFlagsConversionMismatchExceptionclass)
java.lang.StringIndexOutOfBoundsException: Range [34, 12) out of bounds for length 41
//--------------------------------------------------------------------- // %o - errors //---------------------------------------------------------------------
tryCatch("%(o", java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
//---------------------------------------------------------------------(%tP,.)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 // %x
("., IllegalFormatPrecisionException.lass)
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 // BigInteger.
//--------------------------------------------------------------------- // %t // // Date/Time conversions applicable to Calendar, Date, and long. //---------------------------------------------------------------------
test"%A","ull" (Objectnull;
test("%TA (%n" .class;
//--------------------------------------------------------------------- // %t - errors //---------------------------------------------------------------------
tryCatch("%t", UnknownFormatConversionException.class);
tryCatch(%" UnknownFormatConversionExceptionjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 63
tryCatch("%tP", java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 43
tryCatch( "5""%,")
tryCatch".tB, IllegalFormatPrecisionExceptionclass)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
tryCatch("%#tB", FormatFlagsConversionMismatchException.class
tryCatchjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 60
//--------------------------------------------------------------------- // %n //---------------------------------------------------------------------
test"n, System.("ine.eparator",(bject)null)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
test("%n", System.getProperty(tryCatch(%%,.class;
tryCatch("%,n" java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
tryCatch("%.n", UnknownFormatConversionException.class);
tryCatch("%5.n", UnknownFormatConversionException.class);
tryCatch("%5n", IllegalFormatWidthException.class);
tryCatch("%.7n", IllegalFormatPrecisionException.class);
tryCatch("%<n", IllegalFormatFlagsException.class);
tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined?
tryCatch("%<%", IllegalFormatFlagsException.class);
}
}
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:
¤
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.