From cbe2eb0d8f437c466c85a97d51bab58fcce80dee Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Fri, 20 Dec 2019 18:06:27 +0700 Subject: [PATCH] DfaMemoryStateImpl#shouldCompareByEquals: do not perform redundant conversion to PsiType GitOrigin-RevId: f5923da63184c136a5750b514163155e2870efda --- .../intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java index 7a3e49fdb587..651c4d4d09f6 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java @@ -361,7 +361,8 @@ public class DfaMemoryStateImpl implements DfaMemoryState { return false; } return !isNull(dfaLeft) && !isNull(dfaRight) && - DfaUtil.isComparedByEquals(getPsiType(dfaLeft)) && DfaUtil.isComparedByEquals(getPsiType(dfaRight)); + TypeConstraint.fromDfType(getDfType(dfaLeft)).isComparedByEquals() && + TypeConstraint.fromDfType(getDfType(dfaRight)).isComparedByEquals(); } private static boolean isSuperValue(DfaValue superValue, DfaValue subValue) {