Bug 521214 - In debugger, evaluation of expression containing call to generic method fails
Summary: In debugger, evaluation of expression containing call to generic method fails
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-21 23:25 EDT by Alexey Ragozin CLA
Modified: 2023-03-02 13:48 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Ragozin CLA 2017-08-21 23:25:46 EDT
Java debugger fails to evaluate expression in context of method with generic typed argument.

Following error is reported
"The method ... in type ... is not applicable for arguments (...)"

Steps to reproduce
---

Below is snippet of code reproducing a problem.

public class EclipseDebugIssue<T> {

    private void methodA(SomeClass<T> obj) {
        methodB(obj);
    }

    private int methodB(SomeClass<T> obj) {
        return 42;
    }

    public static void main(String[] args) {
        EclipseDebugIssue<String> t = new EclipseDebugIssue<String>();
        t.methodA(new SomeClass<String>("A"));
    }

}

class SomeClass<T> {

    private T val;

    public SomeClass(T val) {
        this.val = val;
    }
}

Put breakpoint in method "methodA"
At break point try to inspect expression "methodB(obj"
Following error would be shown

"The method methodB(SomeClass<T>) in type EclipseDebugIssue<T> is not applicable for arguments (SomeClass<T>)"
Comment 1 Sarika Sinha CLA 2017-08-22 00:05:43 EDT
Can reproduce the bug, will look into this in M3.
Comment 2 Sarika Sinha CLA 2017-10-11 01:56:27 EDT
Not able to find time in M3
Comment 3 Andrey Loskutov CLA 2017-10-11 02:17:30 EDT
Which Java version is set for the workspace compiler settings? If it is <1.5 then please set the compliance to higher version - will it fix the issue?

We had similar problems in a 1.8  project where the debugger resolved Java compliance not from the project itself but from "external dependencies" hidden project, which in turn uses compiler settings from the workspace.
Comment 4 Sarika Sinha CLA 2018-04-13 02:59:57 EDT
Moving it out of 4.8.
Comment 5 Eclipse Genie CLA 2020-05-16 16:53:46 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.
Comment 6 Sarika Sinha CLA 2020-05-18 01:15:22 EDT
Bug is still not fixed.
Comment 7 Eclipse Genie CLA 2023-03-02 13:48:24 EST
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.