Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 123414 - Code-format incorrect removal of braces
Code-format incorrect removal of braces
Status: RESOLVED DUPLICATE of bug 123258
Product: editor
Classification: Unclassified
Component: Formatting & Indentation
All Windows XP
: P2 (vote)
Assigned To: issues@editor
Depends on:
  Show dependency treegraph
Reported: 2007-12-05 03:27 UTC by richwilsonaus
Modified: 2007-12-05 07:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT


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 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo