If I don't have this check then the for loop will end with };.  Even if that's legal java syntax I'd prefer not to have it in the generated code.