use of org.sonar.plugins.java.api.tree.Tree.Kind.CONSTRUCTOR in project sonar-java by SonarSource.
the class TwoLocksWaitCheck method visitNode.
@Override
public void visitNode(Tree tree) {
if (!hasSemantic()) {
return;
}
if (tree.is(METHOD, CONSTRUCTOR)) {
MethodTree methodTree = (MethodTree) tree;
int initialCounter = findModifier(methodTree.modifiers(), SYNCHRONIZED).map(m -> 1).orElse(0);
synchronizedStack.push(new Counter(initialCounter));
findWaitInvocation(methodTree);
}
}
Aggregations