-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(S1068): delete field writes of violated field only (#921)
* Modify tests * fix(S1068): delete field writes of corresponding field only * Add syntactic sugar * Add tribute
- Loading branch information
1 parent
fe67971
commit 88b580a
Showing
3 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
11 changes: 9 additions & 2 deletions
11
...processor_test_files/S1068_UnusedPrivateField/PrivateFieldWrittenButNotRead.java.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
public class PrivateFieldWrittenButNotRead { | ||
private long zhang; | ||
|
||
public PrivateFieldWrittenButNotRead(int x, int y) { } | ||
|
||
public void initialize(String bar) { } | ||
} | ||
public void initialize(String bar) { | ||
zhang = 234324L; | ||
} | ||
|
||
public long getZhang() { | ||
return zhang; | ||
} | ||
} |