Polishing

This commit is contained in:
Sam Brannen 2020-08-11 16:42:18 +02:00
parent 6a2939a4d4
commit 596936f18c
6 changed files with 14 additions and 24 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2020 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.
@ -57,7 +57,7 @@ final class NumberToNumberConverterFactory implements ConverterFactory<Number, N
private final Class<T> targetType;
public NumberToNumber(Class<T> targetType) {
NumberToNumber(Class<T> targetType) {
this.targetType = targetType;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2020 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.
@ -39,7 +39,7 @@ final class StringToEnumConverterFactory implements ConverterFactory<String, Enu
private final Class<T> enumType;
public StringToEnum(Class<T> enumType) {
StringToEnum(Class<T> enumType) {
this.enumType = enumType;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.rsocket;
import java.util.ArrayList;
@ -42,7 +43,7 @@ import org.springframework.util.MimeType;
/**
* Default {@link MetadataExtractor} implementation that relies on
* {@link Decoder}s to deserialize the content of metadata entries.
* <p>By default only {@code "message/x.rsocket.routing.v0""} is extracted and
* <p>By default only {@code "message/x.rsocket.routing.v0"} is extracted and
* saved under {@link MetadataExtractor#ROUTE_KEY}. Use {@code metadataToExtract}
* methods to specify other metadata mime types of interest to extract.
*

View File

@ -27,7 +27,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
/**
* Implementation of {@link RouterFunctions.Visitor} that changes the
* {@link PathPatternParser} on path-related request predicates
* (i.e. {@code RequestPredicates.PathPatternPredicate}.
* (i.e. {@link RequestPredicates.PathPatternPredicate}).
*
* @author Arjen Poutsma
* @since 5.3

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@ -108,14 +108,14 @@ public interface WebSocketHandler {
* Invoked when a new WebSocket connection is established, and allows
* handling of the session.
*
* <p>See the class-level doc and the reference for more details and
* <p>See the class-level doc and the reference manual for more details and
* examples of how to handle the session.
*
* @param session the session to handle
* @return indicates when appilcation handling of the session is complete,
* @return indicates when application handling of the session is complete,
* which should reflect the completion of the inbound message stream
* (i.e. connection closing) and possibly the completion of the outbound
* message stream and the writing of messages.
* message stream and the writing of messages
*/
Mono<Void> handle(WebSocketSession session);

View File

@ -2822,10 +2822,6 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
@Override
public View resolveViewName(final String viewName, Locale locale) throws Exception {
return new View() {
@Override
public String getContentType() {
return null;
}
@Override
@SuppressWarnings({"unchecked", "deprecation", "rawtypes"})
public void render(@Nullable Map model, HttpServletRequest request, HttpServletResponse response)
@ -2867,17 +2863,10 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
public static class ModelExposingViewResolver implements ViewResolver {
@Override
public View resolveViewName(final String viewName, Locale locale) throws Exception {
return new View() {
@Override
public String getContentType() {
return null;
}
@Override
public void render(@Nullable Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) {
public View resolveViewName(String viewName, Locale locale) {
return (model, request, response) -> {
request.setAttribute("viewName", viewName);
request.getSession().setAttribute("model", model);
}
};
}
}