I think this is a bug.
Hibernate version: CVS Head
Full stack trace of any exception that occurs:
java.lang.NullPointerException
at java.util.ArrayList.addAll(ArrayList.java:474)
at org.hibernate.engine.ActionQueue.resumeSuspendedDeletions(ActionQueue.java:337)
at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:223)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:108)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:527)
... stuff in my code...
I'm not sure if suspendedDeletions is always non-null. I don't entirely understand the event setup? However the error is mostly likely caused by calling ArrayList.addAll(null);
Hence perhaps the extra check is necessary. If this isn't the place to post then oops. sorry...
diff -c -r1.3 ActionQueue.java
*** src/org/hibernate/engine/ActionQueue.java 21 Feb 2005 08:15:32 -0000 1.3
--- src/org/hibernate/engine/ActionQueue.java 1 Mar 2005 07:28:23 -0000
***************
*** 334,339 ****
--- 334,340 ----
}
public void resumeSuspendedDeletions() {
+ if (suspendedDeletions == null) return;
deletions.addAll( suspendedDeletions );
suspendedDeletions = null;
}
|