Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] NPE in PersistentStoreAdapter
[Teneo] NPE in PersistentStoreAdapter [message #621100] Wed, 08 July 2009 07:59
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
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
Previous Topic:Teneo + EclipseLink simple complete example
Next Topic:[Teneo] NPE in PersistentStoreAdapter
Goto Forum:
  


Current Time: Sat Jul 27 15:22:42 GMT 2024

Powered by FUDForum. Page generated in 0.02859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top