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 186923 - [69cat] Method content gets reformatted when comments are removed and annotations are added
Summary: [69cat] Method content gets reformatted when comments are removed and annotat...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 20:20 UTC by misterm
Modified: 2011-02-05 06:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case (15.01 KB, application/x-java-archive)
2010-05-28 20:21 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2010-05-28 20:20:38 UTC
While I was trying to produce a better test case for # 186754, I was able to reproduce another bug. In some files, when comments are removed and annotations are added to a method, its whole content gets reformatted. I will attach a test case and instructions soon.

Product Version = NetBeans IDE Dev (Build 100527-c7c5df462c89)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) Client VM 16.2-b04
Comment 1 misterm 2010-05-28 20:21:36 UTC
Created attachment 99636 [details]
test case
Comment 2 misterm 2010-05-28 20:28:33 UTC
Steps to reproduce:

1. Run the project;
2. Open it in the new IDE;
3. Right-click the file ProtectedSectionBug and select "Show bug removing comments close to protected section";

Diffing the file using Local History will show it had its content reformatted. While in this example this happens in the protected section, in my production code and project it happens on a considerable number of files, but it is just hard to isolate.
Comment 3 David Strupl 2011-01-24 08:19:32 UTC
Dusan, can you please have a look at this one?
Comment 4 Dusan Balek 2011-02-03 16:25:56 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/95fc81d15711
Comment 5 Quality Engineering 2011-02-05 06:07:30 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/95fc81d15711
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #186923: Guarded block end marker removed when comments are removed and annotations are added - fixed.