HHH-14936 Avoid NPE in JdbcConnectionContext's static init
This commit is contained in:
parent
c3631970a5
commit
35f374aac7
|
@ -38,8 +38,12 @@ public final class JdbcConnectionContext {
|
||||||
password = connectionProperties.getProperty(
|
password = connectionProperties.getProperty(
|
||||||
AvailableSettings.PASS );
|
AvailableSettings.PASS );
|
||||||
Properties p = new Properties();
|
Properties p = new Properties();
|
||||||
p.put( "user", user );
|
if ( user != null ) {
|
||||||
p.put( "password", password );
|
p.put( "user", user );
|
||||||
|
}
|
||||||
|
if ( password != null ) {
|
||||||
|
p.put( "password", password );
|
||||||
|
}
|
||||||
properties = p;
|
properties = p;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue