HHH-13496 Dubious putIfAbsent usages
This commit is contained in:
parent
fb0da1640b
commit
a76c04783e
|
@ -125,12 +125,7 @@ public class QueryPlanCache implements Serializable {
|
||||||
*/
|
*/
|
||||||
public ParameterMetadata getSQLParameterMetadata(final String query, boolean isOrdinalParameterZeroBased) {
|
public ParameterMetadata getSQLParameterMetadata(final String query, boolean isOrdinalParameterZeroBased) {
|
||||||
final ParameterMetadataKey key = new ParameterMetadataKey( query, isOrdinalParameterZeroBased );
|
final ParameterMetadataKey key = new ParameterMetadataKey( query, isOrdinalParameterZeroBased );
|
||||||
ParameterMetadataImpl value = parameterMetadataCache.get( key );
|
return parameterMetadataCache.computeIfAbsent( key, k -> nativeQueryInterpreter.getParameterMetadata( query ) );
|
||||||
if ( value == null ) {
|
|
||||||
value = nativeQueryInterpreter.getParameterMetadata( query );
|
|
||||||
parameterMetadataCache.putIfAbsent( key, value );
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue