1 /* |
|
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 * or visit www.oracle.com if you need additional information or have any |
|
21 * questions. |
|
22 * |
|
23 */ |
|
24 |
|
25 /* |
|
26 WAS: |
|
27 |
|
28 class MethodNoReturn { |
|
29 void badMethod() {} |
|
30 } |
|
31 */ |
|
32 |
|
33 super class MethodNoReturn |
|
34 version 52:0 |
|
35 { |
|
36 |
|
37 |
|
38 Method "<init>":"()V" |
|
39 stack 1 locals 1 |
|
40 { |
|
41 aload_0; |
|
42 invokespecial Method java/lang/Object."<init>":"()V"; |
|
43 return; |
|
44 } |
|
45 |
|
46 Method badMethod:"()V" |
|
47 stack 0 locals 1 |
|
48 { |
|
49 /* |
|
50 should be: |
|
51 return; |
|
52 */ |
|
53 |
|
54 iconst_1; |
|
55 pop; |
|
56 iconst_1; |
|
57 pop; |
|
58 iconst_1; |
|
59 pop; |
|
60 iconst_1; |
|
61 pop; |
|
62 iconst_1; |
|
63 pop; |
|
64 iconst_1; |
|
65 pop; |
|
66 iconst_1; |
|
67 pop; |
|
68 iconst_1; |
|
69 pop; |
|
70 iconst_1; |
|
71 pop; |
|
72 iconst_1; |
|
73 pop; |
|
74 iconst_1; |
|
75 iconst_1; |
|
76 iconst_1; |
|
77 iconst_1; |
|
78 iconst_1; |
|
79 iconst_1; |
|
80 iconst_1; |
|
81 iconst_1; |
|
82 pop; |
|
83 pop; |
|
84 pop; |
|
85 pop; |
|
86 pop; |
|
87 pop; |
|
88 pop; |
|
89 pop; |
|
90 // no return here -- so this class will fail verification |
|
91 } |
|
92 |
|
93 } // end Class MethodNoReturn |
|