Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 298601 - NullPointerException in Xtext-builder because of non Xtext-resources in the ResourceSet
Summary: NullPointerException in Xtext-builder because of non Xtext-resources in the R...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 0.8.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-29 05:54 EST by Holger Schill CLA
Modified: 2017-09-19 16:38 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments
Screenshot of the situation (256.09 KB, image/png)
2009-12-29 05:56 EST, Holger Schill CLA
no flags Details
Resources to be updated in builder (51.71 KB, image/png)
2009-12-29 05:56 EST, Holger Schill CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schill CLA 2009-12-29 05:54:12 EST
Xtext goes through all resources in ResourceSet and tries to get the IResourceDescription for every URI. If the URI describes a non Xtext-resource the result of 

IResourceServiceProvider resourceServiceProvider = registry.getResourceServiceProvider(uri, null); in the class org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions leads to null. So if the next step is 

Manager manager = resourceServiceProvider.getResourceDescriptionManager();

we have a NullPointerException.

In my opinion the builder should not care about non Xtext resources.

The org.eclipse.xtext.builder.impl.javasupport.JdtToBeBuiltComputer should filter out such resources.
Comment 1 Holger Schill CLA 2009-12-29 05:56:06 EST
Created attachment 155108 [details]
Screenshot of the situation
Comment 2 Holger Schill CLA 2009-12-29 05:56:56 EST
Created attachment 155109 [details]
Resources to be updated in builder
Comment 3 Sebastian Zarnekow CLA 2009-12-29 07:08:07 EST
The builder should not throw a NPE if there is no IResourceServiceProvider available for a given URI.
Comment 4 Sebastian Zarnekow CLA 2009-12-29 07:53:17 EST
This one was already fixed.
Comment 5 Karsten Thoms CLA 2017-09-19 16:38:23 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.