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 241315 - "Maximum blank lines" is NOT respected
Summary: "Maximum blank lines" is NOT respected
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 10:43 UTC by markiewb
Modified: 2016-07-10 17:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows the issue (208.39 KB, image/png)
2014-02-03 10:43 UTC, markiewb
Details
Max Blank lines in code/declaration not respected (172.65 KB, image/png)
2014-03-09 16:28 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2014-02-03 10:43:11 UTC
Created attachment 144719 [details]
Shows the issue

See testcase
http://services.netbeans.org/synergy/client/app/#/case/2206/suite/1698/v/1

Steps
# Set maximum blank line in declaration to some value.
# For some of the item in 'Minimum blank lines' set big value (bigger than maximum)
# Open EmptyLines.java and reformat it

Actual: The maximum blank lines is NOT respected - see screenshot
Expected: The maximum blank lines is respected, there should not be more then maximum blank lines

Product Version: NetBeans IDE Dev (Build 201402030001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b127
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 markiewb 2014-02-03 10:44:56 UTC
It also doesn't work for "Set maximum blank line in code to some value".
Comment 2 Dusan Balek 2014-02-24 10:57:14 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/a9be67bac7f4
Comment 3 Quality Engineering 2014-02-25 02:44:38 UTC
Integrated into 'main-silver', will be available in build *201402250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a9be67bac7f4
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #241315: "Maximum blank lines" is NOT respected - fixed.
Comment 4 manikantannaren 2014-03-09 16:28:21 UTC
Created attachment 145882 [details]
Max Blank lines in code/declaration not respected

I see the same behaviour with the FCS build.
Comment 5 Jiri Prox 2014-03-09 21:28:08 UTC
The issue was fixed after 8.0 branch was created, so it will be fixed in the next release
Comment 6 Dusan Balek 2014-09-12 15:30:32 UTC
Unfortunately, I had to revert the fix as it collided with other issues - #234019 and #247032. Anyway, it is a strange usecase to set the maximum preserved blank lines to a lower value than any minimum blank lines values.
Comment 7 Jiri Prox 2014-09-12 15:32:42 UTC
Maybe we should add some warning to avoid such configuration
Comment 8 stwr 2015-07-27 09:17:45 UTC
It still does not work for 8.1 Beta.

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
Comment 9 Baxam 2015-08-31 14:38:01 UTC
This still has not been fixed

Product Version: NetBeans IDE 8.1 Beta (Build 201508041349)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
User directory: C:\Users\GARY\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\GARY\AppData\Local\NetBeans\Cache\8.1beta
Comment 10 stwr 2015-09-01 10:30:03 UTC
Still reproducible. I must admit that it is better to manage blank lines manually instead of using these settings as the formatted code will not respect them.

Product Version: NetBeans IDE Dev (Build 201508310002)
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)
Comment 11 Martin Balin 2016-07-07 07:19:13 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 12 markiewb 2016-07-10 17:57:14 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)