InputInvalidWhileIndent.java :  » Code-Analyzer » checkstyle-5.1 » com » puppycrawl » tools » checkstyle » indentation » Java Open Source

Java Open Source » Code Analyzer » checkstyle 5.1 
checkstyle 5.1 » com » puppycrawl » tools » checkstyle » indentation » InputInvalidWhileIndent.java
/*
 * InputValidWhileIndent.java
 *
 * Created on November 10, 2002, 9:16 PM
 */

package com.puppycrawl.tools.checkstyle.indentation;

/**
 *
 * @author  jrichard
 */
public class InputInvalidWhileIndent {
    
    /** Creates a new instance of InputValidWhileIndent */
    public InputInvalidWhileIndent() {
    }
    private void method1()
    {
        boolean test = true;
         while (test) {
       }

       while (test) 
         {
         }

         while (test) 
      {
              System.getProperty("foo");
      }

          while (test)  {
            System.getProperty("foo");
          }
        
          while (test)  {
            System.getProperty("foo");
            System.getProperty("foo");
          }
        
      while (test)  
          {
            System.getProperty("foo");
            System.getProperty("foo");
      }

        while (test)      {        // TODO: this is allowed
              if (test) {
                  System.getProperty("foo");
              }
              System.getProperty("foo");
          }
        
        while (test 
          && 4 < 7 && 8 < 9
            && 3 < 4) {
        }

        while (test 
            && 4 < 7 && 8 < 9
          && 3 < 4) {
        }

        while (test 
            && 4 < 7 && 8 < 9
          && 3 < 4) 
        {
        }
        
        while (test 
            && 4 < 7 && 8 < 9
            && 3 < 4
     ) {
            
        }
        
        while (test 
            && 4 < 7 && 8 < 9
            && 3 < 4
          ) {
            
        }

        while (test 
            && 4 < 7 && 8 < 9
            && 3 < 4
          ) 
        {
            
        }

        while (true)
        {
        continue;
        }
    }
    
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.