mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
java: fix aliasing FP
reorganise code, adding `LockField`
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
| examples/Alias.java:16:13:16:13 | y | This field access (publicly accessible via $@) is not protected by any monitor, but the class is annotated as @ThreadSafe. | examples/Alias.java:16:13:16:13 | y | this expression |
|
||||
| examples/C.java:14:9:14:14 | this.y | This field access (publicly accessible via $@) is not protected by any monitor, but the class is annotated as @ThreadSafe. | examples/C.java:14:9:14:14 | this.y | this expression |
|
||||
| examples/C.java:15:9:15:14 | this.y | This field access (publicly accessible via $@) is not protected by any monitor, but the class is annotated as @ThreadSafe. | examples/C.java:15:9:15:14 | this.y | this expression |
|
||||
| examples/C.java:16:9:16:14 | this.y | This field access (publicly accessible via $@) is not protected by any monitor, but the class is annotated as @ThreadSafe. | examples/C.java:16:9:16:14 | this.y | this expression |
|
||||
|
||||
@@ -13,7 +13,7 @@ public class Alias {
|
||||
final ReentrantLock lock = this.lock;
|
||||
lock.lock();
|
||||
try {
|
||||
y = 42; // $ SPURIOUS: Alert
|
||||
y = 42;
|
||||
} finally {
|
||||
this.lock.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user