1 package test2; 2 3 import java.util.HashMap; 4 5 @SuppressWarnings("rawtypes") 6 class HashMapWrapper extends HashMap { 7 /** default serialVersionUID */ 8 private static final long serialVersionUID = 1L; 9 HashMapWrapper(int size, int args)10 HashMapWrapper(int size, int args) { 11 super(size); 12 } 13 } 14 15 @SuppressWarnings({"rawtypes","unused"}) 16 public class NewExprInTry { run()17 public int run() { 18 return foo(6); 19 } 20 foo(int size)21 public int foo(int size) { 22 HashMap h; 23 try { 24 h = new HashMap(size); 25 } 26 catch (Exception e) {} 27 return 1; 28 } 29 } 30