You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the description of the rule, infer should not check the method annotated with @VisibleForTesting.
In the example below, however, infer report a THREAD_SAFETY_VIOLATION warning at line 16
warning: Thread Safety Violation Read/Write race. Non-private method `B.readOutsideLock1Bad()` reads without synchronization from `this.mField`. Potentially races with write in method `B.writeUnderLockOk()`.Reporting because the current class is annotated `@ThreadSafe`, so we assume that this method can run in parallel with other non-private methods in the class (including itself).
Hence, I think it is a fasle positive.
The text was updated successfully, but these errors were encountered:
Version.
Infer version v1.1.0
OS.
Ubuntu 22.04.3 LTS
Command.
infer run -- mvn clean compile
I found a false positive about the rule THREAD_SAFETY_VIOLATION.
According to the description of the rule, infer should not check the method annotated with
@VisibleForTesting
.In the example below, however, infer report a
THREAD_SAFETY_VIOLATION
warning at line 16Hence, I think it is a fasle positive.
The text was updated successfully, but these errors were encountered: