SSR: minor simplification

GitOrigin-RevId: 7cb8c19a16446909ec562c65d836cf3d1ca83b03
This commit is contained in:
Bas Leijdekkers
2020-01-10 13:25:43 +01:00
committed by intellij-monorepo-bot
parent bb8c55c4fe
commit ce06b1699b

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.structuralsearch.impl.matcher;
import com.intellij.dupLocator.iterators.ArrayBackedNodeIterator;
@@ -576,8 +576,7 @@ public class JavaMatchingVisitor extends JavaElementVisitor {
else {
final PsiElement deparenthesized = other instanceof PsiExpression && context.getOptions().isLooseMatching() ?
PsiUtil.skipParenthesizedExprDown((PsiExpression)other) : other;
myMatchingVisitor.setResult(handler.validate(deparenthesized, context));
if (myMatchingVisitor.getResult()) {
if (myMatchingVisitor.setResult(handler.validate(deparenthesized, context))) {
handler.addResult(other, context);
}
}