java: fix aliasing FP

reorganise code, adding `LockField`
This commit is contained in:
yoff
2025-10-27 14:30:25 +01:00
parent 531b994819
commit 406e48b3bb
3 changed files with 32 additions and 20 deletions

View File

@@ -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();
}