From 83a88afdd563be0c3a1695c3cc42b8a809486dbe Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 5 May 2010 17:07:18 +0400 Subject: [PATCH] assertion --- .../intellij/psi/impl/source/resolve/JavaResolveCache.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveCache.java b/java/java-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveCache.java index 86a110cef96a..cc16aef88444 100644 --- a/java/java-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveCache.java +++ b/java/java-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveCache.java @@ -98,7 +98,12 @@ public class JavaResolveCache { type = ConcurrencyUtil.cacheOrGet(myCalculatedTypes, expr, type); } if (!type.isValid()) { - LOG.error("Type is invalid: " + type+"; expr: '"+expr+"' is "+(expr.isValid() ? "valid":"invalid")); + if (expr.isValid()) { + LOG.error("Type is invalid: " + type + "; expr: '" + expr + "' is valid"); + } + else { + LOG.error("Expression: '"+expr+"' is invalid, must not be used for getType()"); + } } return type == NULL_TYPE ? null : type; }