Skip to content

Instantly share code, notes, and snippets.

@bobmcwhirter
Last active April 30, 2020 19:18
Show Gist options
  • Save bobmcwhirter/9dcca0a064bb6c49c773023e4e1cf8ef to your computer and use it in GitHub Desktop.
Save bobmcwhirter/9dcca0a064bb6c49c773023e4e1cf8ef to your computer and use it in GitHub Desktop.
public static int foo();
descriptor: ()I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=3, args_size=0
0: invokestatic #2 // Method bar:()V
3: aconst_null
4: invokestatic #3 // Method dump:(Ljava/lang/Object;)V
7: goto 26
10: astore_0
11: iconst_2
12: istore_1
13: aconst_null
14: invokestatic #3 // Method dump:(Ljava/lang/Object;)V
17: iload_1
18: ireturn
19: astore_2
20: aconst_null
21: invokestatic #3 // Method dump:(Ljava/lang/Object;)V
24: aload_2
25: athrow
26: iconst_0
27: ireturn
Exception table:
from to target type
0 3 10 Class java/lang/IllegalArgumentException
0 3 19 any
10 13 19 any
public static int foo() {
try {
bar();
} catch (IllegalArgumentException e) {
return 2;
} finally {
dump(null);
}
return 0;
}
public static void dump(Object o) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment