#1201 - Switched to EntityModel factory methods where possible.
This commit is contained in:
@@ -886,7 +886,7 @@ public class Jackson2CollectionJsonModule extends SimpleModule {
|
||||
static class CollectionJsonResourcesDeserializer extends CollectionJsonDeserializerBase<CollectionModel<?>> {
|
||||
|
||||
private static final long serialVersionUID = 6406522912020578141L;
|
||||
private static final BiFunction<List<Object>, Links, CollectionModel<?>> FINISHER = CollectionModel::new;
|
||||
private static final BiFunction<List<Object>, Links, CollectionModel<?>> FINISHER = CollectionModel::of;
|
||||
private static final Function<JavaType, CollectionJsonDeserializerBase<CollectionModel<?>>> CONTEXTUAL_CREATOR = CollectionJsonResourcesDeserializer::new;
|
||||
|
||||
CollectionJsonResourcesDeserializer() {
|
||||
|
||||
@@ -48,6 +48,6 @@ public interface RepresentationModelAssembler<T, D extends RepresentationModel<?
|
||||
|
||||
return StreamSupport.stream(entities.spliterator(), false) //
|
||||
.map(this::toModel) //
|
||||
.collect(Collectors.collectingAndThen(Collectors.toList(), CollectionModel::new));
|
||||
.collect(Collectors.collectingAndThen(Collectors.toList(), CollectionModel::of));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,6 @@ public interface ReactiveRepresentationModelAssembler<T, D extends Representatio
|
||||
|
||||
return entities.flatMap(entity -> toModel(entity, exchange)) //
|
||||
.collectList() //
|
||||
.map(CollectionModel::new);
|
||||
.map(CollectionModel::of);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public interface SimpleReactiveRepresentationModelAssembler<T>
|
||||
return entities //
|
||||
.flatMap(entity -> toModel(entity, exchange)) //
|
||||
.collectList() //
|
||||
.map(CollectionModel::new) //
|
||||
.map(CollectionModel::of) //
|
||||
.map(it -> addLinks(it, exchange));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user