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

Bug 313298

Summary: can't undo the set parameter default value set with feature UMLPackage.eINSTANCE.getParameter_Default() : on ParameterOperations.unsetDefault it tries to unset the PROPERTY__DEFAULT_VALUE
Product: [Modeling] MDT.UML2 Reporter: Ioana <balaurica>
Component: CoreAssignee: Kenn Hussey <Kenn.Hussey>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 Flags: Kenn.Hussey: juno+
Version: unspecified   
Target Milestone: SR1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
stack trace for the Null pointer exception none

Description Ioana CLA 2010-05-18 04:29:44 EDT
Build Identifier: 

I set the default value to a parameter using the set command:

SetCommand.create(editingDomain, parameter, UMLPackage.eINSTANCE.getParameter_Default(), defaultValue)

and it's working ok, but when I try to undo, I've seen that the unsetDefault (of ParameterOperations) is trying to do this:

parameter.eUnset(UMLPackage.Literals.PROPERTY__DEFAULT_VALUE); and throws the a NPE (as seen in the attachement)



Reproducible: Always

Steps to Reproduce:
1. set the parameter default value with: SetCommand.create(editingDomain, parameter, UMLPackage.eINSTANCE.getParameter_Default(), defaultValue) (execute this command)
2. undo
Comment 1 Ioana CLA 2010-05-18 04:31:03 EDT
Created attachment 168876 [details]
stack trace for the Null pointer exception
Comment 2 Kenn Hussey CLA 2012-06-20 14:51:59 EDT
This is a typo; it should be:

			parameter.eUnset(UMLPackage.Literals.PARAMETER__DEFAULT_VALUE);
Comment 3 Kenn Hussey CLA 2012-08-15 16:03:24 EDT
A fix has been committed/pushed to the 'master' and 'R4_0_maintenance' branches.
Comment 4 Kenn Hussey CLA 2012-08-17 15:37:00 EDT
Integration (for 4.1.0) and maintenance (for 4.0.1) builds containing the fix are now available.