Fixing the SessionImpl#buildLockOptions method

This commit is contained in:
Sanne Grinovero 2019-08-30 19:11:50 +01:00 committed by Andrea Boriero
parent fffc9e7786
commit a4fa6430f3
1 changed files with 4 additions and 5 deletions

View File

@ -2999,13 +2999,12 @@ public final class SessionImpl
}
private LockOptions buildLockOptions(LockModeType lockModeType, Map<String, Object> properties) {
final LockOptions lockOptions = new LockOptions();
LockOptions.copy( this.lockOptions, this.lockOptions );
this.lockOptions.setLockMode( LockModeTypeHelper.getLockMode( lockModeType ) );
final LockOptions output = this.lockOptions.makeCopy();
output.setLockMode( LockModeTypeHelper.getLockMode( lockModeType ) );
if ( properties != null ) {
setLockOptions( properties, this.lockOptions );
LockOptionsHelper.applyPropertiesToLockOptions( properties, () -> output );
}
return lockOptions;
return output;
}
@Override