Summary: As per title Reviewed By: jvillard Differential Revision: D22019339 fbshipit-source-id: 0aab4475emaster
parent
f22d7e2fd0
commit
4bbe5a064b
@ -0,0 +1,16 @@
|
|||||||
|
A field annotated with `@GuardedBy` is being accessed by a call-chain that starts at a non-private method without synchronization.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```java
|
||||||
|
class C {
|
||||||
|
@GuardedBy("this")
|
||||||
|
String f;
|
||||||
|
|
||||||
|
void foo(String s) {
|
||||||
|
f = s; // unprotected access here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Action: Protect the offending access by acquiring the lock indicated by the `@GuardedBy(...)`.
|
Loading…
Reference in new issue