Skip to content

Commit

Permalink
[EVAN-9676] Example for write only objects inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
trishagee committed Aug 9, 2021
1 parent 49144d7 commit 2e2f0a0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.jetbrains.inspections;

import java.util.concurrent.atomic.AtomicInteger;

@SuppressWarnings("unused")
public class WriteOnlyObjects {
public void warningOnObjectsThatAreOnlyWritten() {
AtomicInteger atomicInteger = new AtomicInteger(7);
atomicInteger.set(1);
}
}

0 comments on commit 2e2f0a0

Please sign in to comment.