Polishing

This commit is contained in:
Juergen Hoeller
2018-06-29 20:07:53 +02:00
parent 5a111125c1
commit ea534b6820
13 changed files with 42 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -123,7 +123,7 @@ public abstract class AbstractMessageWriterResultHandler extends HandlerResultHa
ResolvableType elementType;
if (adapter != null) {
publisher = adapter.toPublisher(body);
ResolvableType genericType = bodyType.getGeneric(0);
ResolvableType genericType = bodyType.getGeneric();
elementType = getElementType(adapter, genericType);
}
else {

View File

@@ -56,9 +56,9 @@ public abstract class AbstractView implements View, ApplicationContextAware {
private static final Object NO_VALUE = new Object();
private final List<MediaType> mediaTypes = new ArrayList<>(4);
private final ReactiveAdapterRegistry reactiveAdapterRegistry;
private final ReactiveAdapterRegistry adapterRegistry;
private final List<MediaType> mediaTypes = new ArrayList<>(4);
private Charset defaultCharset = StandardCharsets.UTF_8;
@@ -73,9 +73,9 @@ public abstract class AbstractView implements View, ApplicationContextAware {
this(ReactiveAdapterRegistry.getSharedInstance());
}
public AbstractView(ReactiveAdapterRegistry registry) {
public AbstractView(ReactiveAdapterRegistry reactiveAdapterRegistry) {
this.reactiveAdapterRegistry = reactiveAdapterRegistry;
this.mediaTypes.add(ViewResolverSupport.DEFAULT_CONTENT_TYPE);
this.adapterRegistry = registry;
}
@@ -155,7 +155,7 @@ public abstract class AbstractView implements View, ApplicationContextAware {
/**
* Prepare the model to render.
* @param model Map with name Strings as keys and corresponding model
* @param model a Map with name Strings as keys and corresponding model
* objects as values (Map can also be {@code null} in case of empty model)
* @param contentType the content type selected to render with which should
* match one of the {@link #getSupportedMediaTypes() supported media types}.
@@ -209,7 +209,6 @@ public abstract class AbstractView implements View, ApplicationContextAware {
* @return {@code Mono} for the completion of async attributes resolution
*/
protected Mono<Void> resolveAsyncAttributes(Map<String, Object> model) {
List<String> names = new ArrayList<>();
List<Mono<?>> valueMonos = new ArrayList<>();
@@ -218,7 +217,7 @@ public abstract class AbstractView implements View, ApplicationContextAware {
if (value == null) {
continue;
}
ReactiveAdapter adapter = this.adapterRegistry.getAdapter(null, value);
ReactiveAdapter adapter = this.reactiveAdapterRegistry.getAdapter(null, value);
if (adapter != null) {
names.add(entry.getKey());
if (adapter.isMultiValue()) {

View File

@@ -35,7 +35,6 @@ import org.springframework.util.ObjectUtils;
public abstract class AbstractAnnotationConfigDispatcherHandlerInitializer
extends AbstractDispatcherHandlerInitializer {
/**
* {@inheritDoc}
* <p>This implementation creates an {@link AnnotationConfigApplicationContext},