Bug 581259 - eclipse does not recognize shadowing class member
Summary: eclipse does not recognize shadowing class member
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-22 05:35 EST by Korneel Dumon CLA
Modified: 2022-12-22 05:35 EST (History)
0 users

See Also:


Attachments
debugging (120.15 KB, image/png)
2022-12-22 05:35 EST, Korneel Dumon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Korneel Dumon CLA 2022-12-22 05:35:10 EST
Created attachment 288899 [details]
debugging

I accidentally shadowed a protected class member variable in a subclass. If I inspected the variable while debugging eclipse showed me the info on the baseclass member rather than the subclass member which was actually used.

In the attached screenshot you can see that the `wait` variable seems to be initialized when inspecting it. But at the top of the screenshot there is another (shadowing) variable which is clearly null. In the next step a NullPointerException happened which had me confused for a while.