Created
June 13, 2017 16:15
-
-
Save leonard84/1c91f8aebd0b8af599a6925404e5a11c to your computer and use it in GitHub Desktop.
TryCatchProblem - Decompiled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public doCall(java.lang.Object arg0) { //(Ljava/lang/Object;)Ljava/lang/Object; | |
<localVar:index=0 , name=this , desc=LTryCatchProblem$_test_closure1;, sig=null, start=L1, end=L2> | |
<localVar:index=1 , name=it , desc=Ljava/lang/Object;, sig=null, start=L1, end=L2> | |
<localVar:index=2 , name=collector , desc=LErrorCollector;, sig=null, start=L3, end=L2> | |
<localVar:index=3 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L4, end=L5> | |
<localVar:index=5 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L6, end=L7> | |
<localVar:index=8 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L8, end=L9> | |
TryCatch: L10 to L11 handled by L11: java/lang/Throwable | |
TryCatch: L10 to L11 handled by L12: Type is null. | |
TryCatch: L11 to L5 handled by L12: Type is null. | |
TryCatch: L13 to L14 handled by L14: java/lang/Throwable | |
TryCatch: L13 to L14 handled by L15: Type is null. | |
TryCatch: L14 to L7 handled by L15: Type is null. | |
TryCatch: L16 to L17 handled by L18: java/lang/Throwable | |
TryCatch: L19 to L18 handled by L18: java/lang/Throwable | |
TryCatch: L16 to L17 handled by L20: Type is null. | |
TryCatch: L19 to L18 handled by L20: Type is null. | |
TryCatch: L18 to L21 handled by L20: Type is null. | |
TryCatch: L22 to L9 handled by L20: Type is null. | |
TryCatch: L10 to L23 handled by L24: Type is null. | |
TryCatch: L25 to L26 handled by L24: Type is null. | |
TryCatch: L27 to L28 handled by L24: Type is null. | |
L1 { | |
new ErrorCollector | |
dup | |
invokespecial ErrorCollector <init>(()V); | |
astore2 | |
} | |
L3 { | |
aload2 | |
pop | |
} | |
L10 { | |
ldc "a" (java.lang.String) | |
invokestatic org/junit/Assert fail((Ljava/lang/String;)V); | |
aconst_null | |
pop | |
goto L29 | |
} | |
L11 { | |
astore3 | |
} | |
L4 { | |
aload2 | |
aload3 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
pop | |
nop | |
} | |
L5 { | |
goto L29 | |
} | |
L29 { | |
nop | |
goto L13 | |
} | |
L12 { | |
astore4 | |
aload4 | |
athrow | |
} | |
L13 { | |
ldc "b" (java.lang.String) | |
invokestatic org/junit/Assert fail((Ljava/lang/String;)V); | |
aconst_null | |
pop | |
goto L30 | |
} | |
L14 { | |
astore5 | |
} | |
L6 { | |
aload2 | |
aload5 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
pop | |
nop | |
} | |
L7 { | |
goto L30 | |
} | |
L30 { | |
nop | |
goto L16 | |
} | |
L15 { | |
astore6 | |
aload6 | |
athrow | |
} | |
L16 { | |
ldc "c" (java.lang.String) | |
iconst_1 | |
invokestatic org/junit/Assert assertTrue((Ljava/lang/String;Z)V); | |
aconst_null | |
astore7 | |
nop | |
} | |
L17 { | |
nop | |
} | |
L19 { | |
nop | |
} | |
L23 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
} | |
L25 { | |
aload7 | |
areturn | |
goto L31 | |
} | |
L18 { | |
astore8 | |
} | |
L8 { | |
aload2 | |
aload8 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
astore9 | |
nop | |
} | |
L21 { | |
nop | |
} | |
L22 { | |
nop | |
} | |
L26 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
} | |
L27 { | |
aload9 | |
areturn | |
nop | |
} | |
L9 { | |
goto L31 | |
} | |
L31 { | |
nop | |
goto L32 | |
} | |
L20 { | |
astore10 | |
aload10 | |
athrow | |
} | |
L32 { | |
goto L28 | |
} | |
L28 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
goto L2 | |
} | |
L24 { | |
astore11 | |
} | |
L33 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
aload11 | |
athrow | |
} | |
L2 { | |
aconst_null | |
areturn | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Object doCall(final Object it) { | |
final ErrorCollector collector = new ErrorCollector(); | |
try { | |
try { | |
Assert.fail("a"); | |
} | |
catch (Throwable e) { | |
collector.collect(e); | |
} | |
try { | |
Assert.fail("b"); | |
} | |
catch (Throwable e2) { | |
collector.collect(e2); | |
} | |
Object o = null; | |
try { | |
Assert.assertTrue("c", true); | |
o = null; | |
try { | |
final ErrorCollector errorCollector = collector; | |
errorCollector.check(); | |
return o; | |
} | |
catch (Throwable e3) { | |
collector.collect(e3); | |
final Object o3 = null; | |
collector.check(); | |
return o3; | |
} | |
} | |
catch (Throwable t) {} | |
try { | |
final ErrorCollector errorCollector = collector; | |
errorCollector.check(); | |
return o; | |
} | |
finally {} | |
collector.check(); | |
} | |
finally { | |
collector.check(); | |
} | |
return null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public doCall(java.lang.Object arg0) { //(Ljava/lang/Object;)Ljava/lang/Object; | |
<localVar:index=0 , name=this , desc=LTryCatchProblem$_test_closure1;, sig=null, start=L1, end=L2> | |
<localVar:index=1 , name=it , desc=Ljava/lang/Object;, sig=null, start=L1, end=L2> | |
<localVar:index=2 , name=collector , desc=LErrorCollector;, sig=null, start=L3, end=L2> | |
<localVar:index=3 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L4, end=L5> | |
<localVar:index=5 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L6, end=L7> | |
<localVar:index=8 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L8, end=L9> | |
TryCatch: L10 to L11 handled by L11: java/lang/Throwable | |
TryCatch: L10 to L11 handled by L12: Type is null. | |
TryCatch: L11 to L5 handled by L12: Type is null. | |
TryCatch: L13 to L14 handled by L14: java/lang/Throwable | |
TryCatch: L13 to L14 handled by L15: Type is null. | |
TryCatch: L14 to L7 handled by L15: Type is null. | |
TryCatch: L16 to L17 handled by L18: java/lang/Throwable | |
TryCatch: L19 to L18 handled by L18: java/lang/Throwable | |
TryCatch: L16 to L17 handled by L20: Type is null. | |
TryCatch: L19 to L18 handled by L20: Type is null. | |
TryCatch: L18 to L21 handled by L20: Type is null. | |
TryCatch: L22 to L9 handled by L20: Type is null. | |
TryCatch: L10 to L17 handled by L23: Type is null. | |
TryCatch: L19 to L21 handled by L23: Type is null. | |
TryCatch: L22 to L24 handled by L23: Type is null. | |
L1 { | |
new ErrorCollector | |
dup | |
invokespecial ErrorCollector <init>(()V); | |
astore2 | |
} | |
L3 { | |
aload2 | |
pop | |
} | |
L10 { | |
ldc "a" (java.lang.String) | |
invokestatic org/junit/Assert fail((Ljava/lang/String;)V); | |
aconst_null | |
pop | |
goto L25 | |
} | |
L11 { | |
astore3 | |
} | |
L4 { | |
aload2 | |
aload3 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
pop | |
nop | |
} | |
L5 { | |
goto L25 | |
} | |
L25 { | |
nop | |
goto L13 | |
} | |
L12 { | |
astore4 | |
aload4 | |
athrow | |
} | |
L13 { | |
ldc "b" (java.lang.String) | |
invokestatic org/junit/Assert fail((Ljava/lang/String;)V); | |
aconst_null | |
pop | |
goto L26 | |
} | |
L14 { | |
astore5 | |
} | |
L6 { | |
aload2 | |
aload5 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
pop | |
nop | |
} | |
L7 { | |
goto L26 | |
} | |
L26 { | |
nop | |
goto L16 | |
} | |
L15 { | |
astore6 | |
aload6 | |
athrow | |
} | |
L16 { | |
ldc "c" (java.lang.String) | |
iconst_1 | |
invokestatic org/junit/Assert assertTrue((Ljava/lang/String;Z)V); | |
aconst_null | |
astore7 | |
nop | |
} | |
L17 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
} | |
L19 { | |
aload7 | |
areturn | |
goto L27 | |
} | |
L18 { | |
astore8 | |
} | |
L8 { | |
aload2 | |
aload8 | |
invokevirtual ErrorCollector collect((Ljava/lang/Throwable;)V); | |
aconst_null | |
astore9 | |
nop | |
} | |
L21 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
} | |
L22 { | |
aload9 | |
areturn | |
nop | |
} | |
L9 { | |
goto L27 | |
} | |
L27 { | |
nop | |
goto L28 | |
} | |
L20 { | |
astore10 | |
aload10 | |
athrow | |
} | |
L28 { | |
goto L24 | |
} | |
L24 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
nop | |
goto L2 | |
} | |
L23 { | |
astore11 | |
} | |
L29 { | |
aload2 | |
invokevirtual ErrorCollector check(()V); | |
aconst_null | |
pop | |
aload11 | |
athrow | |
} | |
L2 { | |
aconst_null | |
areturn | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Object doCall(final Object it) { | |
final ErrorCollector collector = new ErrorCollector(); | |
try { | |
try { | |
Assert.fail("a"); | |
} | |
catch (Throwable e) { | |
collector.collect(e); | |
} | |
try { | |
Assert.fail("b"); | |
} | |
catch (Throwable e2) { | |
collector.collect(e2); | |
} | |
try { | |
Assert.assertTrue("c", true); | |
final Object o = null; | |
collector.check(); | |
return o; | |
} | |
catch (Throwable e3) { | |
collector.collect(e3); | |
final Object o2 = null; | |
collector.check(); | |
return o2; | |
} | |
collector.check(); | |
} | |
finally { | |
collector.check(); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment