#750 Indent: Label leads to incorrect identation

open
nobody
5
2009-04-05
2009-04-05
Mathias Ricken
No

The label checkforDraw: in this example leads to incorrect indentation of the first for loop and the code after the last closing brace (we don't want to indent after a label, do we?)

// check for a draw
/** flag that is true if all squares are occupied with a player's token */
boolean allNonEmpty = true;
checkForDraw:
for (int i = 0; i < nRows; i++) {
for (int j = 0; j < nCols; j++) {
if (cells[i][j] == EMPTY) {
allNonEmpty = false;
break checkForDraw;
}
}
}
if (allNonEmpty) state = DrawState.Singleton;
return;

Discussion

  • Mathias Ricken
    Mathias Ricken
    2009-04-05

    IndentBug2 Sample

     
    Attachments