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 254452 - Copying class adds unwanted import
Summary: Copying class adds unwanted import
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Windows 10 x64
: P4 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 254684 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-17 17:42 UTC by stwr
Modified: 2015-09-01 15:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is the generated copy of ClassC (38.51 KB, image/png)
2015-08-17 17:42 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-08-17 17:42:40 UTC
Created attachment 155404 [details]
This is the generated copy of ClassC

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/5117/suite/2021/v/1

--Modified Test Case--

Copy ClassC instead of ClassA:

package usages;

public class ClassC {
    
}

--Actual Result--

package move;

import usages.*;

public class ClassCCopy {
    
}

The import is not used and should not be automatically added.
Comment 1 stwr 2015-08-17 17:47:18 UTC
The same happens to ClassB in the following test case --> http://services.netbeans.org/synergy/client/app/#/case/5124/suite/2021/v/1.

There is unwanted import usages.*;
Comment 2 Jiri Prox 2015-08-25 08:22:51 UTC
*** Bug 254684 has been marked as a duplicate of this bug. ***
Comment 3 Jiri Prox 2015-09-01 15:33:18 UTC
reproducible, but IMHO not so serious