[Teneo] NPE in PersistentStoreAdapter [message #621100] |
Wed, 08 July 2009 07:59 |
Eclipse User |
|
|
|
Hi
I'm using Teneo with Hibernate and just upgraded from Teneo 1.0.0 to Teneo
1.1.0. When testing my code I ran into a Problem when removing entries
from a map.
Stepping down with the debugger, I suspect Line 137 of
org.eclipse.emf.teneo.type.PersistentStoreAdapter to be wrong. Here is a
short excerpt:
case Notification.REMOVE:
if (list != null) {
if (notification.getPosition() != Notification.NO_INDEX) {
list.remove(notification.getPosition());
} else {
list.remove(replaceValue(notification.getOldValue(), eFeature));
}
}
if (map != null) {
final Map.Entry<?, ?> entry = (Map.Entry<?, ?>)
notification.getNewValue();
map.remove(entry.getKey());
}
break;
I suggest, that the line getting the Map.Entry should call
notification.getOldValue() instead of notification.getNewValue(). The new
value is null and thus causes a NullPointerException at map.remove().
Could somebody please verify this? Am I missing something?
Thanks,
Roland
|
|
|
Powered by
FUDForum. Page generated in 0.03062 seconds