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 ) {
|
if ( lockOptions.getLockMode() != LockMode.NONE ) {
|
||||||
query.setLockMode( getLockMode( lockOptions.getLockMode() ) );
|
query.setLockMode( getLockMode( lockOptions.getLockMode() ) );
|
||||||
}
|
}
|
||||||
Object queryTimeout;
|
final Object queryTimeout;
|
||||||
if ( (queryTimeout = getProperties().get( QueryHints.SPEC_HINT_TIMEOUT ) ) != null ) {
|
if ( ( queryTimeout = properties.get( QueryHints.SPEC_HINT_TIMEOUT ) ) != null ) {
|
||||||
query.setHint( QueryHints.SPEC_HINT_TIMEOUT, queryTimeout );
|
query.setHint( QueryHints.SPEC_HINT_TIMEOUT, queryTimeout );
|
||||||
}
|
}
|
||||||
Object lockTimeout;
|
final Object lockTimeout;
|
||||||
if( (lockTimeout = getProperties().get( JPA_LOCK_TIMEOUT ))!=null){
|
if ( ( lockTimeout = properties.get( JPA_LOCK_TIMEOUT ) ) != null ) {
|
||||||
query.setHint( JPA_LOCK_TIMEOUT, lockTimeout );
|
query.setHint( JPA_LOCK_TIMEOUT, lockTimeout );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue