Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 293554 - [modeling] NPE on validation while changing active page
Summary: [modeling] NPE on validation while changing active page
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Incubators (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-28 06:39 EDT by Jacques LESCOT CLA
Modified: 2009-10-31 12:33 EDT (History)
1 user (show)

See Also:


Attachments
Fix the NPE - Provide additionnal check (973 bytes, patch)
2009-10-28 06:40 EDT, Jacques LESCOT CLA
contact: iplog+
Details | Diff
mylyn/context/zip (1.08 KB, application/octet-stream)
2009-10-31 12:33 EDT, Benjamin Cabé CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques LESCOT CLA 2009-10-28 06:39:14 EDT
Steps to reproduce :
1. I have an EmfFormEditor with two pages. In a first page, I defined a text widget and bind it with a property of my EMF model. The binding is register on a SWT.FocusOut event.
2. I modify the value in the text field
3. I change the active page, this will launch the validation process, but since I am also changing the active page, results in a NPE

Here is the stackTrace :

Caused by: java.lang.NullPointerException
	at org.eclipse.pde.emfforms.internal.validation.ValidatingEContentAdapter.validate(ValidatingEContentAdapter.java:107)
	at org.eclipse.pde.emfforms.internal.validation.ValidatingEContentAdapter.notifyChanged(ValidatingEContentAdapter.java:97)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:280)
	at com.anwrt.platform.model.impl.AssetModelTypeImpl.setCustomerPath(AssetModelTypeImpl.java:402)
	at com.anwrt.platform.model.impl.AssetModelTypeImpl.eSet(AssetModelTypeImpl.java:574)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1073)
	at org.eclipse.emf.edit.command.SetCommand.doExecute(SetCommand.java:721)
	at org.eclipse.emf.edit.command.AbstractOverrideableCommand.execute(AbstractOverrideableCommand.java:131)
	at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:84)
	... 83 more
Comment 1 Jacques LESCOT CLA 2009-10-28 06:40:58 EDT
Created attachment 150713 [details]
Fix the NPE - Provide additionnal check
Comment 2 Benjamin Cabé CLA 2009-10-28 06:55:42 EDT
Sounds fair, thanks for the patch Jacques :)
Comment 3 Benjamin Cabé CLA 2009-10-31 12:33:03 EDT
FIXED in HEAD >20091031.
Comment 4 Benjamin Cabé CLA 2009-10-31 12:33:07 EDT
Created attachment 150998 [details]
mylyn/context/zip