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 123414 - Code-format incorrect removal of braces
Summary: Code-format incorrect removal of braces
Status: RESOLVED DUPLICATE of bug 123258
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-05 03:27 UTC by richwilsonaus
Modified: 2007-12-05 07:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description richwilsonaus 2007-12-05 03:27:37 UTC
If the desired code formatting is to remove braces where not required for "if" statements (Tools.. Options.. Java 
Code.. Formatting.. Braces Generation, "if" set to "Eliminate") the following code:

    if (a) {
      if (b) {
        
      }
    }
    else { // !a
      
    }

will have the logic changed after formatting to:

    if (a)
      if (b) {

      }
    else { // !a   (- Now a && !b)

    }

This bug has destroyed the logic in a number of my source files.
Comment 1 Jiri Prox 2007-12-05 07:49:43 UTC
This is already filed. Thanks for your report anyway

*** This issue has been marked as a duplicate of 123258 ***