This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 324229 - Cloning a model of a non-existent file causes NPE
Summary: Cloning a model of a non-existent file causes NPE
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Rakesh CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 13:14 EDT by Nick Sandonato CLA
Modified: 2010-09-08 16:11 EDT (History)
1 user (show)

See Also:
nsand.dev: review+


Attachments
patch (1.14 KB, patch)
2010-09-07 09:39 EDT, Rakesh CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2010-09-01 13:14:46 EDT
Cloning a model for a non-existent file causes an NPE since Paths cannot be initialized from a null path string. 


org.eclipse.core.runtime.AssertionFailedException: null argument:   
 at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)   
 at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)   
 at org.eclipse.core.runtime.Path.initialize(Path.java:577)   
 at org.eclipse.core.runtime.Path.<init>(Path.java:163)   
 at org.eclipse.wst.sse.core.internal.FileBufferModelManager$ExternalURIResolver.setFileBaseLocation(FileBufferModelManager.java:156)   
 at org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.setBaseLocation(AbstractStructuredModel.java:1311)   
 at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.createNewInstance(ModelManagerImpl.java:907)   
 at org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.newInstance(AbstractStructuredModel.java:989)   
 at org.eclipse.jst.jsp.ui.tests.model.TestModelsFromFiles.testClone(TestModelsFromFiles.java:308)   
 at org.eclipse.jst.jsp.ui.tests.model.TestModelsFromFiles.doTestCreate(TestModelsFromFiles.java:292)   
 at org.eclipse.jst.jsp.ui.tests.model.TestModelsFromFiles.testNonExistentXML(TestModelsFromFiles.java:42)   
 at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:376)   
 at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:209)   
 at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195)   
 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)   
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)   
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)   
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)   
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)   
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)   
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)   
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)   
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)   
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)   
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)   
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)   
 at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138)   
 at org.eclipse.test.UITestApplication.run(UITestApplication.java:60)   
 at org.eclipse.test.UITestApplication.start(UITestApplication.java:210)   
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)   
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)   
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)   
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)   
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)   
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:621)   
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576)   
 at org.eclipse.equinox.launcher.Main.run(Main.java:1409)   
 at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Comment 1 Rakesh CLA 2010-09-07 09:39:07 EDT
Created attachment 178321 [details]
patch

Assuming setting of 'null' path is a valid operation.
Comment 2 Nick Sandonato CLA 2010-09-08 16:11:10 EDT
Looks good.