Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363914 - Check that you cannot append a null segment to a QualifiedName
Summary: Check that you cannot append a null segment to a QualifiedName
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 375155
  Show dependency tree
 
Reported: 2011-11-16 09:47 EST by Mark Christiaens CLA
Modified: 2017-10-31 11:17 EDT (History)
3 users (show)

See Also:
sven.efftinge: juno+


Attachments

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