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 225547 - [73cat] If-Else Statements Should Use Braces doesn't take formatting settings into account
Summary: [73cat] If-Else Statements Should Use Braces doesn't take formatting settings...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 214646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-30 15:18 UTC by misterm
Modified: 2013-07-13 20:08 UTC (History)
1 user (show)

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 misterm 2013-01-30 15:18:48 UTC
In a code sample such as:

if (a)
   something();
else
   somethingElse();

Using the hint will lead to:

if (a) {
   something();
}
 else {
   somethingElse();
}

instead of :

 } else {

even if project formatting settings would require it to be that way.

Product Version = NetBeans IDE Dev (Build 20130130-8551ab433946)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_07
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.3-b01
Comment 1 Jan Lahoda 2013-06-26 11:07:29 UTC
A bug in the code generator, I believe.
Comment 2 Jan Lahoda 2013-07-09 15:15:56 UTC
This should fix that:
http://hg.netbeans.org/jet-main/rev/5c7e5da0f2d7
Comment 3 Quality Engineering 2013-07-12 02:28:11 UTC
Integrated into 'main-silver', will be available in build *201307112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5c7e5da0f2d7
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #215704&#225547: fixing comment preservation when blocks are added into the if-else statements. Also fixes else position in the same situation
Comment 4 Jan Lahoda 2013-07-13 20:08:16 UTC
*** Bug 214646 has been marked as a duplicate of this bug. ***