Project: JDT
Bug 62425 Externalizing Strings dump (Internal Error) [nls] [refactoring]
Reported: 2004-05-16 13:54:45 | Status: resolved fixed

I Build id: 200405111200 Externalizing Strings fails on a java file that I have, but it is hard to isolate the problem. Im opening the defect just for the stack dump: Internal Error: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:749) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange (RefactoringWizard.java:559) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage (RefactoringWizard.java:405) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage (UserInputWizardPage.java:72) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage (UserInputWizardPage.java:112) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.getNextPage (ExternalizeWizardPage.java:1066) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:672) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:300) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:505) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2725) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2390) at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) at org.eclipse.jface.window.Window.open(Window.java:648) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run (RefactoringWizardOpenOperation.java:120) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:40) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.openExternalizeStringsWizar d(ExternalizeStringsAction.java:157) at org.eclipse.jdt.ui.actions.FindStringsToExternalizeAction$NonNLSListDialog.open Wizard(FindStringsToExternalizeAction.java:406) at org.eclipse.jdt.ui.actions.FindStringsToExternalizeAction$NonNLSListDialog.butt onPressed(FindStringsToExternalizeAction.java:400) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:505) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2725) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2390) at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) at org.eclipse.jface.window.Window.open(Window.java:648) at org.eclipse.jdt.ui.actions.FindStringsToExternalizeAction.showResults (FindStringsToExternalizeAction.java:196) at org.eclipse.jdt.ui.actions.FindStringsToExternalizeAction.run (FindStringsToExternalizeAction.java:150) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:212) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:891) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:842) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:761) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2725) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2390) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1353) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1324) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:243) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:298) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:249) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:269) at org.eclipse.core.launcher.Main.run(Main.java:722) at org.eclipse.core.launcher.Main.main(Main.java:706) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel$KeyVa luePairModell.unwindEscapeChars(PropertyFileDocumentModel.java:216) at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel$KeyVa luePairModell.getEncodedText(PropertyFileDocumentModel.java:158) at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel.inser t(PropertyFileDocumentModel.java:41) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.addInse rtEdits(NLSPropertyFileModifier.java:95) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.addChan ges(NLSPropertyFileModifier.java:66) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.create (NLSPropertyFileModifier.java:44) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSRefactoring.createChange (NLSRefactoring.java:215) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:117) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1674) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:52) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101) Root exception: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel$KeyVa luePairModell.unwindEscapeChars(PropertyFileDocumentModel.java:216) at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel$KeyVa luePairModell.getEncodedText(PropertyFileDocumentModel.java:158) at org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel.inser t(PropertyFileDocumentModel.java:41) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.addInse rtEdits(NLSPropertyFileModifier.java:95) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.addChan ges(NLSPropertyFileModifier.java:66) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSPropertyFileModifier.create (NLSPropertyFileModifier.java:44) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSRefactoring.createChange (NLSRefactoring.java:215) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:117) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1674) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:52) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSPropertyFileModifier.java