7018277: JSR 292 change test/compiler/6987555/Test6987555.java to new MH syntax

Thu, 10 Feb 2011 00:47:59 -0800

author
twisti
date
Thu, 10 Feb 2011 00:47:59 -0800
changeset 2560
62a8557e8f36
parent 2559
72d6c57d0658
child 2561
ab42c7e1cf83

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

test/compiler/6987555/Test6987555.java file | annotate | diff | comparison | revisions
     1.1 --- a/test/compiler/6987555/Test6987555.java	Wed Feb 09 16:34:34 2011 -0800
     1.2 +++ b/test/compiler/6987555/Test6987555.java	Thu Feb 10 00:47:59 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -54,8 +54,8 @@
    1.11          if (DEBUG)  System.out.println("boolean=" + x);
    1.12          MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(boolean.class, boolean.class));
    1.13          MethodHandle mh2 = mh1.asType(MethodType.methodType(boolean.class, Boolean.class));
    1.14 -        boolean a = mh1.<boolean>invokeExact(x);
    1.15 -        boolean b = mh2.<boolean>invokeExact(Boolean.valueOf(x));
    1.16 +        boolean a = (boolean) mh1.invokeExact(x);
    1.17 +        boolean b = (boolean) mh2.invokeExact(Boolean.valueOf(x));
    1.18          assert a == b : a + " != " + b;
    1.19      }
    1.20  
    1.21 @@ -80,8 +80,8 @@
    1.22          if (DEBUG)  System.out.println("byte=" + x);
    1.23          MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(byte.class, byte.class));
    1.24          MethodHandle mh2 = mh1.asType(MethodType.methodType(byte.class, Byte.class));
    1.25 -        byte a = mh1.<byte>invokeExact(x);
    1.26 -        byte b = mh2.<byte>invokeExact(Byte.valueOf(x));
    1.27 +        byte a = (byte) mh1.invokeExact(x);
    1.28 +        byte b = (byte) mh2.invokeExact(Byte.valueOf(x));
    1.29          assert a == b : a + " != " + b;
    1.30      }
    1.31  
    1.32 @@ -104,8 +104,8 @@
    1.33          if (DEBUG)  System.out.println("char=" + x);
    1.34          MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(char.class, char.class));
    1.35          MethodHandle mh2 = mh1.asType(MethodType.methodType(char.class, Character.class));
    1.36 -        char a = mh1.<char>invokeExact(x);
    1.37 -        char b = mh2.<char>invokeExact(Character.valueOf(x));
    1.38 +        char a = (char) mh1.invokeExact(x);
    1.39 +        char b = (char) mh2.invokeExact(Character.valueOf(x));
    1.40          assert a == b : a + " != " + b;
    1.41      }
    1.42  
    1.43 @@ -134,8 +134,8 @@
    1.44          if (DEBUG)  System.out.println("short=" + x);
    1.45          MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(short.class, short.class));
    1.46          MethodHandle mh2 = mh1.asType(MethodType.methodType(short.class, Short.class));
    1.47 -        short a = mh1.<short>invokeExact(x);
    1.48 -        short b = mh2.<short>invokeExact(Short.valueOf(x));
    1.49 +        short a = (short) mh1.invokeExact(x);
    1.50 +        short b = (short) mh2.invokeExact(Short.valueOf(x));
    1.51          assert a == b : a + " != " + b;
    1.52      }
    1.53  
    1.54 @@ -164,8 +164,8 @@
    1.55          if (DEBUG)  System.out.println("int=" + x);
    1.56          MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(int.class, int.class));
    1.57          MethodHandle mh2 = mh1.asType(MethodType.methodType(int.class, Integer.class));
    1.58 -        int a = mh1.<int>invokeExact(x);
    1.59 -        int b = mh2.<int>invokeExact(Integer.valueOf(x));
    1.60 +        int a = (int) mh1.invokeExact(x);
    1.61 +        int b = (int) mh2.invokeExact(Integer.valueOf(x));
    1.62          assert a == b : a + " != " + b;
    1.63      }
    1.64  

mercurial