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.
StatementTree elseStat = node.getElseStatement();
CodeStyle.BracesGenerationStyle redundantIfBraces = cs.redundantIfBraces();
if ((elseStat != null && redundantIfBraces == CodeStyle.BracesGenerationStyle.ELIMINATE && danglingElseChecker.hasDanglingElse(node.getThenStatement())) ||
(redundantIfBraces == CodeStyle.BracesGenerationStyle.GENERATE && (startOffset > sp.getStartPosition(root, node) || endOffset < sp.getEndPosition(root, node) || node.getCondition().getKind() == Tree.Kind.ERRONEOUS)))
(redundantIfBraces == CodeStyle.BracesGenerationStyle.GENERATE && (startOffset > sp.getStartPosition(root, node) || endOffset <= sp.getEndPosition(root, node) || node.getCondition().getKind() == Tree.Kind.ERRONEOUS)))
redundantIfBraces = CodeStyle.BracesGenerationStyle.LEAVE_ALONE;
lastIndent = indent;
boolean prevblock = wrapStatement(cs.wrapIfStatement(), redundantIfBraces, cs.spaceBeforeIfLeftBrace() ? 1 : 0, node.getThenStatement());