IDEA-52679: null name in a LightVariable
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 4 Mar 2010 10:15:54 +0000 (13:15 +0300)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 4 Mar 2010 10:15:54 +0000 (13:15 +0300)
java/java-impl/src/com/intellij/psi/impl/light/LightVariableBase.java

index 8897558b5f9572a0497662e3d1b54ce22dc30855..b06079cefae020f2a2aa9e67e13aa7d7cdcaf1db 100644 (file)
@@ -15,6 +15,7 @@
  */
 package com.intellij.psi.impl.light;
 
+import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.psi.*;
 import com.intellij.psi.impl.ElementPresentationUtil;
 import com.intellij.psi.impl.PsiImplUtil;
@@ -60,7 +61,7 @@ public abstract class LightVariableBase extends LightElement implements PsiVaria
 
   @NotNull
   public String getName() {
-    return getNameIdentifier().getText();
+    return StringUtil.notNullize(getNameIdentifier().getText());
   }
 
   public PsiElement setName(@NotNull String name) throws IncorrectOperationException{