|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2022 the original author or authors. |
|
|
|
* Copyright 2002-2023 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -299,8 +299,8 @@ abstract class NamedParameterUtils { |
|
|
|
NamedParameters.NamedParameter marker = markerHolder.getOrCreate(paramName); |
|
|
|
NamedParameters.NamedParameter marker = markerHolder.getOrCreate(paramName); |
|
|
|
if (paramSource.hasValue(paramName)) { |
|
|
|
if (paramSource.hasValue(paramName)) { |
|
|
|
Parameter parameter = paramSource.getValue(paramName); |
|
|
|
Parameter parameter = paramSource.getValue(paramName); |
|
|
|
if (parameter.getValue() instanceof Collection<?> c) { |
|
|
|
if (parameter.getValue() instanceof Collection<?> collection) { |
|
|
|
Iterator<?> entryIter = c.iterator(); |
|
|
|
Iterator<?> entryIter = collection.iterator(); |
|
|
|
int k = 0; |
|
|
|
int k = 0; |
|
|
|
int counter = 0; |
|
|
|
int counter = 0; |
|
|
|
while (entryIter.hasNext()) { |
|
|
|
while (entryIter.hasNext()) { |
|
|
|
@ -513,15 +513,14 @@ abstract class NamedParameterUtils { |
|
|
|
this.parameterSource = parameterSource; |
|
|
|
this.parameterSource = parameterSource; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings({ "unchecked", "rawtypes" }) |
|
|
|
public void bind(BindTarget target, String identifier, Parameter parameter) { |
|
|
|
public void bind(BindTarget target, String identifier, Parameter parameter) { |
|
|
|
List<BindMarker> bindMarkers = getBindMarkers(identifier); |
|
|
|
List<BindMarker> bindMarkers = getBindMarkers(identifier); |
|
|
|
if (bindMarkers == null) { |
|
|
|
if (bindMarkers == null) { |
|
|
|
target.bind(identifier, parameter); |
|
|
|
target.bind(identifier, parameter); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (parameter.getValue() instanceof Collection) { |
|
|
|
if (parameter.getValue() instanceof Collection collection) { |
|
|
|
Collection<Object> collection = (Collection<Object>) parameter.getValue(); |
|
|
|
|
|
|
|
Iterator<Object> iterator = collection.iterator(); |
|
|
|
Iterator<Object> iterator = collection.iterator(); |
|
|
|
Iterator<BindMarker> markers = bindMarkers.iterator(); |
|
|
|
Iterator<BindMarker> markers = bindMarkers.iterator(); |
|
|
|
while (iterator.hasNext()) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
|