guarded by inspections: don't fail on invalid code

EA-124454 - SIOOBE: JCiPUtil.getGuardValue
This commit is contained in:
Anna.Kozlova
2018-07-11 19:35:00 +02:00
parent 69571737d4
commit 0f232187f3
3 changed files with 21 additions and 5 deletions
@@ -0,0 +1,11 @@
import javax.annotation.concurrent.GuardedBy;
class CheapReadWriteLock {
@GuardedBy(<error descr="Incompatible types. Found: 'int', required: 'java.lang.String'">1</error>) private volatile int value;
public int getValue() { return value; }
public synchronized int increment() {
return value++;
}
}
@@ -43,6 +43,10 @@ public class FieldAccessedNotGuardedInspectionTest extends LightCodeInsightFixtu
doTest();
}
public void testIncompleteCode() {
doTest();
}
public void testStaticSyncOnClass() {
doTest();
}