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
: 254684 (view as bug list)
Depends on:
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:

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

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 -->

--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 -->

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