Bug 400515 - Potential NPE using IBreakpoint.getmarker() (was: NPE in BreakpointUtils)
Summary: Potential NPE using IBreakpoint.getmarker() (was: NPE in BreakpointUtils)
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 20:08 EST by Andrew Eidsness CLA
Modified: 2022-11-19 20:32 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eidsness CLA 2013-02-11 20:08:44 EST
The start of BreakpointUtils.getType(IJavaBreakpoint breakpoint) looks like:

    String handle = breakpoint.getMarker().getAttribute(HANDLE_ID, null);

The javadoc for IBreakpoint.getMarker says that null is a valid return value.  However, this method does not check for that result before calling #getAttribute.
Comment 1 Michael Rennie CLA 2013-02-12 12:05:04 EST
Yeah, we use it *without checks* in quite a few places. Doing a workspace search found 176 references where we do not check.
Comment 2 Eclipse Genie CLA 2020-09-20 11:53:57 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.

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.
Comment 3 Eclipse Genie CLA 2022-11-19 20:32:13 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.