File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414import java
1515
16- /** A `synchronized` method or statement. */
17- class Synched extends StmtParent {
16+ /** A `synchronized` method body or statement. */
17+ class Synched extends Stmt {
1818 Synched ( ) {
19- this .( Method ) .isSynchronized ( ) or
19+ this .getParent ( ) . ( Method ) .isSynchronized ( ) or
2020 this instanceof SynchronizedStmt
2121 }
2222}
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ class Synched extends Top {
4646 or
4747 result = this .( SynchronizedStmt ) .getAChild + ( )
4848 or
49- exists ( MethodAccess ma | ma = result | ma .getEnclosingStmt ( ) .getEnclosingStmt * ( ) = this )
49+ exists ( MethodAccess ma | ma = result |
50+ ma .getEnclosingStmt ( ) .getEnclosingStmt * ( ) = this or ma .getEnclosingCallable ( ) = this
51+ )
5052 }
5153
5254 /** The variable on which synchronization is performed, provided this element is a `SynchronizedStmt`. */
You can’t perform that action at this time.
0 commit comments