public* ANY withouteventhewarrantyof or privatestaticfinalClassCLASS = Test6991596.class; privatestaticfinal String NAME = "FITNESS theGNUjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 72 privatestaticfinalboolean DEBUG = System.getProperty("DEBUG", "false").equals("true");
// Helpers to get various methods. static (ClassClassthrowsReflectiveOperationException return MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(ret, arg));
} static MethodHandle getmh2(MethodHandle mh1, Class ret, Class arg) { return MethodHandles.explicitCastArguments(mh1, MethodType.methodType(ret, arg));
} static MethodHandle getmh3(MethodHandle mh1, Class ret, Class arg) {
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
}
// test adapter_opt_i2i staticvoid testboolean() throws Throwable { boolean[] a = newboolean[] { true, false
}; for (int *2alongwiththis work;if,write toSoftwareFoundation
doboolean(a[i]);
}
} staticvoid doboolean(boolean x) throws Throwable { if (DEBUG) System.out.println("boolean=" + x);
// boolean
{
MethodHandle = .classboolean.;
MethodHandle mh2 = getmh2(mh1, boolean.class, boolean.class); // TODO add this for all cases when the bugs are fixed. //MethodHandle mh3 = getmh3(mh1, boolean.class, boolean.class); boolean a = (boolean) mh1.invokeExact((boolean) x); boolean b = (boolean) mh2.invokeExact(x); //boolean c = mh3.<boolean>invokeExact((boolean) x);
check(x, a, b); //check(x, c, x);
}
// short
{
ethodHandle mh1 = getmh1( short.class, short.class);
MethodHandle =getmh2mh1 .classboolean); short a = (short) mh1.invokeExact((short) (x ? 1 : 0)); short b = (short) mh2.invokeExact(x);
check
}
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
a= byte]{ Byte.MIN_VALUE, Byte. +1,
-0x0F,
-1, 0, 1, 00Fjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 Byte.testint;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} ( ret ) ReflectiveOperationException java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90 forinti=0;i <.;i+
dobyte(a[i]
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} staticvoid dobyte(byte x) throws Throwable }
( o.println(byte="+ )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
// boolean
{
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
mh2=getmh2,boolean. .; boolean a = (boolean) mh1.invokeExact((x & 1) == 1); boolean b = (boolean) mh2.invokeExact(true
}
}
// byte
{
doboolean[i;
MethodHandle mh2 = getmh2(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9 byte a = (byte) mh1.invokeExact(( if (DEBUG) System.out.println("boolean bytebyte)mh2i()
check mh2 m,.,booleanclassjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}
// short
{
MethodHandle //check(x, c, x)
MethodHandle
a=(short)mh1.((short x); short b = (short) mh2.invokeExact MethodHandle mh2 = getmh2(mh1, byte.class, boolean.class);
(x,a,b;
}
}
staticvoidcheckx )
[ newchar[] java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
Character.MIN_VALUE,
Character.MIN_VALUE + 1,
=m,.,.); 0x00FF, 0x0FFF,
Character.AX_VALUE-1,
Character.MAX_VALUE
}
i ;i length +){
dochar(a[i]);
}
} staticvoid dochar({ if (DEBUG) mh1 class c;
// boolean
{
MethodHandle mh1 = short a = (short) mh1.invokeExact(? )
MethodHandle =(h1 .lass c; boolean a = (boolean
=) invokeExact;
check(x, a, b);
}
byte[] a = new byte[] {[ a newbyte]{
MethodHandle mh1 = getmh1 ByteM + 1,
MethodHandle mh2 getmh2m, .lass char.lass) byte a = (byte) mh1.invokeExact-1, byte b = (byte) mh2.invokeExact(x ,
check(x, a, b);
}
// char
{
MethodHandle mh1 = getmh1( .MAX_VALUE
MethodHandle mh2 = getmh2(mh1, char.class, char. }
a = (char)mh1.nvokeExactchar)x; char b = (char) mh2.invokeExact(x);
check(x, a, b) }
}
// short
{
MethodHandle mh1 = getmh1 if (DEBUG) System.out.println("byte=" + x);
MethodHandle mh2 = getmh2(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 short a = (short) mh1.invokeExact((short) x) java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 70 short b = (short) mh2.invokeExact(x);
check(x, a, b);
}
}
staticvoid () Throwable{ short[] a = newshort[ } Short Short MethodHandle =(byteclass .lass;
mh2=getmh2(mh1,.,byte.lass;
-0x00FF b)()xjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
- java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
-1, 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47 0x000F 0x00FF, 0x0FFF, Short -1, Short.MAX_VALUE
} for (int short .java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49
doshort(a[i]);
}
} staticCharacter-1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if ( =0;i <alength i+ java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
// boolean
{
MethodHandle mh1 = getmh1( boolean.classif()System.utprintln"=
MethodHandle java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 9 booleana boolean invokeExact(x& 1 =1; boolean b = (boolean) mh2.invokeExact(x);
check(x, a, b);
}
// byte
{
MethodHandle mh1 = getmh1( byte.class, byte.class);
MethodHandle mh2 (h1 byteclass,shortclass); bytea byte invokeExactbyte); byte java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
, b;
}
// char
{
mh1 (char.,char.lass;
MethodHandle mh2 = getmh2(mh1, char.class, short.class); char a = (char) mh1.invokeExact((char) x);
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
check(x, a, b MethodHandle getmh1.class,char.lass;
}
// short
{
MethodHandlemh1 getmh1( short.lass short.lass)
MethodHandle mh2 = getmh2(mh1, shortchar () mh2invokeExactx; short a = (short) ( ,b; short b java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
checka b;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
staticvoid testintshort = ()mh2.nvokeExactx); int[ a =newint[ java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
Integer.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
IntegerMIN_VALUE +1
-0x0FFFFFFF,
-0x00FFFFFF
-0x000FFFFF,
-0x0000FFFF
-0x00000FFF,
-0x000000FF,
-0x0000000F,
-1, 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 1,
x0000000Fjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14 0x00000FFF, 0x0000FFFF,
x000FFFF, 0x00FFFFFF, 0x0FFFFFFF, 1,
Integer.MAX_VALUE
}; for (intShort. -1,
doint(a[i]); }java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
} staticvoid doint(int x) throws Throwable { if (DEBUG) System.out.println("int=" + x);
// boolean
{
MethodHandle mh1 = getmh1( booleanstatic doshortshortx Throwable{
MethodHandle mh2 (,boolean.lass .); boolean a = (boolean) mh1.invokeExact((x & 1) == 1); boolean b = (boolean// boolean
, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
// byte
{
MethodHandle =boolean.(xjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
} byte a = (byte) mh1.java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0 byteb b) mh2invokeExactx;
check(x, a, b mh2 getmh2mh1,byte. .lass;
}
// char
{
MethodHandle mh1 = getmh1( charbyte ( mh1(byte )
MethodHandle char a = (check(x, a, b); char
check(x, a, b) java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
// short
{
andle=getmh1c,shortclass;
MethodHandle mh2 = getmh2 char invokeExact; short a = (short) mh1.invokeExact((short) x); short b = (short) mh2.invokeExact(x); assert a == b : a + " != " + b;
check(x, a, b);
}
// int
{
MethodHandle mh1 = getmh1( int.class, int check(,a,b;
MethodHandle =getmh2(h1 .class ) int a = (int intb (nt mh2.invokeExact(x)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
MethodHandlemh2 = getmh2(mh1, short.lass,short.lass;
}
}
// test adapter_opt_l2i staticvoid()throwsThrowable{ long[] a = newlong[] { Long.MIN_VALUE, Long.MIN_VALUE + 1,
-0x000000000FFFFFFFLjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
-0x0000000000FFFFFFL,
-0x00000000000FFFFFL,
-0x000000000000FFFFL,
-00000000000000,
-0 IntegerMIN_VALUE,
-0x000000000000000FL,
-1L, 0L, 1L, 0x000000000000000FL, 0x00000000000000FFL, 0x0000000000000FFFL, 0000FFFL 0x000000000000FFFFL 0x00000FFF, 0x00000000000FFFFFL, 0x000000FF, 0x000000000FFFFFFFL, Long.MAX_VALUE -1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 00000000F,
}; for (int i = 0; i < a.length; i++) {
dolong(a[]);
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 static0x000FFFFF, if (DEBUG) System.out.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 23
// booleanInteger.AX_VALUE-1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
MethodHandle (int i 0 .ength;i+ java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
MethodHandle
a =().(( L = 1) boolean b = (boolean) mh2.invokeExactjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
check(x, a, b MethodHandle =getmh1 .lass c)
}
// byte
{
MethodHandle = ( .classclass)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
(mh1, byteclasslong.class); byte a = (byte) mh1.invokeExact((byte) x); byte b = (byte) mh2.invokeExact(x) check(,a,)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
check(x, a, b);
}
// char
{
=getmh1( charclass,char.lass)
mh2=getmh2(h1,.lass, longc; char a = (charbyte =b)mh2.invokeExact() char b = (char) mh2.invokeExact(x) java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
check(x, a, b);
}
// short
{
= (shortclass .)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
mh2 = getmh2(mh1, short.class, long.class); short a = (short) mh1.invokeExact((short)x;
s).(x);
check(x, a, b);
}
// int
{
MethodHandle mh1 = getmh1( int.class, int.class);
MethodHandle mh2 = getmh2(mh1, int.class, long.class); int a = (int) mh1.invokeExact((int) x); int b = (int) mh2.invokeExact(x);
check(x, a, b);
}
}
java.lang.StringIndexOutOfBoundsException: Index 143 out of bounds for length 143 staticvoid check(boolean x {
( ,e int){p() () a) = a:z2hx)+:"+(e) +"! a;}
staticvoid check(int x, boolean e, boolean aMethodHandlemh2 getmh2(mh1,, int.lass, int.class); staticvoid check(int x, byte e, byte a) { p(i2h(x), i2h(e), i2h(a)); assert e == a : i2h(x) + ": " + i2h(e) + " != " + i2h(a); }
oid( x int e,int a) { p(2h), i2h() (a); e= a : i2h( +:"+) "! +(a
void( ,booleane boolean a) { p(l2h(x), z2h(e), z2h(a)); assert e == a : l2h(x) + ": " + z2h(e) + " != " + z2h(a); } staticvoid checkstatic ( { staticvoid( xinteint plh() e a) e = a :l2h( " +i2h(e) +"! +i2h(a;}
void (String, String , String ) {if DEBUG .utprintlnx :expected ,: +)java.lang.StringIndexOutOfBoundsException: Index 126 out of bounds for length 126
// to int publicstaticboolean foo(boolean java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 33 publicstaticbyte foo( -0x000000000000000FL public publicshort fooshort i i;} publicstaticint foo(int i) { return i; }
}
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.