Preventing duplicate field access
This commit is contained in:
40
testData/results/TestFieldSingleAccess.dec
Normal file
40
testData/results/TestFieldSingleAccess.dec
Normal file
@@ -0,0 +1,40 @@
|
||||
package pkg;
|
||||
|
||||
public final class TestFieldSingleAccess {
|
||||
public Integer field;
|
||||
|
||||
public final void test() {
|
||||
Integer var10000 = this.field;
|
||||
if (var10000 != null) {
|
||||
System.out.println(var10000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final void test1() {
|
||||
synchronized(this.field) {
|
||||
System.out.println('1');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class 'pkg/TestFieldSingleAccess' {
|
||||
method 'test ()V' {
|
||||
1 6
|
||||
5 7
|
||||
8 8
|
||||
c 8
|
||||
f 11
|
||||
}
|
||||
|
||||
method 'test1 ()V' {
|
||||
1 14
|
||||
6 14
|
||||
7 15
|
||||
a 15
|
||||
c 15
|
||||
19 17
|
||||
}
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
@@ -3,7 +3,6 @@ public class TestMethodReferenceSameName {
|
||||
|
||||
private void foo() {
|
||||
TestMethodReferenceSameName.R1 var10000 = this.r;// 5
|
||||
this.r.getClass();
|
||||
(var10000::foo).run();
|
||||
}// 6
|
||||
|
||||
@@ -16,19 +15,18 @@ public class TestMethodReferenceSameName {
|
||||
class 'TestMethodReferenceSameName' {
|
||||
method 'foo ()V' {
|
||||
1 4
|
||||
5 5
|
||||
e 6
|
||||
13 7
|
||||
e 5
|
||||
13 6
|
||||
}
|
||||
}
|
||||
|
||||
class 'TestMethodReferenceSameName$R1' {
|
||||
method 'foo ()V' {
|
||||
0 11
|
||||
0 10
|
||||
}
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
5 <-> 5
|
||||
6 <-> 8
|
||||
9 <-> 12
|
||||
6 <-> 7
|
||||
9 <-> 11
|
||||
|
||||
Reference in New Issue
Block a user