Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 123414

Summary: Code-format incorrect removal of braces
Product: editor Reporter: richwilsonaus <richwilsonaus>
Component: Formatting & IndentationAssignee: issues <>
Status: RESOLVED DUPLICATE QA Contact: issues <>
Priority: P2    
Version: 6.x   
Target Milestone: TBD   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Report:

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