#710 indent error on single statement blocks

open
nobody
5
2008-11-01
2008-11-01
Anonymous
No

mjs@cs.cmu.edu

Nested single-statement blocks don't indent properly. Witness the following code:
// Returns true if the given board contains the given string.
// Tests every possible starting location.
public static boolean contains(char[][] board, String s) {
int rows = board.length;
int cols = board[0].length;
for (int row=0; row<rows; row++)
for (int col=0; col<cols; col++)
if (contains(board,s,row,col))
return true;
return false;
}

Which should indent as
public static boolean contains(char[][] board, String s) {
int rows = board.length;
int cols = board[0].length;
for (int row=0; row<rows; row++)
for (int col=0; col<cols; col++)
if (contains(board,s,row,col))
return true;
return false;
}

DrJava Version : drjava-20080828-r4664
DrJava Build Time: 20080828-1639
running on Mac OS X 10.5.5
JDK 5.0_16

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks