From 90bb7c8ddb9d7061544cdb02739b402f5de1ece6 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Fri, 22 Nov 2013 14:21:48 -0500 Subject: [PATCH] HHH-8738 NPE in HibernateUtil if no default ehcache configuration Conflicts: hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateEhcacheUtils.java --- .../hibernate/cache/ehcache/internal/util/HibernateUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateUtil.java b/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateUtil.java index ca7ff8882d..c781e2ce83 100644 --- a/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateUtil.java +++ b/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/util/HibernateUtil.java @@ -67,7 +67,8 @@ public final class HibernateUtil { return null; } - if ( config.getDefaultCacheConfiguration().isTerracottaClustered() ) { + if ( config.getDefaultCacheConfiguration() != null + && config.getDefaultCacheConfiguration().isTerracottaClustered() ) { if ( ValueMode.IDENTITY .equals( config.getDefaultCacheConfiguration().getTerracottaConfiguration().getValueMode() ) ) { LOG.incompatibleCacheValueMode();