Fixed NullPointerException when building session.

This commit is contained in:
Chris Cranford 2016-04-29 17:44:00 -05:00 committed by Steve Ebersole
parent a54da750ad
commit fd7ada315e
1 changed files with 7 additions and 5 deletions

View File

@ -553,11 +553,13 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
}
final Session session = builder.openSession();
map.keySet().forEach ( key -> {
if ( key instanceof String ) {
session.setProperty( (String) key, map.get( key ) );
}
});
if ( map != null ) {
map.keySet().forEach( key -> {
if ( key instanceof String ) {
session.setProperty( (String) key, map.get( key ) );
}
} );
}
return session;
}