Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255520 - BundleDescriptionImpl access to lazyData could result in NPE
Summary: BundleDescriptionImpl access to lazyData could result in NPE
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-17 10:14 EST by Thomas Watson CLA
Modified: 2009-01-06 17:14 EST (History)
1 user (show)

See Also:


Attachments
proposed patch (5.29 KB, patch)
2009-01-06 05:15 EST, Rob Harrop CLA
tjwatson: iplog+
Details | Diff
updated patch (7.74 KB, patch)
2009-01-06 17:12 EST, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2008-11-17 10:14:32 EST
See bug 247522 comment 20.  We should consider changing fullyLoad to something like the following:

private LazyData loadLazyData()

This method would return the current lazyData object.  All places that call fullyLoad and then access lazyData directly should instead use a local copy returned by loadLazyData.
Comment 1 Thomas Watson CLA 2008-11-17 10:17:01 EST
Assigning to Rob to investigate.
Comment 2 Rob Harrop CLA 2009-01-06 05:15:06 EST
Created attachment 121601 [details]
proposed patch

Tom,

This patch does (I think) what you were requesting with minimal disruption.

Rob
Comment 3 Thomas Watson CLA 2009-01-06 17:12:43 EST
Created attachment 121708 [details]
updated patch

Yes, this is what I was looking for.  I modified the patch to get rid of the warnings about hiding a field with a local variable.  I just use currentData instead of lazyData as the local variable name.
Comment 4 Thomas Watson CLA 2009-01-06 17:13:54 EST
Patch released.  Thanks Rob.