| Summary: | Evaluations for lambda variables are not working when using generic type arguments on lambda | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jinbo Wang <jinbwan> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | gayanper, sarika.sinha |
| Version: | 4.23 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
@Gayan, Can you check this? Close it since I cannot reproduce this issue again after the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=578145. *** This bug has been marked as a duplicate of bug 578145 *** |
Sample: ``` import java.util.ArrayList; import java.util.List; import java.util.function.Function; public class InspectLambda { static class OwnerController<E> { List<E> elements = new ArrayList<>(); public void addOwner(E owner) { this.elements.add(owner); } public <T> List<T> map(Function<E, ? extends T> action) { List<T> list = new ArrayList<>(); for (int i = 0; i < this.elements.size(); i++) { list.add(action.apply(this.elements.get(i))); } return list; } } public static void main(String[] args) { OwnerController controller = new OwnerController(); controller.addOwner("Hello"); controller.map((owner) -> { long timestamp = System.currentTimeMillis(); return owner; // Add a breakpoint here }); } } ``` Stop at the line "// Add a breakpoint here", it fails to evaluate local variables such as 'owner', 'timestamp', 'controller'. Hovering at the those variables, it can display their values well.