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

Summary: Move class to type refactoring leaves old package declaration
Product: java Reporter: Maksim Khramov <mkhramov>
Component: RefactoringAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Dev   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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.