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

Bug 325085

Summary: NPE in ModiscoURIHandler#canHandle
Product: [Modeling] MoDisco Reporter: Nicolas Bros <nicolas.bros>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks, fabien.giquel, gdupe, hugo.bruneliere, Kenn.Hussey, modisco.web-inbox
Version: 0.8.0Flags: nicolas.bros: helios+
Ed.Merks: pmc_approved+
Kenn.Hussey: pmc_approved+
gdupe: review+
fabien.giquel: review+
Target Milestone: 0.8.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
stacktrace
none
project to reproduce the error
none
patch none

Description Nicolas Bros CLA 2010-09-13 04:54:23 EDT
Created attachment 178721 [details]
stacktrace

See attached stacktrace.
Comment 1 Nicolas Bros CLA 2010-09-13 04:58:54 EDT
Created attachment 178722 [details]
project to reproduce the error

To reproduce:
- Import project Bug325085 from the attached zip
- Do "Navigate > Open EPackage", and select the genmodel metamodel for example
- Apply the "My" facet
- Expand an EClass, and click on the "/firstChar" attribute

You should get the NPE.
Comment 2 Nicolas Bros CLA 2010-09-13 05:10:43 EDT
Created attachment 178723 [details]
patch

Here is a patch that trivially fixes the NPE.
Comment 3 Nicolas Bros CLA 2010-09-13 05:42:42 EDT
The problem is due to the fact that I set just "my" as the nsURI of the FacetSet in my example. So, the nsURI doesn't have a scheme.

I think this patch can be applied for RC4, since it's trivial and the NPE can easily happen if the user wasn't careful to set a correctly formed nsURI on his FacetSets.
Comment 4 Nicolas Bros CLA 2010-09-13 09:50:27 EDT
I applied the patch to branch 0.8 in revision 3023.
Comment 5 Hugo Bruneliere CLA 2010-10-05 05:06:44 EDT
The patch has been successfully applied.