[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3248) org.hibernate.cache.EhCache.toMap() throws NullPointerException
Erik Martino Hansen (JIRA)
noreply at atlassian.com
Tue Sep 27 04:24:35 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43719#comment-43719 ]
Erik Martino Hansen commented on HHH-3248:
------------------------------------------
Confirmed in 3.6.7.Final as well, has this bug been investigated
> org.hibernate.cache.EhCache.toMap() throws NullPointerException
> ---------------------------------------------------------------
>
> Key: HHH-3248
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3248
> Project: Hibernate Core
> Issue Type: Bug
> Components: caching (L2)
> Affects Versions: 3.2.6
> Reporter: Kenny MacLeod
> Attachments: CacheDumpServlet.java
>
>
> The toMap() method of org.hibernate.cache.EhCache is not null-safe. The expression
> cache.get( key ).getObjectValue()
> Will throw a NPE, since get(key) may return a null in cases where the key exists in the cache, but the value does not, e.g. if it has expired.
> This should either check for the null, or the list of keys should be obtained using getKeysWithExpiredCheck(), rather than just getKeys().
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list