1 19 package org.netbeans.test.codegen.indent; 20 21 import java.util.ArrayList ; 22 import java.util.HashMap ; 23 import java.util.Iterator ; 24 import java.util.List ; 25 import java.util.Map ; 26 27 31 public class GarbageClass { 32 33 36 public static String alois() { 37 new ArrayList ().add(null); 40 Object o = new Object (); 41 List l; 43 44 return "?"; } 46 47 public static void lojza() 48 { 49 ; 52 Map m = new HashMap (); 53 Iterator it = m.values().iterator(); 55 56 while (it.hasNext()) { 57 Class c = it.next().getClass(); 58 } 60 while (it.hasNext()) 61 it.next(); 63 } 65 static void gianluigi() { 66 for (int i = 0; i < 10; i++) { 67 if (i == 10) { 68 Thread.dumpStack(); 70 } } 73 String s = ""; 74 if (s.equals("")) { 75 s = "aa" + "bb"; } else { 77 System.err.println("Do nothing."); 78 } 79 80 if ("test".equals(s) || "test2".equals(s)) 81 s = "wow"; 82 } 83 84 static void call() { 85 List l = new ArrayList (10); 86 87 l.add(0, new Object ()); 90 91 l.add(1, new Object ()); 93 94 l.addAll( 96 3, java.util.Collections.EMPTY_LIST 98 ); 99 } 100 } 101 | Popular Tags |