Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352214

Summary: ResourceDescriptionsBasedContainer descriptionsChanged should not create nulled IResourceDescriptions
Product: [Modeling] TMF Reporter: Mark Christiaens <mark.g.j.christiaens>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mark Christiaens CLA 2011-07-15 09:57:56 EDT
Build Identifier: 20110615-0604

When a clean build occurs then ResourceDescriptionsBasedContainer.descriptionsChanged(Event) receives deltas that have delta.getNew () == null.  That null enters the uriToDescription map.  That in turn causes getResourceDescriptions() to return an Iterable containing nulls.  That causes an NPE in for example  org.eclipse.xtext.resource.containers.FilterUriContainer.getResourceDescriptions().

Reproducible: Always
Comment 1 Mark Christiaens CLA 2011-07-15 10:15:01 EDT
BTW, I'm trying to inject my way out of this but I notice I need org.eclipse.xtext.resource.containers.ContainerState to do so.  That class is package private.  Is that intentional?
Comment 2 Sebastian Zarnekow CLA 2011-07-15 10:20:38 EDT
No, the package private class is not intentional. Fortunately it's easy to implement (read: copy) the IContainerState on your own :-/
Comment 3 Sebastian Zarnekow CLA 2011-07-25 12:47:56 EDT
Pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 18:08:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:17:50 EDT
Closing all bugs that were set to RESOLVED before Neon.0