Community
Participate
Working Groups
Version: 3.4.0 Build id: I20080227-1100 Minor consequence of bug 196200, the following code now produces 2 errors instead of 1: import java.util.List; interface B { List<String> m(CharSequence seq); } public class X implements B { public ArrayList<String> m(CharSequence arg0) { return null; } Only error 1 should be surfaced. ---------- 1. ERROR in X.java (at line 6) public ArrayList<String> m(CharSequence arg0) { ^^^^^^^^^ ArrayList cannot be resolved to a type ---------- 2. ERROR in X.java (at line 6) public ArrayList<String> m(CharSequence arg0) { ^^^^^^^^^^^^^^^^^ The return type is incompatible with B.m(CharSequence) ----------
Variation, also produces 2 errors instead of 1: import java.util.ArrayList; public class X { public List<String> m(ArrayList<String> l) { return l; } } should only complain about missing 'List'
Other testcase should only report one issue (missing IOException): import java.util.List; interface B { void m() throws Exception; } public class X implements B { public void m() throws IOException { } } currently it also reports incompatibilty between IOException and Exception.
Added ProblemTypeAndMethod#test078-079
Created attachment 91213 [details] Proposed patch
Released for 3.4M6 Fixed
Verified for 3.4M6 using I20080324-1300.