mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Fix FP for always-locked fields
This commit is contained in:
@@ -68,7 +68,9 @@ predicate alwaysLocked(Field f) {
|
||||
or
|
||||
exists(RefType thisType |
|
||||
forex(VarAccess access |
|
||||
access = f.getAnAccess() and not access.getEnclosingCallable() instanceof InitializerMethod
|
||||
access = f.getAnAccess() and
|
||||
not access.getEnclosingCallable() instanceof Constructor and
|
||||
not access.getEnclosingCallable() instanceof InitializerMethod
|
||||
|
|
||||
locallySynchronizedOnThis(access, thisType)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user