diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java index 3287e1e426..09cbe62ee9 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java @@ -780,6 +780,7 @@ private boolean compareBasicBlocksEx(ControlFlowGraph graph, List lstStoreVars) { InstructionSequence seqPattern = pattern.getSeq(); InstructionSequence seqSample = sample.getSeq(); + List instrOldOffsetsSample = sample.getInstrOldOffsets(); if (type != 0) { seqPattern = seqPattern.clone(); @@ -822,6 +823,7 @@ private boolean compareBasicBlocksEx(ControlFlowGraph graph, seq.addInstruction(0, seqSample.getInstr(i), -1); oldOffsets.addFirst(sample.getOldOffset(i)); seqSample.removeInstruction(i); + instrOldOffsetsSample.remove(i); } BasicBlock newblock = new BasicBlock(++graph.last_id); @@ -1010,26 +1012,31 @@ private static void deleteArea(ControlFlowGraph graph, Area area) { private static void removeExceptionInstructionsEx(BasicBlock block, int blocktype, int finallytype) { InstructionSequence seq = block.getSeq(); + List instrOldOffsets = block.getInstrOldOffsets(); if (finallytype == 3) { // empty finally handler for (int i = seq.length() - 1; i >= 0; i--) { seq.removeInstruction(i); + instrOldOffsets.remove(i); } } else { if ((blocktype & 1) > 0) { // first if (finallytype == 2 || finallytype == 1) { // astore or pop seq.removeInstruction(0); + instrOldOffsets.remove(0); } } if ((blocktype & 2) > 0) { // last if (finallytype == 2 || finallytype == 0) { seq.removeLast(); + instrOldOffsets.remove(instrOldOffsets.size() - 1); } if (finallytype == 2) { // astore seq.removeLast(); + instrOldOffsets.remove(instrOldOffsets.size() - 1); } } } diff --git a/test/org/jetbrains/java/decompiler/SingleClassesTest.java b/test/org/jetbrains/java/decompiler/SingleClassesTest.java index 4dcd9d121f..da97cfd744 100644 --- a/test/org/jetbrains/java/decompiler/SingleClassesTest.java +++ b/test/org/jetbrains/java/decompiler/SingleClassesTest.java @@ -153,6 +153,7 @@ private void registerDefault() { register(JAVA_8, "TestAnonymousClassConstructor"); register(JAVA_8, "TestInnerClassConstructor"); register(CUSTOM, "v11/TestInnerClassConstructor"); + // [minor] todo: the linenumbers are incorrect on the finally block register(JAVA_8, "TestTryCatchFinally"); register(JAVA_8, "TestTryFinally"); register(JAVA_8, "TestAmbiguousCall"); diff --git a/testData/results/TestHotjava.dec b/testData/results/TestHotjava.dec index bcdebb4f8b..cd8d81230c 100644 --- a/testData/results/TestHotjava.dec +++ b/testData/results/TestHotjava.dec @@ -7,9 +7,9 @@ public class TestHotjava { try { System.out.println("Try");// 7 8 } finally { - System.out.println("Jsr"); + System.out.println("Jsr");// 10 } - }// 10 + } // $VF: Could not inline inconsistent finally blocks // $VF: Could not create synchronized statement, marking monitor enters and exits @@ -50,7 +50,7 @@ public class TestHotjava { try { System.out.println("Try");// 28 29 } finally { - System.out.println("Jsr"); + System.out.println("Jsr");// 31 } } catch (Throwable var10) { // $VF: monitorexit @@ -81,13 +81,15 @@ class 'TestHotjava' { 3 7 4 7 5 7 - c 9 d 9 e 9 f 9 10 9 11 9 12 9 + 13 9 + 14 9 + 15 9 18 11 } @@ -133,7 +135,6 @@ class 'TestHotjava' { 7 50 8 50 9 50 - 12 52 13 52 14 52 15 52 @@ -141,6 +142,9 @@ class 'TestHotjava' { 17 52 18 52 19 52 + 1a 52 + 1b 52 + 1c 52 25 59 26 60 28 55 @@ -153,7 +157,7 @@ Lines mapping: 3 <-> 3 7 <-> 8 8 <-> 8 -10 <-> 12 +10 <-> 10 15 <-> 17 16 <-> 20 21 <-> 32 @@ -161,5 +165,4 @@ Lines mapping: 27 <-> 47 28 <-> 51 29 <-> 51 -Not mapped: -31 +31 <-> 53 diff --git a/testData/results/TestJsr.dec b/testData/results/TestJsr.dec index fafc379fa9..048ee69efd 100644 --- a/testData/results/TestJsr.dec +++ b/testData/results/TestJsr.dec @@ -3,9 +3,9 @@ public class TestJsr { try { System.out.println("Test");// 3 4 } finally { - System.out.println("Jsr"); + System.out.println("Jsr");// 6 } - }// 6 + } } class 'TestJsr' { @@ -16,13 +16,15 @@ class 'TestJsr' { 3 3 4 3 5 3 - c 5 d 5 e 5 f 5 10 5 11 5 12 5 + 13 5 + 14 5 + 15 5 18 7 } } @@ -30,4 +32,4 @@ class 'TestJsr' { Lines mapping: 3 <-> 4 4 <-> 4 -6 <-> 8 +6 <-> 6 diff --git a/testData/results/pkg/TestClassLoop.dec b/testData/results/pkg/TestClassLoop.dec index 3727b42140..28d8793fda 100644 --- a/testData/results/pkg/TestClassLoop.dec +++ b/testData/results/pkg/TestClassLoop.dec @@ -124,12 +124,12 @@ class 'pkg/TestClassLoop' { e 14 f 14 1a 15 - 26 18 27 18 28 18 29 18 2a 18 2b 18 + 2c 18 } method 'testCatch ()V' { @@ -168,8 +168,8 @@ class 'pkg/TestClassLoop' { 11 43 12 43 13 43 - 25 46 26 46 + 27 46 2a 47 2b 47 2c 47 diff --git a/testData/results/pkg/TestClassSimpleBytecodeMapping.dec b/testData/results/pkg/TestClassSimpleBytecodeMapping.dec index 8d02210c45..67ebc91954 100644 --- a/testData/results/pkg/TestClassSimpleBytecodeMapping.dec +++ b/testData/results/pkg/TestClassSimpleBytecodeMapping.dec @@ -105,12 +105,12 @@ class 'pkg/TestClassSimpleBytecodeMapping' { 13 25 14 25 15 25 - 23 27 24 27 25 27 26 27 27 27 28 27 + 29 27 2e 29 } diff --git a/testData/results/pkg/TestClassVar.dec b/testData/results/pkg/TestClassVar.dec index 7bac467148..10b710be00 100644 --- a/testData/results/pkg/TestClassVar.dec +++ b/testData/results/pkg/TestClassVar.dec @@ -49,11 +49,11 @@ class 'pkg/TestClassVar' { 9 9 a 9 b 9 - 1e 11 1f 11 20 11 21 11 22 11 + 23 11 26 12 27 12 28 12 diff --git a/testData/results/pkg/TestComplexIfElseChain.dec b/testData/results/pkg/TestComplexIfElseChain.dec index 6b7c79243d..057614e213 100644 --- a/testData/results/pkg/TestComplexIfElseChain.dec +++ b/testData/results/pkg/TestComplexIfElseChain.dec @@ -1036,8 +1036,8 @@ class 'pkg/TestComplexIfElseChain' { 12 201 13 201 14 201 - 83 203 84 203 + 85 203 88 203 89 203 8a 203 @@ -1125,8 +1125,8 @@ class 'pkg/TestComplexIfElseChain' { 12 222 13 222 14 222 - 83 224 84 224 + 85 224 88 224 89 224 8a 224 @@ -1285,9 +1285,8 @@ class 'pkg/TestComplexIfElseChain' { 12 255 13 255 14 255 - f9 257 - fa 257 fb 257 + fc 257 ff 257 100 257 101 257 @@ -1297,13 +1296,12 @@ class 'pkg/TestComplexIfElseChain' { 107 259 108 259 109 259 - 117 261 - 118 261 119 261 11a 261 11b 261 11c 261 11d 261 + 11e 261 127 263 128 263 129 263 @@ -1316,13 +1314,12 @@ class 'pkg/TestComplexIfElseChain' { 134 265 135 265 136 265 - 144 267 - 145 267 146 267 147 267 148 267 149 267 14a 267 + 14b 267 154 269 155 269 156 269 @@ -1335,13 +1332,12 @@ class 'pkg/TestComplexIfElseChain' { 161 271 162 271 163 271 - 171 273 - 172 273 173 273 174 273 175 273 176 273 177 273 + 178 273 181 275 182 275 183 275 @@ -1356,13 +1352,12 @@ class 'pkg/TestComplexIfElseChain' { 190 277 191 277 192 277 - 1a0 279 - 1a1 279 1a2 279 1a3 279 1a4 279 1a5 279 1a6 279 + 1a7 279 1b0 281 1b1 281 1b2 281 @@ -1377,13 +1372,12 @@ class 'pkg/TestComplexIfElseChain' { 1bf 283 1c0 283 1c1 283 - 1cf 285 - 1d0 285 1d1 285 1d2 285 1d3 285 1d4 285 1d5 285 + 1d6 285 1df 289 } } diff --git a/testData/results/pkg/TestFinallyBlockVariableUse.dec b/testData/results/pkg/TestFinallyBlockVariableUse.dec index 63325ea82c..c93d4449ee 100644 --- a/testData/results/pkg/TestFinallyBlockVariableUse.dec +++ b/testData/results/pkg/TestFinallyBlockVariableUse.dec @@ -66,15 +66,14 @@ class 'pkg/TestFinallyBlockVariableUse' { 4d 15 4e 15 4f 15 - 50 18 - 51 18 52 18 53 18 54 18 55 18 - 56 19 + 56 18 57 19 58 19 + 59 19 5c 20 63 20 64 20 diff --git a/testData/results/pkg/TestFinallyThrow.dec b/testData/results/pkg/TestFinallyThrow.dec index a778f92a16..392b1ed5e1 100644 --- a/testData/results/pkg/TestFinallyThrow.dec +++ b/testData/results/pkg/TestFinallyThrow.dec @@ -64,12 +64,11 @@ class 'pkg/TestFinallyThrow' { 47 14 48 14 49 14 - 4a 16 - 4b 16 4c 16 4d 16 4e 16 4f 16 + 50 16 } method 'test1 (Ljava/lang/RuntimeException;)V' { diff --git a/testData/results/pkg/TestIfElseTernary1.dec b/testData/results/pkg/TestIfElseTernary1.dec index 561ddfcd9d..fb1ce28e2b 100644 --- a/testData/results/pkg/TestIfElseTernary1.dec +++ b/testData/results/pkg/TestIfElseTernary1.dec @@ -605,22 +605,22 @@ class 'pkg/TestIfElseTernary1' { a3 108 a4 108 ae 111 - af 113 - b0 113 b1 113 b2 113 - b4 114 - b5 114 - b9 114 + b3 113 + b6 114 + b7 114 + b8 114 ba 114 - bb 115 + bb 114 bc 115 bd 115 be 115 bf 115 - c7 116 - c8 116 - c9 116 + c0 115 + c1 115 + c2 115 + ca 116 } } diff --git a/testData/results/pkg/TestIfElseTernary1J17.dec b/testData/results/pkg/TestIfElseTernary1J17.dec index 3fa30435ed..0d81742d1d 100644 --- a/testData/results/pkg/TestIfElseTernary1J17.dec +++ b/testData/results/pkg/TestIfElseTernary1J17.dec @@ -605,22 +605,22 @@ class 'pkg/TestIfElseTernary1J17' { a3 108 a4 108 ae 111 - af 113 - b0 113 b1 113 b2 113 - b4 114 - b5 114 - b9 114 + b3 113 + b6 114 + b7 114 + b8 114 ba 114 - bb 115 + bb 114 bc 115 bd 115 be 115 bf 115 - c7 116 - c8 116 - c9 116 + c0 115 + c1 115 + c2 115 + ca 116 } } diff --git a/testData/results/pkg/TestLoopFinally.dec b/testData/results/pkg/TestLoopFinally.dec index fb0e5c85d7..5246bb57cb 100644 --- a/testData/results/pkg/TestLoopFinally.dec +++ b/testData/results/pkg/TestLoopFinally.dec @@ -109,7 +109,7 @@ public class TestLoopFinally { return var2 + var3;// 128 } } finally { - if (x > 3) {// 119 120 + if (x > 3) {// 120 return 1;// 126 } } @@ -191,25 +191,23 @@ class 'pkg/TestLoopFinally' { b 6 c 6 27 4 - 2a 8 2b 8 2c 8 2d 8 2e 8 2f 8 - 30 9 - 31 9 - 32 9 + 30 8 + 31 8 + 32 8 33 9 34 9 + 35 9 3b 13 3c 13 3d 13 3e 13 3f 13 40 13 - 41 13 - 42 13 4b 17 4c 17 4d 17 @@ -233,17 +231,17 @@ class 'pkg/TestLoopFinally' { a 23 b 23 c 23 - 42 25 43 25 44 25 45 25 46 25 47 25 - 48 26 - 49 26 - 4a 26 + 48 25 + 49 25 + 4a 25 4b 26 4c 26 + 4d 26 50 35 51 35 52 35 @@ -271,8 +269,6 @@ class 'pkg/TestLoopFinally' { 6e 32 6f 32 70 32 - 71 32 - 72 32 75 21 76 21 77 21 @@ -299,17 +295,17 @@ class 'pkg/TestLoopFinally' { a 46 b 46 c 46 - 1f 48 20 48 21 48 22 48 23 48 24 48 - 25 49 - 26 49 - 27 49 + 25 48 + 26 48 + 27 48 28 49 29 49 + 2a 49 30 44 31 44 32 44 @@ -358,9 +354,9 @@ class 'pkg/TestLoopFinally' { 36 72 39 73 44 73 - 4d 76 4e 76 4f 76 + 50 76 58 80 59 80 5a 80 @@ -383,9 +379,9 @@ class 'pkg/TestLoopFinally' { 3 89 6 90 11 90 - 1a 93 1b 93 1c 93 + 1d 93 25 97 26 97 27 97 @@ -401,9 +397,9 @@ class 'pkg/TestLoopFinally' { 3 105 6 106 7 106 - 1f 111 20 111 21 111 + 22 111 2b 115 2c 115 2d 115 @@ -431,13 +427,12 @@ class 'pkg/TestLoopFinally' { b 128 16 129 17 130 - 24 136 - 25 136 26 136 27 136 28 136 29 136 2a 136 + 2b 136 } method 'testConditionalBreakInFinally ()V' { @@ -457,11 +452,11 @@ class 'pkg/TestLoopFinally' { 1e 147 1f 147 20 147 - 2d 149 2e 149 2f 149 30 149 31 149 + 32 149 38 154 39 154 43 150 @@ -485,11 +480,11 @@ class 'pkg/TestLoopFinally' { 6 165 19 176 2f 167 - 30 170 - 31 170 32 170 33 170 34 170 + 35 170 + 36 170 37 172 38 172 39 172 @@ -548,7 +543,6 @@ Lines mapping: 104 <-> 95 114 <-> 106 115 <-> 107 -119 <-> 112 120 <-> 112 124 <-> 116 126 <-> 113 @@ -582,6 +576,7 @@ Not mapped: 83 99 101 +119 121 123 140 diff --git a/testData/results/pkg/TestSwitchFinally.dec b/testData/results/pkg/TestSwitchFinally.dec index 03b718c234..c45fa10267 100644 --- a/testData/results/pkg/TestSwitchFinally.dec +++ b/testData/results/pkg/TestSwitchFinally.dec @@ -49,7 +49,7 @@ public class TestSwitchFinally { try { System.out.println(1);// 57 } finally { - System.out.println("finally");// 59 + System.out.println("finally"); switch(i) {// 61 case 0: System.out.println("0");// 63 @@ -65,7 +65,7 @@ public class TestSwitchFinally { System.out.println("b"); } - System.out.println("d"); + System.out.println("d");// 59 return 1; } } @@ -78,16 +78,16 @@ class 'pkg/TestSwitchFinally' { 3 5 4 5 34 15 - 37 7 38 7 39 7 3a 7 3b 7 3c 7 - 3d 8 - 3e 8 - 3f 8 + 3d 7 + 3e 7 + 3f 7 40 8 + 41 8 54 10 55 10 56 10 @@ -100,8 +100,6 @@ class 'pkg/TestSwitchFinally' { 5f 13 60 13 61 13 - 62 13 - 63 13 } method 'test1 (I)V' { @@ -111,16 +109,16 @@ class 'pkg/TestSwitchFinally' { 3 19 4 19 47 32 - 4a 21 4b 21 4c 21 4d 21 4e 21 4f 21 - 50 22 - 51 22 - 52 22 + 50 21 + 51 21 + 52 21 53 22 + 54 22 70 24 71 24 72 24 @@ -142,8 +140,6 @@ class 'pkg/TestSwitchFinally' { 86 30 87 30 88 30 - 89 30 - 8a 30 } method 'test2 (I)V' { @@ -153,16 +149,16 @@ class 'pkg/TestSwitchFinally' { 3 36 4 36 2c 45 - 2f 38 30 38 31 38 32 38 33 38 34 38 - 35 39 - 36 39 - 37 39 + 35 38 + 36 38 + 37 38 38 39 + 39 39 44 41 45 41 46 41 @@ -177,8 +173,6 @@ class 'pkg/TestSwitchFinally' { 4f 42 50 42 51 42 - 52 42 - 53 42 } method 'test3 (I)I' { @@ -190,17 +184,17 @@ class 'pkg/TestSwitchFinally' { 52 67 53 67 54 67 - 55 51 + 55 67 56 51 57 51 58 51 59 51 5a 51 - 5b 52 - 5c 52 - 5d 52 + 5b 51 + 5c 51 + 5d 51 5e 52 - 5f 67 + 5f 52 60 67 61 67 62 67 @@ -309,7 +303,7 @@ Lines mapping: 50 <-> 43 51 <-> 46 57 <-> 50 -59 <-> 52 +59 <-> 68 61 <-> 53 63 <-> 55 64 <-> 56 diff --git a/testData/results/pkg/TestSwitchPatternMatching22.dec b/testData/results/pkg/TestSwitchPatternMatching22.dec index 28ab7c8a59..c0adc31dcc 100644 --- a/testData/results/pkg/TestSwitchPatternMatching22.dec +++ b/testData/results/pkg/TestSwitchPatternMatching22.dec @@ -118,13 +118,12 @@ class 'pkg/TestSwitchPatternMatching22' { 4b 17 50 13 51 13 - 5d 20 - 5e 20 5f 20 60 20 61 20 62 20 63 20 + 64 20 6a 22 } @@ -153,9 +152,7 @@ class 'pkg/TestSwitchPatternMatching22' { 47 35 4c 32 4d 32 - 5c 38 - 5d 38 - 5e 38 + 5f 38 } method 'test1Null ()V' { @@ -180,13 +177,12 @@ class 'pkg/TestSwitchPatternMatching22' { 4f 53 54 48 55 48 - 61 56 - 62 56 63 56 64 56 65 56 66 56 67 56 + 68 56 6e 58 } @@ -212,9 +208,7 @@ class 'pkg/TestSwitchPatternMatching22' { 4b 70 50 66 51 66 - 60 73 - 61 73 - 62 73 + 63 73 } method 'testNonPattern ()V' { @@ -236,9 +230,7 @@ class 'pkg/TestSwitchPatternMatching22' { 32 85 33 85 3b 86 - 49 89 - 4a 89 - 4b 89 + 4c 89 } } diff --git a/testData/results/pkg/TestSynchronizedLoop.dec b/testData/results/pkg/TestSynchronizedLoop.dec index c25efae915..aa3d3f56e8 100644 --- a/testData/results/pkg/TestSynchronizedLoop.dec +++ b/testData/results/pkg/TestSynchronizedLoop.dec @@ -162,18 +162,18 @@ class 'pkg/TestSynchronizedLoop' { 1f 47 20 47 21 47 - 37 49 38 49 39 49 3a 49 3b 49 3c 49 3d 49 - 3e 50 - 3f 50 - 40 50 + 3e 49 + 3f 49 + 40 49 41 50 42 50 + 43 50 50 56 51 56 52 56 diff --git a/testData/results/pkg/TestSynchronizedTry.dec b/testData/results/pkg/TestSynchronizedTry.dec index ab3a62f671..4c6f893b9a 100644 --- a/testData/results/pkg/TestSynchronizedTry.dec +++ b/testData/results/pkg/TestSynchronizedTry.dec @@ -93,10 +93,8 @@ class 'pkg/TestSynchronizedTry' { 6 6 7 6 9 7 - 27 9 - 28 9 - 2b 9 - 2c 9 + 29 9 + 2d 9 2e 10 2f 10 30 10 diff --git a/testData/results/pkg/TestTryCatchFinally.dec b/testData/results/pkg/TestTryCatchFinally.dec index ca4ddaa375..07e8bb2a6b 100644 --- a/testData/results/pkg/TestTryCatchFinally.dec +++ b/testData/results/pkg/TestTryCatchFinally.dec @@ -30,10 +30,10 @@ public class TestTryCatchFinally { } catch (Exception var6) {// 52 System.out.println("Error" + var6);// 53 } finally { - System.out.println("Finally");// 55 + System.out.println("Finally"); } - return -1;// 56 57 + return -1;// 55 56 57 } } @@ -52,13 +52,12 @@ class 'pkg/TestTryCatchFinally' { 18 8 19 8 1f 9 - 2b 12 - 2c 12 2d 12 2e 12 2f 12 30 12 31 12 + 32 12 38 14 } @@ -95,13 +94,13 @@ class 'pkg/TestTryCatchFinally' { 31 35 32 35 33 35 - 34 32 + 34 35 35 32 36 32 37 32 38 32 39 32 - 3a 35 + 3a 32 3b 35 3c 35 3d 35 @@ -124,7 +123,7 @@ Lines mapping: 51 <-> 29 52 <-> 30 53 <-> 31 -55 <-> 33 +55 <-> 36 56 <-> 36 57 <-> 36 Not mapped: diff --git a/testData/results/pkg/TestTryFinally.dec b/testData/results/pkg/TestTryFinally.dec index 61c6040e06..7e8d905f1b 100644 --- a/testData/results/pkg/TestTryFinally.dec +++ b/testData/results/pkg/TestTryFinally.dec @@ -19,10 +19,11 @@ class 'pkg/TestTryFinally' { 4 5 5 5 c 9 - f 7 10 7 11 7 12 7 + 13 7 + 14 7 } } diff --git a/testData/results/pkg/TestTryLoopReturnFinally.dec b/testData/results/pkg/TestTryLoopReturnFinally.dec index d3ccd694e6..5e6a7d96c7 100644 --- a/testData/results/pkg/TestTryLoopReturnFinally.dec +++ b/testData/results/pkg/TestTryLoopReturnFinally.dec @@ -36,12 +36,12 @@ class 'pkg/TestTryLoopReturnFinally' { 18 16 2c 19 2d 19 - 3b 21 3c 21 3d 21 3e 21 3f 21 40 21 + 41 21 46 23 } } diff --git a/testData/results/pkg/TestTryLoopSimpleFinally.dec b/testData/results/pkg/TestTryLoopSimpleFinally.dec index 8790c177b4..8f2d9098e4 100644 --- a/testData/results/pkg/TestTryLoopSimpleFinally.dec +++ b/testData/results/pkg/TestTryLoopSimpleFinally.dec @@ -48,12 +48,12 @@ class 'pkg/TestTryLoopSimpleFinally' { 1e 16 1f 17 20 17 - 2e 19 2f 19 30 19 31 19 32 19 33 19 + 34 19 39 21 } @@ -80,13 +80,12 @@ class 'pkg/TestTryLoopSimpleFinally' { 29 28 2b 28 37 37 - 3a 35 - 3b 35 3c 35 3d 35 3e 35 3f 35 40 35 + 41 35 } } diff --git a/testData/results/pkg/TestTryReturn.dec b/testData/results/pkg/TestTryReturn.dec index 25708ee61c..4d283a6e06 100644 --- a/testData/results/pkg/TestTryReturn.dec +++ b/testData/results/pkg/TestTryReturn.dec @@ -32,13 +32,13 @@ public class TestTryReturn { break label27; } } finally { - System.out.println("Finally");// 31 + System.out.println("Finally"); } return;// 28 } - System.out.println("suc");// 32 34 + System.out.println("suc");// 31 32 34 } public boolean testFinally2(Supplier supplier) { @@ -46,10 +46,10 @@ public class TestTryReturn { try { b = supplier.get();// 40 } finally { - System.out.println("Finally");// 42 + System.out.println("Finally"); } - return b;// 43 45 + return b;// 42 43 45 } public boolean testFinally3(boolean b, boolean c, int a, Supplier supplier) { @@ -77,10 +77,10 @@ public class TestTryReturn { try { b = supplier.get();// 67 } finally { - System.out.println("Finally");// 69 + System.out.println("Finally"); } - return b;// 70 72 + return b;// 69 70 72 } public boolean testFinally5(Supplier supplier) { @@ -178,7 +178,7 @@ public class TestTryReturn { } catch (Exception var14) {// 149 System.out.println(3);// 150 } finally { - continue;// 153 + continue; } } finally { boolean var7 = true;// 156 @@ -256,12 +256,12 @@ class 'pkg/TestTryReturn' { c 17 15 22 16 22 - 17 19 18 19 19 19 1a 19 1b 19 1c 19 + 1d 19 } method 'testFinally1 (Ljava/util/function/Supplier;)V' { @@ -285,13 +285,13 @@ class 'pkg/TestTryReturn' { 28 40 29 40 2a 40 - 2b 34 + 2b 40 2c 34 2d 34 2e 34 2f 34 30 34 - 31 40 + 31 34 32 40 33 40 34 40 @@ -318,13 +318,13 @@ class 'pkg/TestTryReturn' { 15 51 16 51 17 51 - 18 48 + 18 51 19 48 1a 48 1b 48 1c 48 1d 48 - 1e 51 + 1e 48 1f 51 20 51 21 51 @@ -370,13 +370,12 @@ class 'pkg/TestTryReturn' { 50 62 51 62 5e 62 - 5f 67 - 60 67 61 67 62 67 63 67 64 67 65 67 + 66 67 } method 'testFinally4 (Ljava/util/function/Supplier;)Z' { @@ -395,13 +394,13 @@ class 'pkg/TestTryReturn' { 17 82 18 82 19 82 - 1a 79 + 1a 82 1b 79 1c 79 1d 79 1e 79 1f 79 - 20 82 + 20 79 21 82 22 82 23 82 @@ -441,13 +440,12 @@ class 'pkg/TestTryReturn' { 2d 92 2e 92 2f 92 - 3b 94 - 3c 94 3d 94 3e 94 3f 94 40 94 41 94 + 42 94 48 97 49 97 } @@ -494,13 +492,12 @@ class 'pkg/TestTryReturn' { 3c 112 3d 112 3e 112 - 4a 114 - 4b 114 4c 114 4d 114 4e 114 4f 114 50 114 + 51 114 57 117 58 117 } @@ -511,12 +508,12 @@ class 'pkg/TestTryReturn' { 2 125 3 125 e 126 - 1a 129 1b 129 1c 129 1d 129 1e 129 1f 129 + 20 129 } method 'testPostdomFailure ()V' { @@ -539,11 +536,10 @@ class 'pkg/TestTryReturn' { 24 178 25 178 26 178 - 2f 180 - 38 183 - 39 183 3a 183 3b 183 + 3c 183 + 3d 183 41 186 } @@ -565,10 +561,10 @@ class 'pkg/TestTryReturn' { 1a 194 1b 194 21 195 - 22 198 - 23 198 24 198 25 198 + 26 198 + 27 198 } method 'testInvalidUse ()V' { @@ -591,19 +587,17 @@ class 'pkg/TestTryReturn' { 19 216 26 218 36 225 - 37 220 - 38 220 39 220 3a 220 3b 220 3c 220 + 3d 220 4a 217 - 4d 223 - 4e 223 4f 223 50 223 51 223 52 223 + 53 223 } } @@ -616,11 +610,11 @@ Lines mapping: 24 <-> 27 27 <-> 31 28 <-> 38 -31 <-> 35 +31 <-> 41 32 <-> 41 34 <-> 41 40 <-> 47 -42 <-> 49 +42 <-> 52 43 <-> 52 45 <-> 52 50 <-> 58 @@ -631,7 +625,7 @@ Lines mapping: 60 <-> 68 65 <-> 75 67 <-> 78 -69 <-> 80 +69 <-> 83 70 <-> 83 72 <-> 83 76 <-> 87 @@ -660,7 +654,6 @@ Lines mapping: 148 <-> 177 149 <-> 178 150 <-> 179 -153 <-> 181 156 <-> 184 159 <-> 187 164 <-> 191 @@ -689,6 +682,7 @@ Not mapped: 84 103 118 +153 157 175 191 diff --git a/testData/results/pkg/TestTryWithResourcesAfterSwitch.dec b/testData/results/pkg/TestTryWithResourcesAfterSwitch.dec index 00bed8889f..1d3a905ed1 100644 --- a/testData/results/pkg/TestTryWithResourcesAfterSwitch.dec +++ b/testData/results/pkg/TestTryWithResourcesAfterSwitch.dec @@ -142,13 +142,12 @@ class 'pkg/TestTryWithResourcesAfterSwitch' { 62 18 63 18 bf 24 - c2 20 - c3 20 c4 20 c5 20 c6 20 c7 20 c8 20 + c9 20 } } diff --git a/testData/results/pkg/TestTryWithResourcesCatchFinallyJ16.dec b/testData/results/pkg/TestTryWithResourcesCatchFinallyJ16.dec index ef7c945b84..bd6ed208b9 100644 --- a/testData/results/pkg/TestTryWithResourcesCatchFinallyJ16.dec +++ b/testData/results/pkg/TestTryWithResourcesCatchFinallyJ16.dec @@ -41,13 +41,12 @@ class 'pkg/TestTryWithResourcesCatchFinallyJ16' { 32 10 33 11 34 11 - 42 13 - 43 13 44 13 45 13 46 13 47 13 48 13 + 49 13 4f 15 } @@ -65,13 +64,12 @@ class 'pkg/TestTryWithResourcesCatchFinallyJ16' { 37 20 38 21 39 21 - 47 23 - 48 23 49 23 4a 23 4b 23 4c 23 4d 23 + 4e 23 54 25 } diff --git a/testData/results/pkg/TestTryWithResourcesFakeTrigger.dec b/testData/results/pkg/TestTryWithResourcesFakeTrigger.dec index 8f73334e01..b2f9dcf516 100644 --- a/testData/results/pkg/TestTryWithResourcesFakeTrigger.dec +++ b/testData/results/pkg/TestTryWithResourcesFakeTrigger.dec @@ -96,4 +96,4 @@ Not mapped: 16 18 30 -33 \ No newline at end of file +33 diff --git a/testData/results/pkg/TestTryWithResourcesFinallyJ16.dec b/testData/results/pkg/TestTryWithResourcesFinallyJ16.dec index c7fba8e88b..5f1f03eacc 100644 --- a/testData/results/pkg/TestTryWithResourcesFinallyJ16.dec +++ b/testData/results/pkg/TestTryWithResourcesFinallyJ16.dec @@ -35,13 +35,12 @@ class 'pkg/TestTryWithResourcesFinallyJ16' { b 9 c 9 2f 13 - 32 11 - 33 11 34 11 35 11 36 11 37 11 38 11 + 39 11 } method 'testFunc (Ljava/io/File;)V' { @@ -56,13 +55,12 @@ class 'pkg/TestTryWithResourcesFinallyJ16' { 8 17 9 17 34 21 - 37 19 - 38 19 39 19 3a 19 3b 19 3c 19 3d 19 + 3e 19 } method 'create (Ljava/io/File;)Ljava/util/Scanner;' { diff --git a/testData/results/pkg/TestTryWithResourcesNestedJ16.dec b/testData/results/pkg/TestTryWithResourcesNestedJ16.dec index a14278595a..9d2de4e9cc 100644 --- a/testData/results/pkg/TestTryWithResourcesNestedJ16.dec +++ b/testData/results/pkg/TestTryWithResourcesNestedJ16.dec @@ -91,31 +91,27 @@ class 'pkg/TestTryWithResourcesNestedJ16' { 27 23 28 23 29 23 - 53 25 - 54 25 55 25 56 25 57 25 58 25 - 87 28 - 88 28 + 59 25 89 28 8a 28 8b 28 8c 28 - b9 31 - ba 31 + 8d 28 bb 31 bc 31 bd 31 be 31 + bf 31 e5 36 - e8 34 - e9 34 ea 34 eb 34 ec 34 ed 34 + ee 34 } }