HHH-13475 SessionImpl#applyQuerySettingsAndHints should not rely on defensive copies to just read properties
This commit is contained in:
parent
e044397df2
commit
078c0df460
|
@ -323,12 +323,12 @@ public final class SessionImpl
|
|||
if ( lockOptions.getLockMode() != LockMode.NONE ) {
|
||||
query.setLockMode( getLockMode( lockOptions.getLockMode() ) );
|
||||
}
|
||||
Object queryTimeout;
|
||||
if ( (queryTimeout = getProperties().get( QueryHints.SPEC_HINT_TIMEOUT ) ) != null ) {
|
||||
final Object queryTimeout;
|
||||
if ( ( queryTimeout = properties.get( QueryHints.SPEC_HINT_TIMEOUT ) ) != null ) {
|
||||
query.setHint( QueryHints.SPEC_HINT_TIMEOUT, queryTimeout );
|
||||
}
|
||||
Object lockTimeout;
|
||||
if( (lockTimeout = getProperties().get( JPA_LOCK_TIMEOUT ))!=null){
|
||||
final Object lockTimeout;
|
||||
if ( ( lockTimeout = properties.get( JPA_LOCK_TIMEOUT ) ) != null ) {
|
||||
query.setHint( JPA_LOCK_TIMEOUT, lockTimeout );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue