Bug 396383 - Notification.getNewValue() is unspecified for REMOVE_MANY
Summary: Notification.getNewValue() is unspecified for REMOVE_MANY
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2012-12-12 04:46 EST by Ruben Faelens CLA
Modified: 2013-07-10 11:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Faelens CLA 2012-12-12 04:46:51 EST
The javadoc for org.eclipse.emf.common.notify.Notification states that getNewValue() contains the elements newly added to the list. It does not specify what it will contain for a Notification of REMOVE, REMOVE_MANY or MOVE.

In the case of REMOVE_MANY:
org.eclipse.emf.databinding.internal.EMFPropertyListener expects this to be an int[] array.

org.eclipse.ocl.examples.impactanalyzer.impl.DerivedPropertyNotifierImpl$DerivedPropertyAdapter fills both newValue and oldValue with the contents of the list before and after the change.

----
Expected change:

Adapt the javadoc to reflect the intended usage.
Comment 2 Ed Merks CLA 2013-07-10 11:26:56 EDT
The changes are available in Kepler.