#220 Last "case" should precede "default"

release_3.4
closed
Check (274)
5
2012-10-10
2003-06-14
Tim Tyler
No

Java allows "default" anywhere within the switch
statement.

This check will force it to come after the last case -
improving readability.

Discussion

  • Tim Tyler

    Tim Tyler - 2003-06-14

    Logged In: YES
    user_id=796025

    Done:

        <module name="DefaultComesLast"/>
    

    ``Check that the default is after all the cases
    in a switch statement''.

     
  • Oleg Sukhodolsky

    Logged In: YES
    user_id=746148

    Committed to CVS for 3.4.
    Module DefaultComesLast

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks