Summary: | Evaluations are not working if the method contains local class | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jinbo Wang <jinbwan> |
Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | gayanper, sarika.sinha |
Version: | 4.23 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Whiteboard: | stalebug |
Description
Jinbo Wang
2022-01-11 01:44:25 EST
@Gayan, Can you check this? When evaluating the expression 'x' on the breakpoint, the evaluation engine collects all context-visible variables and wrap them into arguments of a virtual ___run method that's used to compile the target expression. ``` import java.util.List; import java.util.ArrayList; public class Hello{ static void ___run(java.lang.String[] args, java.lang.String msg, java.util.List<new org.springframework.samples.petclinic.Hello(){}> x) throws Throwable { return x; } public static void main (String[] args){ } } ``` For the case of local class, the EvaluationSourceGenerator converts the type name List<Position> of variable x to java.util.List<new org.springframework.samples.petclinic.Hello(){}>, which does not comply to the Java syntax, so the compiled expression will report a compilation error. The question is how do we handle the local class of the target frame context? 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. |