Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325518 - NPE in org.eclipse.xtext.util.Strings.pack
Summary: NPE in org.eclipse.xtext.util.Strings.pack
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 15:41 EDT by Michael Clay CLA
Modified: 2017-09-19 17:23 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Clay CLA 2010-09-16 15:41:34 EDT
an issue array containing null entries creates a NPE inside Strings#pack

java.lang.NullPointerException
       at org.eclipse.xtext.util.Strings.pack(Strings.java:307)
       at org.eclipse.xtext.ui.editor.validation.MarkerCreator.createMarker(MarkerCreator.java:38)
       at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.addMarkers(MarkerUpdaterImpl.java:108)
       at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.updateMarker(MarkerUpdaterImpl.java:64)
       at org.eclipse.xtext.builder.builderState.PersistableResourceDescriptionsImpl.doValidate(PersistableResourceDescriptionsImpl.java:154)
       at org.eclipse.xtext.builder.builderState.PersistableResourceDescriptionsImpl.update(PersistableResourceDescriptionsImpl.java:113)
       at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:127)
       at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:143)
       at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:73)
       at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
       at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
       at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:280)
       at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:361)
       at org.eclipse.core.internal.resources.Project$1.run(Project.java:523)
       at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
       at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
       at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:502)
       at org.eclipse.core.internal.resources.Project.build(Project.java:102)
       at org.eclipse.xtext.builder.impl.BuildScheduler$BuildJob.run(BuildScheduler.java:97)
       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Sven Efftinge CLA 2010-09-17 06:03:49 EDT
In which cases does the array contain null entries?
Maybe we should make sure they are not contained in the first place and make it explicit (through JavaDoc) that null values are not allowed in Strings.pack().
Comment 2 Michael Clay CLA 2010-09-17 09:22:42 EDT
(In reply to comment #1)
> In which cases does the array contain null entries?
> Maybe we should make sure they are not contained in the first place and make it
> explicit (through JavaDoc) that null values are not allowed in Strings.pack().

issuedata arrays containing null entries originating from null parameter values in

AbstractDeclarativeValidator#error(String string, Integer feature, String code, String... issueData)


AbstractDeclarativeValidator#warnString string, Integer feature, String code, String... issueData)
Comment 3 Sebastian Zarnekow CLA 2010-09-24 11:11:46 EDT
Pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 17:12:24 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:23:58 EDT
Closing all bugs that were set to RESOLVED before Neon.0