From 931d6db529a82ba34dae342c7f248e9f978ade81 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 15 Nov 2012 18:34:36 +0100 Subject: [PATCH] earlier prevention of EA-40567 - assert: PsiSubstitutorImpl$SubstitutionVisitor.visitClassType --- .../intellij/codeInspection/dataFlow/value/DfaTypeValue.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInspection/dataFlow/value/DfaTypeValue.java b/java/java-impl/src/com/intellij/codeInspection/dataFlow/value/DfaTypeValue.java index 34ec66b2dfa2..9d954b587f65 100644 --- a/java/java-impl/src/com/intellij/codeInspection/dataFlow/value/DfaTypeValue.java +++ b/java/java-impl/src/com/intellij/codeInspection/dataFlow/value/DfaTypeValue.java @@ -115,6 +115,9 @@ public class DfaTypeValue extends DfaValue { } public boolean isConvertibleFrom(DfaTypeValue dfaType) { - return dfaType != null && myType.isConvertibleFrom(dfaType.myType); + if (dfaType == null) return false; + assert myType.isValid() : "my type invalid"; + assert dfaType.myType.isValid() : " their type invalid"; + return myType.isConvertibleFrom(dfaType.myType); } }