HHH-8408 LegacyHiLoAlgorithmOptimizer.noTenantState is accessed with inconsistent synchronization

This commit is contained in:
Sanne Grinovero 2013-08-01 22:50:42 +01:00
parent 1ea823e0b5
commit 1bed587355
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ public class LegacyHiLoAlgorithmOptimizer extends AbstractOptimizer {
} }
@Override @Override
public IntegralDataTypeHolder getLastSourceValue() { public synchronized IntegralDataTypeHolder getLastSourceValue() {
return noTenantGenerationState().lastSourceValue.copy(); return noTenantGenerationState().lastSourceValue.copy();
} }
@ -142,7 +142,7 @@ public class LegacyHiLoAlgorithmOptimizer extends AbstractOptimizer {
* @return Value for property 'lastValue'. * @return Value for property 'lastValue'.
*/ */
@SuppressWarnings( {"UnusedDeclaration"}) @SuppressWarnings( {"UnusedDeclaration"})
public IntegralDataTypeHolder getLastValue() { public synchronized IntegralDataTypeHolder getLastValue() {
return noTenantGenerationState().value; return noTenantGenerationState().value;
} }
} }