fix extra semicolon in decompiled empty blocks IDEA-196314 #843
parent
8824c20cbb
commit
02fdbec132
Binary file not shown.
@ -0,0 +1,47 @@ |
||||
import java.util.Random; |
||||
|
||||
public class TestEmptyBlocks { |
||||
public static void foo() { |
||||
try { |
||||
boolean var0 = false;// 22 |
||||
} catch (Exception var1) {// 23 |
||||
} |
||||
|
||||
for(int i = 0; i < 5; ++i) {// 27 |
||||
} |
||||
|
||||
while((new Random()).nextBoolean()) {// 31 |
||||
} |
||||
|
||||
if ((new Random()).nextBoolean()) {// 35 |
||||
} |
||||
|
||||
}// 38 |
||||
} |
||||
|
||||
class 'TestEmptyBlocks' { |
||||
method 'foo ()V' { |
||||
0 5 |
||||
1 5 |
||||
5 6 |
||||
6 9 |
||||
7 9 |
||||
9 9 |
||||
a 9 |
||||
d 9 |
||||
1a 12 |
||||
2a 15 |
||||
2d 15 |
||||
30 18 |
||||
} |
||||
} |
||||
|
||||
Lines mapping: |
||||
22 <-> 6 |
||||
23 <-> 7 |
||||
27 <-> 10 |
||||
31 <-> 13 |
||||
35 <-> 16 |
||||
38 <-> 19 |
||||
Not mapped: |
||||
25 |
@ -0,0 +1,48 @@ |
||||
/* |
||||
* Copyright 2000-2016 JetBrains s.r.o. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
import java.util.Random; |
||||
|
||||
public class TestEmptyBlocks { |
||||
|
||||
public static void foo() { |
||||
try { |
||||
int a = 0; //make sure whole try/catch not removed by compiler
|
||||
} catch(Exception e) { |
||||
|
||||
} |
||||
|
||||
for(int i = 0; i < 5; i++) { |
||||
|
||||
} |
||||
|
||||
while(new Random().nextBoolean()) { |
||||
|
||||
} |
||||
|
||||
if(new Random().nextBoolean()) { |
||||
|
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
Loading…
Reference in new issue