mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Java 12: tweak queries to preserve behavior
This accounts for the changes in af8faee1.
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
|
||||
import java
|
||||
|
||||
/** A `synchronized` method or statement. */
|
||||
class Synched extends StmtParent {
|
||||
/** A `synchronized` method body or statement. */
|
||||
class Synched extends Stmt {
|
||||
Synched() {
|
||||
this.(Method).isSynchronized() or
|
||||
this.getParent().(Method).isSynchronized() or
|
||||
this instanceof SynchronizedStmt
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,9 @@ class Synched extends Top {
|
||||
or
|
||||
result = this.(SynchronizedStmt).getAChild+()
|
||||
or
|
||||
exists(MethodAccess ma | ma = result | ma.getEnclosingStmt().getEnclosingStmt*() = this)
|
||||
exists(MethodAccess ma | ma = result |
|
||||
ma.getEnclosingStmt().getEnclosingStmt*() = this or ma.getEnclosingCallable() = this
|
||||
)
|
||||
}
|
||||
|
||||
/** The variable on which synchronization is performed, provided this element is a `SynchronizedStmt`. */
|
||||
|
||||
Reference in New Issue
Block a user