[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2112) ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
Dobes Vandermeer (JIRA)
noreply at atlassian.com
Mon Apr 6 13:06:38 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32803#action_32803 ]
Dobes Vandermeer commented on HHH-2112:
---------------------------------------
I'm also seeing this issue with Map.remove(), this might be the issue (see the comments I added) but I can't prove anything yet.
/**
* @see java.util.Map#remove(Object)
*/
public Object remove(Object key) {
if ( isPutQueueEnabled() ) {
Object old = readElementByIndex( key ); // returns MarkerObject UNKNOWN if the object isn't in the map
// add if(old == UNKNOWN) return null;
queueOperation( new Remove( key, old ) );
return old;
}
else {
// TODO : safe to interpret "map.remove(key) == null" as non-dirty?
initialize( true );
if ( map.containsKey( key ) ) {
dirty();
}
return map.remove( key );
}
}
> ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
> -------------------------------------------------------------------------------
>
> Key: HHH-2112
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2112
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.0.cr4
> Reporter: Aleksei Valikov
> Assignee: Steve Ebersole
> Fix For: 3.2.2
>
>
> StatefulPersistenceContext.getCachedDatabaseSnapshot(EntityKey key) causes ClassCastException when NO_ROW was put for the certain entity key.
> Please see the discussion here:
> http://forum.hibernate.org/viewtopic.php?t=959868&highlight=getcacheddatabasesnapshot
> In these situations, this method should probably return null. It is very likely since other calling methods check for the returned value to be null .
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list