Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325085 - NPE in ModiscoURIHandler#canHandle
Summary: NPE in ModiscoURIHandler#canHandle
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.8.1   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 04:54 EDT by Nicolas Bros CLA
Modified: 2011-05-23 09:27 EDT (History)
6 users (show)

See Also:
nicolas.bros: helios+
Ed.Merks: pmc_approved+
Kenn.Hussey: pmc_approved+
gdupe: review+
fabien.giquel: review+


Attachments
stacktrace (4.95 KB, text/plain)
2010-09-13 04:54 EDT, Nicolas Bros CLA
no flags Details
project to reproduce the error (4.05 KB, application/x-zip-compressed)
2010-09-13 04:58 EDT, Nicolas Bros CLA
no flags Details
patch (610 bytes, patch)
2010-09-13 05:10 EDT, Nicolas Bros CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.