Is there a tool that would allow me to check use of generic collections in code that must be compilable with Java 1.4? I would imagine example code as:
Map/*<String, Integer>*/ map = new HashMap();
map.put("abc", new Integer(3)); // ok
map.put("def", "ghi"); // warning
EDIT: Unfortunately the build process is "set in stone" to use Java 1.4, so the code I commit cannot contain any 1.5 features, or depend on any translation tools. The easiest solution so far seems to be maintaining local version of code for 1.5, and converting it to 1.4 before commit.