diff --git a/infer/tests/codetoanalyze/java/racerd/ThreadSafeExample.java b/infer/tests/codetoanalyze/java/racerd/ThreadSafeExample.java index 9ebbc0c07..58f4c8778 100644 --- a/infer/tests/codetoanalyze/java/racerd/ThreadSafeExample.java +++ b/infer/tests/codetoanalyze/java/racerd/ThreadSafeExample.java @@ -38,15 +38,6 @@ public class ThreadSafeExample { recursiveBad(); } - private void evenOk() { - f = 44; - oddBad(); - } - - public void oddBad() { - evenOk(); // should report here - } - // shouldn't report here because it's a private method private void assignInPrivateMethodOk() { f = 24; diff --git a/infer/tests/codetoanalyze/java/racerd/issues.exp b/infer/tests/codetoanalyze/java/racerd/issues.exp index aa4b0d68b..729213174 100644 --- a/infer/tests/codetoanalyze/java/racerd/issues.exp +++ b/infer/tests/codetoanalyze/java/racerd/issues.exp @@ -106,16 +106,15 @@ codetoanalyze/java/racerd/ReadWriteRaces.java, codetoanalyze.java.checkers.ReadW codetoanalyze/java/racerd/ReadWriteRaces.java, codetoanalyze.java.checkers.ReadWriteRaces.unprotectedRead2():java.lang.Object, 84, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.field2`,,access to `this.field2`] codetoanalyze/java/racerd/ReadWriteRaces.java, codetoanalyze.java.checkers.ReadWriteRaces.unprotectedRead3():java.lang.Object, 96, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.field3`,,call to void ReadWriteRaces.syncWrite3(),access to `this.field3`] codetoanalyze/java/racerd/SubFld.java, SubFld.getG():int, 28, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,call to int SuperFld.getG(),access to `this.g`,,access to `this.g`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ExtendsThreadSafeExample.newmethodBad():void, 141, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.field`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ExtendsThreadSafeExample.tsOK():void, 146, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.field`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.FP_lazyInitOk():java.lang.Object, 130, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.sStaticField`,,access to `this.sStaticField`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.callPublicMethodBad():void, 57, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.assignInPrivateMethodOk(),access to `this.f`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.callVisibleForTestingBad():void, 109, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.visibleForTestingNotPublicOk(),access to `this.f`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.deeperTraceBad():void, 66, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.callAssignInPrivateMethod(),call to void ThreadSafeExample.assignInPrivateMethodOk(),access to `this.f`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.oddBad():void, 47, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.evenOk(),access to `this.f`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ExtendsThreadSafeExample.newmethodBad():void, 132, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.field`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ExtendsThreadSafeExample.tsOK():void, 137, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.field`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.FP_lazyInitOk():java.lang.Object, 121, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.sStaticField`,,access to `this.sStaticField`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.callPublicMethodBad():void, 48, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.assignInPrivateMethodOk(),access to `this.f`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.callVisibleForTestingBad():void, 100, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.visibleForTestingNotPublicOk(),access to `this.f`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.deeperTraceBad():void, 57, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [call to void ThreadSafeExample.callAssignInPrivateMethod(),call to void ThreadSafeExample.assignInPrivateMethodOk(),access to `this.f`] codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.recursiveBad():void, 37, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.f`] codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.ThreadSafeExample.tsBad():void, 33, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.f`] -codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.YesThreadSafeExtendsNotThreadSafeExample.subsubmethodBad():void, 168, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.subsubfield`] +codetoanalyze/java/racerd/ThreadSafeExample.java, codetoanalyze.java.checkers.YesThreadSafeExtendsNotThreadSafeExample.subsubmethodBad():void, 159, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [access to `this.subsubfield`] codetoanalyze/java/racerd/ThreadSafeMethods.java, codetoanalyze.java.checkers.ThreadSafeMethods.readSameFieldAsThreadSafeMethod1Bad():java.lang.Object, 54, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.field1`,,access to `this.field1`] codetoanalyze/java/racerd/ThreadSafeMethods.java, codetoanalyze.java.checkers.ThreadSafeMethods.readSameFieldAsThreadSafeMethod2Bad():java.lang.Object, 78, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.field4`,,access to `this.field4`] codetoanalyze/java/racerd/ThreadSafeMethods.java, codetoanalyze.java.checkers.ThreadSafeMethods.readSameFieldAsThreadSafeMethodWhileSynchronized1Bad():java.lang.Object, 63, THREAD_SAFETY_VIOLATION, no_bucket, WARNING, [,access to `this.field1`,,access to `this.field1`]