Bug 507647 - An INFO or WARNING for non-specialized default methods
Summary: An INFO or WARNING for non-specialized default methods
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 02:35 EST by Mickael Istria CLA
Modified: 2016-11-18 03:41 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 Mickael Istria CLA 2016-11-17 02:35:05 EST
As default methods are not meant to be actually part of the logic, but are mostly there to allow interfaces to evolve in a backward-compatible way, it would make sense to report absence of implementation for default methods as a WARNING or an INFO.
As a designer of an interface, even if a method is made "default", I expect implementations to implement it.
Comment 1 Noopur Gupta CLA 2016-11-17 02:49:07 EST
Moving to JDT Core for consideration.
Comment 2 Jay Arthanareeswaran CLA 2016-11-17 22:54:02 EST
There are quite a few default methods added in the Java platform classes that people are not really expected to override. IMO, we want them to be reported, if we decide to do, as INFO by default.
Comment 3 Sasikanth Bharadwaj CLA 2016-11-18 03:41:49 EST
(In reply to comment #0)
> As a designer of an interface, even if a method is made "default", I expect
> implementations to implement it.
I would make a method default only if I expect all clients to have the same implementation and only few to override it with reason. That said, I agree that it would be good to report this in the interest of clients that would want to override the default behavior