Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 536673 - Internal Error on copy/paste of the file with a Long number in the name
Summary: Internal Error on copy/paste of the file with a Long number in the name
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 4.9 M2   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-04 03:35 EDT by Andrey Loskutov CLA
Modified: 2018-08-01 04:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2018-07-04 03:35:55 EDT
Create file 1530685958177.txt.
In Packages Explorer, try to copy/paste this file => Kaboom #1.
In Navigator, try to copy/paste this file => Kaboom #2.
Create project 1530685958177, try to copy/paste it in any explorer => Kaboom #3.

Note: same code exists in three places in the JDT and Platform code (copy/paste in JDT, Navigator and for project names).

org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory.NewNameProposer.computeNewName(String, int)
org.eclipse.ui.actions.CopyFilesAndFoldersOperation.computeNewName(String, boolean)
org.eclipse.ui.dialogs.ProjectLocationSelectionDialog.computeNewName(String)

I will provide a patch.

Stack:
java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:448)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
	at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2213)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:71)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2209)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:194)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:153)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.ReorgCopyStarter.run(ReorgCopyStarter.java:68)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction$JavaElementAndResourcePaster.paste(PasteAction.java:1379)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction.run(PasteAction.java:271)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:271)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:249)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:161)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:153)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:305)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:579)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:648)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:438)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:381)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:93)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1722)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1369)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1396)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1379)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1408)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:784)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3791)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:860)
	at org.eclipse.swt.widgets.Tree.gtk_key_press_event(Tree.java:2176)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1986)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6522)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:4120)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5917)
	at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:4117)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1384)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1599)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4529)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:625)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:560)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)
Caused by: java.lang.NumberFormatException: For input string: "1530685958177"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:583)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$NewNameProposer.computeNewName(ReorgPolicyFactory.java:2550)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$NewNameProposer.createNewName(ReorgPolicyFactory.java:2604)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createCopyResourceChange(ReorgPolicyFactory.java:243)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createChange(ReorgPolicyFactory.java:298)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createChange(ReorgPolicyFactory.java:283)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor.createChange(JavaCopyProcessor.java:130)
	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:288)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper$Operation.run(RefactoringExecutionHelper.java:99)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:38)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:733)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5733)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:105)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
	... 74 more
Root exception:
java.lang.NumberFormatException: For input string: "1530685958177"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:583)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$NewNameProposer.computeNewName(ReorgPolicyFactory.java:2550)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$NewNameProposer.createNewName(ReorgPolicyFactory.java:2604)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createCopyResourceChange(ReorgPolicyFactory.java:243)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createChange(ReorgPolicyFactory.java:298)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$CopyFilesFoldersAndCusPolicy.createChange(ReorgPolicyFactory.java:283)
	at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor.createChange(JavaCopyProcessor.java:130)
	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:288)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper$Operation.run(RefactoringExecutionHelper.java:99)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:38)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:733)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5733)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:105)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
	at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2213)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:71)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2209)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:194)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:153)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.ReorgCopyStarter.run(ReorgCopyStarter.java:68)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction$JavaElementAndResourcePaster.paste(PasteAction.java:1379)
	at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction.run(PasteAction.java:271)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:271)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:249)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:161)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:153)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:305)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:579)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:648)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:438)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:381)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:93)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1722)
Comment 1 Eclipse Genie CLA 2018-07-13 11:26:09 EDT
New Gerrit change created: https://git.eclipse.org/r/126034
Comment 2 Eclipse Genie CLA 2018-07-13 11:28:22 EDT
New Gerrit change created: https://git.eclipse.org/r/126036
Comment 5 Kalyan Prasad Tatavarthi CLA 2018-08-01 04:01:53 EDT
Verified in the build  I20180731-2000