Bug 522709 - FR: Inline interface method if used in default-method only.
Summary: FR: Inline interface method if used in default-method only.
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 05:15 EDT by Peter CLA
Modified: 2017-09-25 05:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter CLA 2017-09-25 05:15:13 EDT
Having a interface

1  interface IMAPConnector{
2    Store connect(String username, String password);
3    default Store connect(Account a) {
4      return connect(a.getUsername(), a.getPassword());
5    }
6  }

I like to refactor to have only 

1  interface IMAPConnector {
2    Store connect(Account a);
3  }

How tho do that: All implementing classes and interfaces must change the implementing method from connect(String,String) to connect(Account) having two new first lines:

  String username = a.getUsername();
  String password = a.getPassword();

.


What requirements:
The Method connect(String,String) must not be used.