changeset 32649 | 2ee9017c7597 |
parent 23338 | 0a84d339822a |
32648:1fa861caf840 | 32649:2ee9017c7597 |
---|---|
33 import java.lang.invoke.*; |
33 import java.lang.invoke.*; |
34 import org.junit.*; |
34 import org.junit.*; |
35 import static org.junit.Assert.*; |
35 import static org.junit.Assert.*; |
36 |
36 |
37 public class TestCatchException { |
37 public class TestCatchException { |
38 final static MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); |
38 static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); |
39 final static MethodType M_TYPE = MethodType.methodType(int.class, Object.class, Object.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class); |
39 static final MethodType M_TYPE = MethodType.methodType(int.class, Object.class, Object.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class); |
40 |
40 |
41 private static int noThrow(Object o1, Object o2, int i1, int i2, int i3, int i4, int i5, int i6, int i7) { |
41 private static int noThrow(Object o1, Object o2, int i1, int i2, int i3, int i4, int i5, int i6, int i7) { |
42 return 42; |
42 return 42; |
43 } |
43 } |
44 |
44 |
70 |
70 |
71 int x = (int)h.invokeExact(new Object(), new Object(), 1, 2, 3, 4, 5, 6, 7); |
71 int x = (int)h.invokeExact(new Object(), new Object(), 1, 2, 3, 4, 5, 6, 7); |
72 assertEquals(x, 17); |
72 assertEquals(x, 17); |
73 } |
73 } |
74 |
74 |
75 final static Object masterParam = new Object(); |
75 static final Object masterParam = new Object(); |
76 final static Object[] masterTail = new Object[] { "str" }; |
76 static final Object[] masterTail = new Object[] { "str" }; |
77 static Exception masterEx = new Exception(); |
77 static Exception masterEx = new Exception(); |
78 |
78 |
79 public static Object m1(Object o1, Object o2, Object o3, Object o4, Object o5, |
79 public static Object m1(Object o1, Object o2, Object o3, Object o4, Object o5, |
80 Object o6, Object o7, Object o8, Object... tail) { |
80 Object o6, Object o7, Object o8, Object... tail) { |
81 assertEquals(masterParam, o1); |
81 assertEquals(masterParam, o1); |