Fix issue with ParameterMetadataImpl when positionalQueryParameters is null

This commit is contained in:
Andrea Boriero 2020-07-20 09:16:09 +01:00
parent b6ed4b6629
commit 9322273f39
1 changed files with 15 additions and 8 deletions

View File

@ -96,15 +96,22 @@ public class ParameterMetadataImpl implements ParameterMetadataImplementor {
}
else {
this.queryParameters = new IdentitySet<>();
this.queryParameters.addAll( positionalQueryParameters.values() );
this.queryParameters.addAll( namedQueryParameters.values() );
this.names = namedQueryParameters.keySet();
this.labels = positionalQueryParameters.keySet();
verifyOrdinalParamLabels( labels );
if ( positionalQueryParameters != null ) {
this.queryParameters.addAll( positionalQueryParameters.values() );
this.labels = positionalQueryParameters.keySet();
verifyOrdinalParamLabels( labels );
}
else {
labels = null;
}
if ( namedQueryParameters != null ) {
this.queryParameters.addAll( namedQueryParameters.values() );
this.names = namedQueryParameters.keySet();
}
else {
this.names = null;
}
}
}
private static void verifyOrdinalParamLabels(Set<Integer> labels) {