Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 270360 - Move class to type refactoring leaves old package declaration
Move class to type refactoring leaves old package declaration
Product: java
Classification: Unclassified
Component: Refactoring
PC Windows 7
: P2 (vote)
: Dev
Assigned To: Dusan Balek
Depends on:
  Show dependency treegraph
Reported: 2017-04-11 09:59 UTC by Maksim Khramov
Modified: 2017-05-28 02:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Khramov 2017-04-11 09:59:05 UTC
Product Version: NetBeans IDE Dev (Build 201704110002)
Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b09

Steps to reproduce:

Create some class in one package (ex. source.SomeClass)
Create other class in other package (ex. Target)

Reference first class from second one:
in imports section
>> import source.SomeClass

and in class body:
>> private SomeClass myclass;

invoke Move Class refactoring
in dialog check To Type checkbox
and select Target as target type
click on Refactor button

Now we see that private field declaration changed to source.SomeClass but it should be just SomeClass as it moved to Target
Comment 1 Dusan Balek 2017-05-26 14:08:20 UTC
Fixed in jet-main.
Comment 2 Quality Engineering 2017-05-28 02:44:10 UTC
Integrated into 'main-silver', will be available in build *201705280001* on (upload may still be in progress)

User: Dusan Balek <>
Log: Issue #270360 - Move class to type refactoring leaves old package declaration - fixed.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo