equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @summary Test that JVM_DoPrivilege throws java.lang.InternalError for an |
26 * @summary Test that JVM_DoPrivilege throws java.lang.AbstractMethodError for an |
27 * abstract run() method. |
27 * abstract run() method. |
28 * @bug 8183962 |
28 * @bug 8183962 |
29 * @compile DoPrivRunAbstract.jasm |
29 * @compile DoPrivRunAbstract.jasm |
30 * @compile DoPrivRunAbstract$VoidPrivActRunAbstract.jasm |
30 * @compile DoPrivRunAbstract$VoidPrivActRunAbstract.jasm |
31 * @run main DoPrivRunAbstract |
31 * @run main DoPrivRunAbstract |
54 // } |
54 // } |
55 // |
55 // |
56 // public static void main(String[] args) throws Exception { |
56 // public static void main(String[] args) throws Exception { |
57 // try { |
57 // try { |
58 // doPrivileged(() -> System.out.println(System.getProperty("java.home"))); |
58 // doPrivileged(() -> System.out.println(System.getProperty("java.home"))); |
59 // throw new RuntimeException("Expected InternalError not throw"); |
59 // throw new RuntimeException("Expected AbstractMethodError not throw"); |
60 // } catch (java.lang.InternalError e) { } |
60 // } catch (java.lang.AbstractMethodError e) { } |
61 // } |
61 // } |
62 //} |
62 //} |
63 |
63 |
64 super public class DoPrivRunAbstract version 51:0 { |
64 super public class DoPrivRunAbstract version 51:0 { |
65 |
65 |
80 try t0; |
80 try t0; |
81 invokedynamic InvokeDynamic REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;":perform:"()LDoPrivRunAbstract$VoidPrivActRunAbstract;" MethodType "()V", MethodHandle REF_invokeStatic:DoPrivRunAbstract.lambda$main$0:"()V", MethodType "()V"; |
81 invokedynamic InvokeDynamic REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;":perform:"()LDoPrivRunAbstract$VoidPrivActRunAbstract;" MethodType "()V", MethodHandle REF_invokeStatic:DoPrivRunAbstract.lambda$main$0:"()V", MethodType "()V"; |
82 invokestatic Method doPrivileged:"(LDoPrivRunAbstract$VoidPrivActRunAbstract;)V"; |
82 invokestatic Method doPrivileged:"(LDoPrivRunAbstract$VoidPrivActRunAbstract;)V"; |
83 new class java/lang/RuntimeException; |
83 new class java/lang/RuntimeException; |
84 dup; |
84 dup; |
85 ldc String "Expected InternalError not throw"; |
85 ldc String "Expected AbstractMethodError not throw"; |
86 invokespecial Method java/lang/RuntimeException."<init>":"(Ljava/lang/String;)V"; |
86 invokespecial Method java/lang/RuntimeException."<init>":"(Ljava/lang/String;)V"; |
87 athrow; |
87 athrow; |
88 endtry t0; |
88 endtry t0; |
89 catch t0 java/lang/InternalError; |
89 catch t0 java/lang/AbstractMethodError; |
90 stack_frame_type stack1; |
90 stack_frame_type stack1; |
91 stack_map class java/lang/InternalError; |
91 stack_map class java/lang/AbstractMethodError; |
92 astore_1; |
92 astore_1; |
93 return; |
93 return; |
94 } |
94 } |
95 |
95 |
96 private static synthetic Method lambda$main$0:"()V" stack 2 locals 0 { |
96 private static synthetic Method lambda$main$0:"()V" stack 2 locals 0 { |