| Summary: | [search] Search references missing a Java 8 method reference in anonymous class method in private method | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Benjamin DeLillo <ben> | ||||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ben | ||||||
| Version: | 4.7 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
Created attachment 270117 [details]
After searching (working case)
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. The problem still occurs as of Eclipse 2019-03 (4.11.0) |
Created attachment 270116 [details] After searching (broken case) STR: In a project containing the class below, Ctrl-Shift-G/Search->References->Workspace on the declaration of broken() Observed Behavior: Search shows 0 results Expected Behavior: Search shows 1 result for the line `someFuture.thenRun(Main.this::broken);` Additional info: If the commented line assigning a runnable instance from the method reference is uncommented, then the search correctly shows 2 results. package com.example; import java.util.concurrent.CompletableFuture; public class Main { CompletableFuture<Void> someFuture = new CompletableFuture<Void>(); public void run() { // If the following line is uncommented the search correctly show 2 results. //Runnable working = Main.this::broken; new Runnable() { @Override public void run() { someFuture.thenRun(Main.this::broken); someFuture.complete(null); } }.run(); } // Search references on broken() shows 0 results, but should show 1 public void broken() { System.out.println("broken"); } public static void main(String... args) { new Main().run(); } }