HHH-6576 NPE in Ehcache HibernateEhcacheUtils

This commit is contained in:
Brett Meyer 2013-10-02 10:01:29 -04:00
parent 3677045663
commit 7faae967ca
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ public final class HibernateEhcacheUtils {
*/
public static Configuration loadAndCorrectConfiguration(URL url) {
final Configuration config = ConfigurationFactory.parseConfiguration( url );
// EHC-875 / HHH-6576
if ( config == null ) {
return null;
}
if ( config.getDefaultCacheConfiguration().isTerracottaClustered() ) {
if ( ValueMode.IDENTITY
.equals( config.getDefaultCacheConfiguration().getTerracottaConfiguration().getValueMode() ) ) {