| Summary: | [1.8][extract method] Extract Method fails to include Instance from instance::method | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Sebastian Schulthess <s.schulthess> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta |
| Version: | 4.6 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
Snippet to reproduce the bug:
package snippet;
import java.util.function.Supplier;
public class Snippet {
void m1() {
Snippet snippet = new Snippet();
Supplier<String> s = snippet::test; // extract to method
}
private String test() {
return null;
}
}
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
How to reproduce with Java 8: Exctract Method containing code of a instance::method call. The instance is not included in the arguments of the new extracted method. Example: // some other code someList.forEach(aLogger::logScriptRow); --> extraced method: private void preReturnOperations() { // some other code someList.forEach(aLogger::logScriptRow); } Here aLooger is missing.