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 253845 - Formatter inserts unwanted empty lines
Summary: Formatter inserts unwanted empty lines
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 09:09 UTC by stwr
Modified: 2015-07-29 01:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is how the code looks before formatting (8.60 KB, image/png)
2015-07-27 09:09 UTC, stwr
Details
These are my formatting options I am going to apply (12.70 KB, image/png)
2015-07-27 09:10 UTC, stwr
Details
This is how the code looks after formatting (15.83 KB, image/png)
2015-07-27 09:10 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-07-27 09:09:27 UTC
Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/2204/suite/1698/v/1

Just wanted the formatter to make sure that I have 3 empty lines before each method.

The formatter fails at, at least, these 3 positions:
* no new lines before method m1() (line 21)
* unwanted new line 40
* unwanted new line 45

There is no sense to describe the issue, I hope pictures are clear enough.
Comment 1 stwr 2015-07-27 09:09:50 UTC
Created attachment 154935 [details]
This is how the code looks before formatting
Comment 2 stwr 2015-07-27 09:10:16 UTC
Created attachment 154936 [details]
These are my formatting options I am going to apply
Comment 3 stwr 2015-07-27 09:10:30 UTC
Created attachment 154937 [details]
This is how the code looks after formatting
Comment 4 Dusan Balek 2015-07-28 12:52:31 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/7466e497e485
Comment 5 Quality Engineering 2015-07-29 01:29:19 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7466e497e485
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253845 - Formatter inserts unwanted empty lines - fixed.