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 { else {
this.queryParameters = new IdentitySet<>(); this.queryParameters = new IdentitySet<>();
this.queryParameters.addAll( positionalQueryParameters.values() ); if ( positionalQueryParameters != null ) {
this.queryParameters.addAll( namedQueryParameters.values() ); this.queryParameters.addAll( positionalQueryParameters.values() );
this.labels = positionalQueryParameters.keySet();
this.names = namedQueryParameters.keySet(); verifyOrdinalParamLabels( labels );
this.labels = positionalQueryParameters.keySet(); }
else {
verifyOrdinalParamLabels( labels ); 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) { private static void verifyOrdinalParamLabels(Set<Integer> labels) {