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 270360 - Move class to type refactoring leaves old package declaration
Summary: Move class to type refactoring leaves old package declaration
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: Dev
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


Attachments

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.

http://hg.netbeans.org/jet-main/rev/fb90192650a6
Comment 2 Quality Engineering 2017-05-28 02:44:10 UTC
Integrated into 'main-silver', will be available in build *201705280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fb90192650a6
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #270360 - Move class to type refactoring leaves old package declaration - fixed.