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.
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)
It also doesn't work for "Set maximum blank line in code to some value".
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/a9be67bac7f4
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.
Created attachment 145882 [details] Max Blank lines in code/declaration not respected I see the same behaviour with the FCS build.
The issue was fixed after 8.0 branch was created, so it will be fixed in the next release
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.
Maybe we should add some warning to avoid such configuration
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
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
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)
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
Still valid in 8.2 dev Product Version: NetBeans IDE Dev (Build 201607100002)