Fix EA-82394. PsiType.getClassName() can return null. Return "<anonymous type>" in that case.

(cherry picked from commit 8be1335)
(cherry picked from commit 5101596)
This commit is contained in:
Yan Zhulanow
2016-05-18 19:33:02 +03:00
parent 1a0acf3208
commit e0243fd568
@@ -28,7 +28,7 @@ class JavaUType(
) : JavaAbstractUElement(), UType {
override val name: String
get() = when (psi) {
is PsiClassType -> psi.className.substringAfterLast('.')
is PsiClassType -> psi.className?.substringAfterLast('.').orAnonymous("type")
else -> psi?.canonicalText?.substringAfterLast('.')
}.orAnonymous("type")