Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 399121 - Deleting a validation-disabled resource can lead to NPE
Summary: Deleting a validation-disabled resource can lead to NPE
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.validation (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Chuck Bridgham CLA
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords:
: 424407 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-25 14:21 EST by Nitin Dahyabhai CLA
Modified: 2013-12-19 04:07 EST (History)
4 users (show)

See Also:
cbridgha: review+
rosendo: review+


Attachments
proposed patch, stores paths instead of handles in disabled set (5.42 KB, patch)
2013-01-25 16:54 EST, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2013-01-25 14:21:46 EST
If a resource is disabled from validation and then removed, a NPE will be triggered the next time a resource is enabled or disabled.  It most likely occurs because IContainer#findMember() can return a null, and that return result is stored in the disabled list regardless in org.eclipse.wst.validation.internal.DisabledResourceManager#load(IProject) line 91.
Comment 1 Nitin Dahyabhai CLA 2013-01-25 16:54:39 EST
Created attachment 226139 [details]
proposed patch, stores paths instead of handles in disabled set
Comment 2 Chuck Bridgham CLA 2013-01-28 16:50:21 EST
I like this patch.. Carl, Rosendo can you take a look?
Comment 3 Rosendo Martinez CLA 2013-01-28 17:41:23 EST
Looks good. Reviewed.
Comment 4 Nitin Dahyabhai CLA 2013-01-29 14:52:53 EST
Pushed to master and released v201301291945.
Comment 5 Kaloyan Raev CLA 2013-12-19 04:07:21 EST
*** Bug 424407 has been marked as a duplicate of this bug. ***