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 230497 - Uncompilable Source Code after duplicate Copy
Summary: Uncompilable Source Code after duplicate Copy
Status: RESOLVED DUPLICATE of bug 228138
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 06:13 UTC by bht
Modified: 2013-05-30 12:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test case with ant SE project (506.91 KB, application/zip)
2013-05-30 06:13 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2013-05-30 06:13:13 UTC
Created attachment 135110 [details]
Test case with ant SE project

I can reproduce the dreaded "Uncompilable source code" error once again with a simple series of copy operations.

In this case, it manifests itself with a different error, java.lang.VerifyError.

How I do it:

- Create a Java SE project (see attached project)
- Map some java files from a directory outside the project in the favorites window
- Delete two files from the source root of the project: _netin.java, _netin.gif
- Copy two files: _netin.java, _netin.gif from favorites into the root package of the project, using multiple selection and [Ctrl+C]
- Copy the files again so that they produce the _1 file prefixes. The duplicate java file has an error as expected
- Delete the two _1 files that were copied again
- Run the project

Exception in thread "main" java.lang.VerifyError: Constructor must call super() or this() before return in method _netin.<init>()V at offset 0

I can fix the error:

- Delete _netin.java and copy it again

Notes:

The project cannot run properly because of more missing files, but the errors occur later so that should be ok.

To verify that this is in fact the "Uncompilable source code" error, I search the classes in the build directory for the string and find it only in _netin.class

This easily happens if I use multiple selection in the favorites window and forget to reset this multiple selection.

Then I have to delete the duplicate files which causes the error.
Comment 1 bht 2013-05-30 06:55:41 UTC
OS Windows XP, hardware Intel dual core might be of interest. No performance issues.

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb)
Comment 2 Jan Lahoda 2013-05-30 12:13:36 UTC
Can actually be reproduced much more simply by duplicating a trivial class and then removing the duplicate. Tested on:
package pkg230497a;

public class Main {

    public static void main(String[] args) {
        new Main();
    }
    
}

*** This bug has been marked as a duplicate of bug 228138 ***