NPE (18686)
authoranna <anna.kozlova@jetbrains.com>
Mon, 15 Feb 2010 13:52:06 +0000 (15 16:52 +0300)
committeranna <anna.kozlova@jetbrains.com>
Mon, 15 Feb 2010 14:30:37 +0000 (15 17:30 +0300)
platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java

index 8b5f4db..30945e6 100644 (file)
@@ -263,7 +263,10 @@ public class VariableInplaceRenamer {
           for (final PsiNamedElement element : renamer.getElements()) {
             ApplicationManager.getApplication().runWriteAction(new Runnable() {
               public void run() {
-                RenameUtil.doRenameGenericNamedElement(element, renamer.getRenames().get(element), RenameProcessor.extractUsagesForElement(element, usageInfos), null);
+                final String newElementName = renamer.getNewName(element);
+                if (newElementName != null) {
+                  RenameUtil.doRenameGenericNamedElement(element, newElementName, RenameProcessor.extractUsagesForElement(element, usageInfos), null);
+                }
               }
             });
           }