Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355345 - [IDE][Undo] Protect code in CopyFilesAndFoldersOperation against malformed copy buffer
Summary: [IDE][Undo] Protect code in CopyFilesAndFoldersOperation against malformed co...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-22 03:44 EDT by Udo Walker CLA
Modified: 2019-11-14 03:51 EST (History)
2 users (show)

See Also:


Attachments
Error dialog: Copy Problems, Internal error: 0 (8.21 KB, image/png)
2011-08-22 03:45 EDT, Udo Walker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Walker CLA 2011-08-22 03:44:03 EDT
Build Identifier: 20110218-0911

When I copy a Java file in a Netbeans Java project (with CTRL+C) and then goto a Java project in Eclipse I get an error. See the attached screen shot.

Reproducible: Always

Steps to Reproduce:
1.Copy Java file in Netbeans 7
2.Paste in Java project in Eclipse
3.Error dialog is shown
Comment 1 Udo Walker CLA 2011-08-22 03:45:14 EDT
Created attachment 201896 [details]
Error dialog: Copy Problems, Internal error: 0
Comment 2 Dani Megert CLA 2011-08-22 03:54:26 EDT
Where exactly to you paste it, and what is selected in the target?
Is there anything in the .log (see Error Log view)?
What happens if you paste in the Windows Explorer?
Comment 3 Udo Walker CLA 2011-08-22 04:03:18 EDT
I get this log entry:


!ENTRY org.eclipse.ui.ide 4 4 2011-08-22 10:01:36.530
!MESSAGE Exception in org.eclipse.ui.actions.CopyFilesAndFoldersOperation.performCopy(): java.lang.ArrayIndexOutOfBoundsException: 0


I selected a Java package in my Java project in Eclipse and used the popup menu "Paste" to paste the file. In Netbeans I selected the Java file and used the popup menu "Copy" to copy the file into the clipboard.
Comment 4 Udo Walker CLA 2011-08-22 04:04:55 EDT
Nothing happens in the Windows Explorer. Maybe the file is not copied to the global clipboard?
Comment 5 Dani Megert CLA 2011-08-22 04:19:00 EDT
> Nothing happens in the Windows Explorer. Maybe the file is not copied to the
> global clipboard?
Right. I suspect that Netbeans copies the file incorrectly or only adds some internal information into the clipboard. Netbeans should fix this. On the Eclipse side we should be more graceful in such situations (e.g. protect stores[0] on line 1412) and also improve the logging (e.g. log stack trace) in CopyFilesAndFoldersOperation.display(InvocationTargetException).
Comment 6 Lars Vogel CLA 2019-11-14 03:51:22 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.