This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 48238

Summary: Invalid package after paste default package to another project
Product: java Reporter: Jaromir Uhrik <juhrik>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: CLOSED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: org.openide.filesystems.FSException: Cannot create folder <default package> in C:\.

Description Jaromir Uhrik 2004-08-31 14:55:08 UTC
[200408301800; jdk1.5.0-rc-b63]
Steps to reproduce:
1.Create projects prj1 and prj2
2.Copy file from prj1 to its default package
3.Press Copy action on the default package
4.Paste it to Source Packages of prj2
5.The invalid package command(package <default
package>;) appears on the first line of the copied
file - the file is not compilable.
Comment 1 Jesse Glick 2004-08-31 15:19:29 UTC
Must be inserted by refactoring code; package view does not do any
modifications to file contents.
Comment 2 Jan Becicka 2004-08-31 16:28:49 UTC
Cannot reproduce in my build. Jara will check it in tomorrow's build.
Comment 3 Jan Becicka 2004-08-31 16:30:45 UTC
JavaDataObject.handleCopy() is responsible for this. Reassigning to java.
Comment 4 Jan Becicka 2004-09-01 07:58:55 UTC
Surprisingly this issue is probably project related. We insert our
code according to folder name. I cannot reproduce this issue on
Windows due to attached exception. Someone is trying to create folder
"<default package>". On Linux it is probably possible to create such
folder and java module correctly insert corresponding package declaration.

Comment 5 Jan Becicka 2004-09-01 07:59:48 UTC
Created attachment 17275 [details]
org.openide.filesystems.FSException: Cannot create folder <default package> in C:\.
Comment 6 Jaromir Uhrik 2004-09-01 08:28:50 UTC
[200408311800; jdk1.5.0-rc-b63]
I am still able to reproduce it on Linux(JDS). On WinXP I got the
org.openide.filesystems.FSException: Cannot create folder <default
package> in C:\. as Honza.
Comment 7 Tomas Zezula 2004-09-02 08:07:52 UTC

*** This issue has been marked as a duplicate of 48246 ***
Comment 8 Jaromir Uhrik 2004-09-02 10:31:46 UTC
The problem doesn't appear now in build 200409011800;jdk1.5.0-rc-b63.
The fix of issue #48246 is integrated and resolves this issue too.