[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-805) Session.getStatistics().getEntityCount() throws UnsupportedOperationException

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:00:34 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-805.
------------------------------


Closing stale resolved issues

> Session.getStatistics().getEntityCount() throws UnsupportedOperationException
> -----------------------------------------------------------------------------
>
>                 Key: HHH-805
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-805
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1 rc3
>            Reporter: Derek Hulley
>            Assignee: Emmanuel Bernard
>            Priority: Minor
>             Fix For: 3.1 beta 2
>
>
> The following code:
>                 SessionStatistics stats = session.getStatistics();
>                 // have we exceeded the maximum entity count
>                 int entityCount = stats.getEntityCount();
> throws an UnsupportedOperationException originating in:
>   org.hibernate.util.IdentityMap#keySet()
> The following lines in SessionStatisticsImpl.java fix the issue:
> ========================
> 	public int getEntityCount() {
> 		return session.getPersistenceContext().getEntityEntries().size();
> 	}
> 	
> 	public int getCollectionCount() {
> 		return session.getPersistenceContext().getCollectionEntries().size();
> 	}
> =========================

-- 
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