| Summary: | [1.8][compiler] investigate differences between compilers re MethodVerifyTest | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> |
| Component: | Core | Assignee: | Manoj N Palat <manoj.palat> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, srikanth_sankaran |
| Version: | 3.8 | ||
| Target Milestone: | BETA J8 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=404648 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 380190 | ||
|
Description
Stephan Herrmann
(In reply to comment #0) > Eclipse found error(s) but Javac did not find any: > - test170() > - test171() > - test172() > - test173() ECJ complains: overriding a synchronized method without being synchronized. > - test173() ECJ complains about missing impl. of hashCode() Fix is by adding to the tests: Excuse.EclipseWarningConfiguredAsError Will be released as part of the fix for bug 401796. Remains in this category: - - test330435(), error is: "Type mismatch: cannot convert from Object[] to String[]" (In reply to comment #0) > Eclipse found error(s) but Javac only found warning(s): > - test094() Here ECJ reports "The method addAll(Collection<? extends Y<X>>) in the type ArrayList<Y<X>> is not applicable for the arguments (List<Y>)" This was reported by javac 1.7 but is not longer reported by java 1.8 b74. Change in method resolution involving a raw type in type parameter position, do we have a bug for this? (In reply to comment #0) > Javac found error(s) but Eclipse did not find any: > - test145() javac reports name clash between setValue(Object) in Base setValue(Tvalue) in BaseInterface > - test204() similar to test145() (?) > - test330445() javac reports: method foo in class Y cannot be applied to given types; Y.foo(new Properties()); ^ required: Map<String,String> found: Properties reason: argument mismatch; Properties cannot be converted to Map<String,String> > - test331446() javac reports: "reference to assertEquals is ambiguous" These will require a deeper look. (In reply to comment #0) > Eclipse found warnings(s) but Javac did not find any: > - test169() > - test169a() ECJ reports raw types > - test175() This was the one with missing hashCode() (typo in comment 1) > - test186() Not overriding a method that is private to a different package > - test188() raw type > - test346029c() > - test346029d() > - test346029e() missing @Override Nothing dangerous, should be fixable by setting the appropriate Excuse. With the above changes (regarding appropriate excuses) I'm down to 8 deviations: (In reply to comment #0) > Unused excuse: > - test043() > > Eclipse found error(s) but Javac did not find any: > - test330435() > > Eclipse found error(s) but Javac only found warning(s): > - test094() > > Javac found error(s) but Eclipse did not find any: > - test145() > - test204() > - test330445() > - test331446() > > Probably irrelevant differences: > - test127() Main theme is: changed resolution in the presence of raw types. Comment 2 and comment 3 capture the observations for the main issues. ---------------------------- Running the same comparison with javac 1.7.0_10 reports these deviations: Like above: Unused excuse: - test043() Eclipse found error(s) but Javac did not find any: - test330435() Javac found error(s) but Eclipse did not find any: - test145() - test204() - test330445() - test331446() Probably irrelevant differences: - test127() DIfferent issues: Eclipse found error(s) but Javac only found warning(s): - test144() name clash ======================= Meta-diff (between 1.7 diffs and 1.8 diffs); Only at 1.7 - test144() Only at 1.8 - test094() Implementation note: in order to use the proper Excuses I had to modify the central function AbstractRegressionTest.runNegativeTest(boolean, String[], String[], Map, String, JavacTestOptions) because it was not possible to - run a negative test - with only a warning, no errors, and - use an Excuse I copied a tiny piece of logic from a similar method: AbstractRegressionTest.runNegativeTest(String[], String) I'm running the entire suite to check if this breaks anything. Test ran fine. First bulk of changes has been released via commit ddff16f6a6b8fee88d497b4653d14d58ccda81b4 on behalf of bug 401796. No longer blocking the work on default methods. (In reply to comment #5) > With the above changes (regarding appropriate excuses) I'm down to 8 > deviations: > > (In reply to comment #0) > > Unused excuse: > > - test043() > > > > Eclipse found error(s) but Javac did not find any: > > - test330435() > > > > Eclipse found error(s) but Javac only found warning(s): > > - test094() > > > > Javac found error(s) but Eclipse did not find any: > > - test145() > > - test204() > > - test330445() > > - test331446() > > > > Probably irrelevant differences: > > - test127() > > Main theme is: changed resolution in the presence of raw types. > Comment 2 and comment 3 capture the observations for the main issues. With lambda b81 the same 8 deviations can still be observed. Let us carry forward this work in bug 404648 *** This bug has been marked as a duplicate of bug 404648 *** |