View Javadoc
1   ////////////////////////////////////////////////////////////////////////////////
2   // Test case file for checkstyle.
3   // Created: Feb-2001
4   // Ignore error
5   ////////////////////////////////////////////////////////////////////////////////
6   package com.puppycrawl.tools.checkstyle.checks.naming.localvariablename;
7   import java.io.*;
8   import java.util.HashMap;
9   import java.util.Map;
10  
11  class InputLocalVariableNameOneCharInitVarName
12  {
13  	public void fooMethod()
14  	{
15  		for(int i = 1; i <10; i++) {
16  			//come code
17  		}
18  		
19  		int i = 0;
20  		
21          for(int index = 1; index < 10; index++) {
22  			//come code
23  		}
24          
25          for(int Index = 1; Index < 10; Index++) {
26  			//come code
27  		}
28          
29          int index = 1;
30  
31  		for(; index < 10; index++) {
32  			//come code
33  		}
34  		
35  		for(; i < 12; i++) {
36  			//come code
37  		}
38  		
39  		Map<String, String> map = new HashMap<String, String>();
40  		
41  		for (Map.Entry<String, String> e : map.entrySet()) {
42  			//some code
43  		}
44  	}
45  }