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(); final Session session = builder.openSession();
map.keySet().forEach ( key -> { if ( map != null ) {
if ( key instanceof String ) { map.keySet().forEach( key -> {
session.setProperty( (String) key, map.get( key ) ); if ( key instanceof String ) {
} session.setProperty( (String) key, map.get( key ) );
}); }
} );
}
return session; return session;
} }