mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 17:15:02 +00:00
HHH-13505 : NullPointerException thrown by StatisticsImpl#getCacheRegionStatistics
This commit is contained in:
parent
09cc94c4d9
commit
c581dba4d7
@ -644,6 +644,11 @@ public CacheRegionStatisticsImpl getCacheRegionStatistics(String regionName) {
|
|||||||
Region region = sessionFactory.getCache().getRegion( regionName );
|
Region region = sessionFactory.getCache().getRegion( regionName );
|
||||||
|
|
||||||
if ( region == null ) {
|
if ( region == null ) {
|
||||||
|
|
||||||
|
if ( ! sessionFactory.getSessionFactoryOptions().isQueryCacheEnabled() ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// this is the pre-5.3 behavior. and since this is a pre-5.3 method it should behave consistently
|
// this is the pre-5.3 behavior. and since this is a pre-5.3 method it should behave consistently
|
||||||
// NOTE that this method is deprecated
|
// NOTE that this method is deprecated
|
||||||
region = sessionFactory.getCache().getQueryResultsCache( regionName ).getRegion();
|
region = sessionFactory.getCache().getQueryResultsCache( regionName ).getRegion();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user