# HG changeset patch # User twisti # Date 1297327679 28800 # Node ID 62a8557e8f36ee561476fde863031759df642ef7 # Parent 72d6c57d0658a85f4c64021a929581d5acde3630 7018277: JSR 292 change test/compiler/6987555/Test6987555.java to new MH syntax Summary: test/compiler/6987555/Test6987555.java currently does not compile because the MH return-type syntax has changed. Reviewed-by: never diff -r 72d6c57d0658 -r 62a8557e8f36 test/compiler/6987555/Test6987555.java --- a/test/compiler/6987555/Test6987555.java Wed Feb 09 16:34:34 2011 -0800 +++ b/test/compiler/6987555/Test6987555.java Thu Feb 10 00:47:59 2011 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,8 +54,8 @@ if (DEBUG) System.out.println("boolean=" + x); MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(boolean.class, boolean.class)); MethodHandle mh2 = mh1.asType(MethodType.methodType(boolean.class, Boolean.class)); - boolean a = mh1.invokeExact(x); - boolean b = mh2.invokeExact(Boolean.valueOf(x)); + boolean a = (boolean) mh1.invokeExact(x); + boolean b = (boolean) mh2.invokeExact(Boolean.valueOf(x)); assert a == b : a + " != " + b; } @@ -80,8 +80,8 @@ if (DEBUG) System.out.println("byte=" + x); MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(byte.class, byte.class)); MethodHandle mh2 = mh1.asType(MethodType.methodType(byte.class, Byte.class)); - byte a = mh1.invokeExact(x); - byte b = mh2.invokeExact(Byte.valueOf(x)); + byte a = (byte) mh1.invokeExact(x); + byte b = (byte) mh2.invokeExact(Byte.valueOf(x)); assert a == b : a + " != " + b; } @@ -104,8 +104,8 @@ if (DEBUG) System.out.println("char=" + x); MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(char.class, char.class)); MethodHandle mh2 = mh1.asType(MethodType.methodType(char.class, Character.class)); - char a = mh1.invokeExact(x); - char b = mh2.invokeExact(Character.valueOf(x)); + char a = (char) mh1.invokeExact(x); + char b = (char) mh2.invokeExact(Character.valueOf(x)); assert a == b : a + " != " + b; } @@ -134,8 +134,8 @@ if (DEBUG) System.out.println("short=" + x); MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(short.class, short.class)); MethodHandle mh2 = mh1.asType(MethodType.methodType(short.class, Short.class)); - short a = mh1.invokeExact(x); - short b = mh2.invokeExact(Short.valueOf(x)); + short a = (short) mh1.invokeExact(x); + short b = (short) mh2.invokeExact(Short.valueOf(x)); assert a == b : a + " != " + b; } @@ -164,8 +164,8 @@ if (DEBUG) System.out.println("int=" + x); MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(int.class, int.class)); MethodHandle mh2 = mh1.asType(MethodType.methodType(int.class, Integer.class)); - int a = mh1.invokeExact(x); - int b = mh2.invokeExact(Integer.valueOf(x)); + int a = (int) mh1.invokeExact(x); + int b = (int) mh2.invokeExact(Integer.valueOf(x)); assert a == b : a + " != " + b; }