1 6 7 package com.puppycrawl.tools.checkstyle.indentation; 8 9 13 public class InputValidBlockIndent { 14 15 16 public InputValidBlockIndent() { 17 } 18 19 public void method1() { 20 21 { } 22 { 23 } 24 { 25 int var = 3; 26 27 var += 3; 28 } 29 30 31 { int var = 5; } 32 33 { 34 int var = 3; 35 36 var += 3; 37 38 { 39 int innerVar = 4; 40 41 innerVar += var; 42 } 43 } 44 45 } 46 47 static { int var = 4; } 48 49 50 static { 51 int var = 4; 52 } 53 54 static 55 { 56 int var = 4; 57 } 58 59 { int var = 4; } 60 61 62 { 63 int var = 4; 64 } 65 66 { 67 int var = 4; 68 } 69 70 71 } 72 73 enum EquivalenceTester { 74 77 OBJECT_ATTRIBUTES { 78 81 public boolean areEqual( final Object first, final Object second ) { 82 return true; 83 } 84 85 88 public int hashCode( final Object target ) { 89 return 1; 90 } 91 }, 92 93 96 OBJECT_IDENTITIES 97 { 98 101 public boolean areEqual( final Object first, final Object second ) { 102 return first == second; 103 } 104 105 108 public int hashCode( final Object target ) { 109 return System.identityHashCode( target ); 110 } 111 }; 112 113 120 public abstract boolean areEqual( Object first, Object second ); 121 122 128 public abstract int hashCode( Object target ); 129 } 130 131 class bug1251988 132 { 133 private int a; 134 135 { 137 if (a == 1) 138 { 139 } 140 } 141 } 142 143 class bug1260079 144 { 145 public bug1260079() 146 { 147 new Thread () 148 { 149 public void run() 150 { 151 System.out.println("ran"); 152 } 153 }.start(); 154 } 155 } 156 157 class bug1336737 { 158 private static enum Command { 159 IMPORT("import"), 160 LIST("list"); 161 private final String c; 162 Command(String c) { this.c = c; } 163 public String toString() { return c; } 164 } 165 } 166 | Popular Tags |