mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Start building against Spring Framework 5.0.4 snapshots again
This reverts commit 682612efa3
.
This commit is contained in:
parent
45b63cb1b0
commit
214c7ebdd5
@ -141,7 +141,7 @@
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<snakeyaml.version>1.19</snakeyaml.version>
|
||||
<solr.version>6.6.2</solr.version>
|
||||
<spring.version>5.0.3.RELEASE</spring.version>
|
||||
<spring.version>5.0.4.BUILD-SNAPSHOT</spring.version>
|
||||
<spring-amqp.version>2.0.2.RELEASE</spring-amqp.version>
|
||||
<spring-batch.version>4.0.0.RELEASE</spring-batch.version>
|
||||
<spring-cloud-connectors.version>2.0.1.RELEASE</spring-cloud-connectors.version>
|
||||
|
@ -40,7 +40,7 @@ class CollectionBinder extends IndexedElementsBinder<Collection<Object>> {
|
||||
AggregateElementBinder elementBinder) {
|
||||
Class<?> collectionType = (target.getValue() == null
|
||||
? target.getType().resolve(Object.class) : List.class);
|
||||
ResolvableType aggregateType = forClassWithGenerics(List.class,
|
||||
ResolvableType aggregateType = ResolvableType.forClassWithGenerics(List.class,
|
||||
target.getType().asCollection().getGenerics());
|
||||
ResolvableType elementType = target.getType().asCollection().getGeneric();
|
||||
IndexedCollectionSupplier result = new IndexedCollectionSupplier(
|
||||
|
@ -83,8 +83,8 @@ abstract class IndexedElementsBinder<T> extends AggregateBinder<T> {
|
||||
if (property != null) {
|
||||
Object aggregate = convert(property.getValue(), aggregateType,
|
||||
target.getAnnotations());
|
||||
ResolvableType collectionType = forClassWithGenerics(
|
||||
collection.get().getClass(), elementType);
|
||||
ResolvableType collectionType = ResolvableType
|
||||
.forClassWithGenerics(collection.get().getClass(), elementType);
|
||||
Collection<Object> elements = convert(aggregate, collectionType);
|
||||
collection.get().addAll(elements);
|
||||
}
|
||||
@ -145,17 +145,6 @@ abstract class IndexedElementsBinder<T> extends AggregateBinder<T> {
|
||||
.convert(conversionService, value);
|
||||
}
|
||||
|
||||
// Work around for SPR-16456
|
||||
protected static ResolvableType forClassWithGenerics(Class<?> type,
|
||||
ResolvableType... generics) {
|
||||
ResolvableType[] resolvedGenerics = new ResolvableType[generics.length];
|
||||
for (int i = 0; i < generics.length; i++) {
|
||||
resolvedGenerics[i] = forClassWithGenerics(generics[i].resolve(Object.class),
|
||||
generics[i].getGenerics());
|
||||
}
|
||||
return ResolvableType.forClassWithGenerics(type, resolvedGenerics);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link AggregateBinder.AggregateSupplier AggregateSupplier} for an indexed
|
||||
* collection.
|
||||
|
Loading…
Reference in New Issue
Block a user