HHH-8408 PooledLoOptimizer.noTenantState is accessed with inconsistent synchronization

This commit is contained in:
Sanne Grinovero 2013-08-01 22:40:45 +01:00
parent 4f1c8a4ba6
commit 1ea823e0b5
1 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ public class HiLoOptimizer extends AbstractOptimizer {
}
@Override
public IntegralDataTypeHolder getLastSourceValue() {
public synchronized IntegralDataTypeHolder getLastSourceValue() {
return noTenantGenerationState().lastSourceValue;
}
@ -168,7 +168,7 @@ public class HiLoOptimizer extends AbstractOptimizer {
*
* @return Value for property 'lastValue'.
*/
public IntegralDataTypeHolder getLastValue() {
public synchronized IntegralDataTypeHolder getLastValue() {
return noTenantGenerationState().value.copy().decrement();
}
@ -179,7 +179,7 @@ public class HiLoOptimizer extends AbstractOptimizer {
*
* @return Value for property 'upperLimit'.
*/
public IntegralDataTypeHolder getHiValue() {
public synchronized IntegralDataTypeHolder getHiValue() {
return noTenantGenerationState().upperLimit;
}
}