1 package test4; 2 3 import java.util.Map; 4 import java.util.HashMap; 5 6 public class JIRA152 { foo(int i)7 public int foo(int i) { return i; } bar(int j)8 public int bar(int j) { return j; } tested(int k)9 public int tested(int k) { 10 String[] p; 11 if (k > 0) 12 p = new String[1]; 13 else 14 p = null; 15 16 if (p != null) 17 while (k < p.length) 18 k++; 19 20 return 0; 21 } 22 put(String s, Object obj)23 public String put(String s, Object obj) { 24 return s; 25 } 26 buildColumnOverride(JIRA152 element, String path)27 private static Map<String, String[]> buildColumnOverride(JIRA152 element, String path) { 28 Map<String, String[]> columnOverride = new HashMap<String, String[]>(); 29 if ( element == null ) return null; 30 String singleOverride = element.toString(); 31 String multipleOverrides = element.toString(); 32 String[] overrides; 33 if ( singleOverride != null ) { 34 overrides = new String[] { singleOverride }; 35 } 36 /*else if ( multipleOverrides != null ) { 37 // overrides = columnOverride.get("foo"); 38 overrides = null; 39 }*/ 40 else { 41 overrides = null; 42 } 43 44 if ( overrides != null ) { 45 for (String depAttr : overrides) { 46 columnOverride.put( 47 element.put(path, depAttr.getClass()), 48 new String[] { depAttr.toLowerCase() } 49 ); 50 //columnOverride.put("a", new String[1]); 51 } 52 } 53 return columnOverride; 54 } 55 test()56 public int test() { 57 Map<String,String[]> map = buildColumnOverride(this, "foo"); 58 return map.size(); 59 } 60 } 61