4 Replies Latest reply on Jan 19, 2011 1:14 AM by mageshbk

    checkstyle: '}' should be on the same line

    kcbabo

      Let's take a quick vote on whether this checkstyle rule should stay or go.  Right now, the following code is throwing a checkstyle error:

       

      if (blah == meh) {
         doSomething();
      }
      else {
         doSomethingElse();
      }
      

       

      It looks like checkstyle wants:

       

      if (blah == meh) {
         doSomething();
      } else {
         doSomethingElse();
      }
      

       

      Personally, I'm not a fan of the latter, but the entire point of these rules is to have some consensus on basic coding style, so I'm putting this up for a vote.  Should we lose this rule and allow the former, or keep the rule and enforce the latter?