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

Bug 363914

Summary: Check that you cannot append a null segment to a QualifiedName
Product: [Modeling] TMF Reporter: Mark Christiaens <mark.g.j.christiaens>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: mark.g.j.christiaens, sebastian.zarnekow, sven.efftinge
Version: 2.1.0Flags: sven.efftinge: juno+
Target Milestone: M7   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 375155    

Description Mark Christiaens CLA 2011-11-16 09:47:51 EST
Build Identifier: 20110916-0149

Just a minor enhancement.  The factory org.eclipse.xtext.naming.QualifiedName.create(String...) checks that you cannot create a qualified name with a "null" segment.  However, the org.eclipse.xtext.naming.QualifiedName.append(String) function does not.  Would be better to always guarantee the non-null invariant and also check the parameter of the append operation.

Reproducible: Always
Comment 1 Moritz Eysholdt CLA 2011-11-28 08:20:11 EST
fixed; pushed to 'master'.
Comment 2 Sebastian Zarnekow CLA 2011-11-28 13:23:07 EST
We have to make sure that no client code in the frameworks passes null to QualifiedName#append
Comment 3 Moritz Eysholdt CLA 2011-12-01 07:11:24 EST
As as discussed internally, I've removed the null-check for now since it might lead to new exceptions in clients. 

The plan is to apply the apply the null-check again right after we have release Xtext 2.2. This will allow us to do more thorough testing. 

The commit can be re-applied via "git cherry-pick -x b74a06f705a9a0750289e2152d49941f4727e756"
Comment 4 Sven Efftinge CLA 2012-04-26 15:27:01 EDT
cherry-picked and pushed.
Comment 5 Eclipse Webmaster CLA 2017-10-31 11:06:34 EDT
Requested via bug 522520.

-M.
Comment 6 Eclipse Webmaster CLA 2017-10-31 11:17:56 EDT
Requested via bug 522520.

-M.