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 124526

Summary: Auto-Formatting changes the semantic of the program.
Product: editor Reporter: gaflach <gaflach>
Component: Formatting & IndentationAssignee: issues@editor <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description gaflach 2007-12-30 19:46:32 UTC
There are a bug when auto-formatting nested if statements, which changes the semantics of the program. The auto-
formatting tool changes the following code

if ( ... ) {
  if ( ... )
    command
}
else
  command 

to

if ( ... )
  if ( ... )
    command
else
  command

which are not semantically equal to the first one.
Comment 1 Jan Lahoda 2007-12-30 20:17:29 UTC
Already reported and fixed as issue #123258. Thanks for the report.

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