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 239625 - refactoring inner to outer broken
Summary: refactoring inner to outer broken
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 20:08 UTC by homberghp
Modified: 2014-02-20 13:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
zip file with netbeans project (47.35 KB, application/zip)
2013-12-18 20:08 UTC, homberghp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description homberghp 2013-12-18 20:08:06 UTC
Created attachment 143313 [details]
zip file with netbeans project

When I try to move an inner static class to outer (file) level,
the refactoring removes one line form the inner class.
Tested on ubuntu 13.10 and osx 10.9.1
Bug can be reproduced as follows:

Use the attached file.
Unzip.
It contains a complete netbeans module project.

open with nb, git to file org.fontysvenlo.cwb.markeractions.helpers.olutionMarkerUtils.java

goto inner class IterableDocument and refactor it to outer level (file level in same package).
After the refactoring the resulting outer file IterableDocument.java is not accepted by the compiler because one line
"int offset = 0, offset2 = 0, length = 0;" (line 283 in the original)
is removed or is not copie to the destination.

The missing line trigger syntax errors on following lines in the destination class.
Comment 1 homberghp 2013-12-18 20:40:58 UTC
Tried again with nightly 201312080002 but was not able to send bug report with netbeans.org user (homberghp). Made a not to that effect in the report sent as guest.

Replay of bug resulted in completely other error, which triggered error reporting of the nightly.

Please correct my typos, I do not know how to edit original report. 
eg. 'git to' must be 'go to', 'copie' must be 'copied'
Comment 2 Ralph Ruijs 2014-01-07 11:23:47 UTC
Probably a duplicate of 217498, reassigning.
Comment 3 Svata Dedic 2014-02-20 13:01:06 UTC
Works for me in NetBeans IDE Dev (Build 20140218-34d16e6e98fe); the IterableDocument.java received all the assignments, although as 3 separate variable declaration statements, not as one variable group. But compiles fine.