Bug 334457 - [compiler][null] check compatibility of inherited null contracts
Summary: [compiler][null] check compatibility of inherited null contracts
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.8 M4   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-15 11:55 EST by Stephan Herrmann CLA
Modified: 2011-12-05 04:08 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-01-15 11:55:04 EST
In bug 186342 comment 62 the issue was brought up that null contracts
(using annotations) can also be inherited from super interfaces.

This entails that if a class inherits a method from several super types
those inherited contracts could contradict each other.
As long as the subclass overrides/implements that method, inconsistencies
will be reported as an illegal contract redefinition regarding at least one
of the inherited methods, but if the subclass inherits an implementation
without overriding, the solution in bug 186342 does not detect the 
inconsistency.
Comment 1 Stephan Herrmann CLA 2011-10-23 11:54:25 EDT
This has been implemented in the prototype as of this revision:
http://dev.eclipse.org/viewcvs/viewvc.cgi?view=revision&root=TOOLS_OBJECTTEAMS&revision=2058
plus tests in
http://dev.eclipse.org/viewcvs/viewvc.cgi?view=revision&root=TOOLS_OBJECTTEAMS&revision=2057

This will eventually be released together with bug 186342.
Comment 2 Stephan Herrmann CLA 2011-11-30 16:52:15 EST
Released for 3.8 M4 as part of commit 
http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=305123b230bcfd1f733969b7cd2c687b75857ff0
on behalf of bug 186342.
Comment 3 Srikanth Sankaran CLA 2011-12-05 04:08:39 EST
Verified for 3.8 M4 using build I20111202-0800.