Skip to content
Snippets Groups Projects
Commit 735b53ed authored by Johannes Mey's avatar Johannes Mey
Browse files

move method to correct aspect

parent d6611357
No related branches found
No related tags found
No related merge requests found
...@@ -87,4 +87,8 @@ aspect AlreadyClosedAnalysis { ...@@ -87,4 +87,8 @@ aspect AlreadyClosedAnalysis {
/** Check if this is a Reader or Writer. */ /** Check if this is a Reader or Writer. */
syn boolean TypeDecl.isCloseable() = syn boolean TypeDecl.isCloseable() =
!isUnknown() && instanceOf(lookupType("java.io", "Closeable")); !isUnknown() && instanceOf(lookupType("java.io", "Closeable"));
/** @return {@code true} if this method access has the given variable as receiver. */
syn boolean MethodAccess.hasReceiver(Variable receiver) =
hasPrevExpr() && prevExpr().isVariable(receiver);
} }
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
*/ */
aspect VariableDeclarationScope { aspect VariableDeclarationScope {
/** @return {@code true} if this method access has the given variable as receiver. */
syn boolean MethodAccess.hasReceiver(Variable receiver) =
hasPrevExpr() && prevExpr().isVariable(receiver);
/** /**
* Test if the CFG node is tied to a statement that declares the variable, * Test if the CFG node is tied to a statement that declares the variable,
* or if the declaration of the variable is somewhere inside the statement this * or if the declaration of the variable is somewhere inside the statement this
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment