Bug 566030 - Type mismatch when using StackWalker::walk
Summary: Type mismatch when using StackWalker::walk
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.16   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.24   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact: Jay Arthanareeswaran CLA
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2020-08-13 04:29 EDT by Yanming Zhou CLA
Modified: 2024-02-10 06:54 EST (History)
1 user (show)

See Also:


Attachments
Compiler Error (248.30 KB, image/jpeg)
2020-08-13 04:29 EDT, Yanming Zhou CLA
no flags Details
No Error (190.00 KB, image/jpeg)
2020-08-13 04:30 EDT, Yanming Zhou CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yanming Zhou CLA 2020-08-13 04:29:12 EDT
Created attachment 283850 [details]
Compiler Error

https://docs.oracle.com/javase/9/docs/api/java/lang/StackWalker.html

Example code cannot be compiled by eclipse but works fine with javac.

StackWalker walker = StackWalker.getInstance(Option.RETAIN_CLASS_REFERENCE);
Optional<Class<?>> callerClass = walker.walk(s -> s.map(StackFrame::getDeclaringClass).findFirst());
Comment 1 Yanming Zhou CLA 2020-08-13 04:30:54 EDT
Created attachment 283851 [details]
No Error
Comment 2 Manoj N Palat CLA 2020-11-14 20:37:13 EST
Bulk move out of 4.18
Comment 3 Manoj N Palat CLA 2021-02-10 08:29:10 EST
bulk move out of 4.19 - keeping in radar for 4.20
Comment 4 Manoj N Palat CLA 2021-05-21 00:09:47 EDT
Bulk move out of 4.20
Comment 5 Yanming Zhou CLA 2021-08-10 20:32:25 EDT
Still not fixed with 2021-06 (4.20.0)
Comment 6 Manoj N Palat CLA 2021-08-18 20:39:10 EDT
Bulk move out of 4.21
Comment 7 Jay Arthanareeswaran CLA 2021-11-10 23:02:19 EST
Sorry, looks like nobody found time to look at this yet. Moving out.
Comment 8 Manoj N Palat CLA 2022-02-16 05:10:46 EST
Bulk move out of 4.23
Comment 9 Manoj N Palat CLA 2022-02-16 05:11:01 EST
Bulk move out of 4.23
Comment 10 Manoj N Palat CLA 2022-02-16 05:11:27 EST
Bulk move out of 4.23
Comment 11 Manoj N Palat CLA 2022-02-16 05:11:29 EST
Bulk move out of 4.23
Comment 12 Eclipse Genie CLA 2024-02-10 06:54:16 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.