1 package com.puppycrawl.tools.checkstyle.usage; 2 3 import java.awt.Rectangle ; 4 5 6 public class InputUnusedLocal 7 { 8 private int mUnreadPrimitive = 0; 9 10 public InputUnusedLocal() 11 { 12 int readPrimitive = 0; 13 int mUnreadPrimitive = 0; 14 int i = readPrimitive; 15 i++; 16 17 this.mUnreadPrimitive++; 18 } 19 20 private void method() 21 { 22 String readObject = ""; 23 Rectangle rectangle = null; 24 Object unreadObject; 25 int i = readObject.length(); 26 27 int j = rectangle.x; 28 29 i += j; 30 } 31 32 private void methodArrays() 33 { 34 int[] array = {}; 35 int[] array2 = {}; 36 int[] unreadArray; 37 int i = array[0]; 38 array2[0] = 0; 39 i++; 40 } 41 42 43 public void method2() 44 { 45 int java; 46 java.io.File file = (java.io.File ) null; 47 if (file != null) { 48 } 49 } 50 51 52 public void testArrayIndex() 53 { 54 int [][][] a = new int[1][1][1]; 55 int i = 0; 56 int j = 0; 57 int k = 0; 58 a[i][j][k]++; 59 } 60 } 61 | Popular Tags |