-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Suspended Deletions
PostPosted: Tue Mar 01, 2005 3:52 am 
Newbie

Joined: Thu Feb 24, 2005 2:49 am
Posts: 3
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;
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 12:50 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Please use JIRA instead

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.