Community
Participate
Working Groups
Build Identifier: HEAD There is a bug in CompositeMap that results in the incorrect oldValue being returned in the diff. You can see the error if you look at the implementation for the firstMapListener. handleMapChange, the last case where both 'added' and 'removed' are false, you see the following line: oldValues.put(changedKey, oldValue); This is incorrect. 'oldValue' is the oldValue from the first map being a key for the second map. oldValues should contain the values from the second map. So not only is the value returned as the old value in the diff incorrect, it is not even the right type. Reproducible: Always Steps to Reproduce: If you need a snippet to show the problem I could probably do so but I'm hoping that won't be necessary.
Exactly. That line should simply be replaced by: oldValues.put(changedKey, secondMap.get(oldValue)); I have done this (plus added generics) to the org.eclipse.core.databinding.observable plugin on github here: https://github.com/jppellet
This has been fixed in the e4 databinding bundles. (the 'E4 Databinding' bundles are avaiable in the e4 repositories, go to http://download.eclipse.org/e4/downloads/ to get a p2 repository link).