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 257620

Summary: format nested "if else" goes too much
Product: editor Reporter: bzimage
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: demo code
after format screen shot

Description bzimage 2016-01-19 08:54:18 UTC
Created attachment 158174 [details]
demo code

Nested "if else" maybe redundant, but it makes code more readable, such as the put method in the demo code. But when applied with format, it will reduce the if else level. I dont think this reduce work should be done by format, it will be more reasonable for hint to give a hint that nested "if else" can be "unnested".
Comment 1 bzimage 2016-01-19 08:57:04 UTC
Created attachment 158175 [details]
after format screen shot