diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java index 4b92380af8..846d487e0d 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java @@ -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 targetType; - public NumberToNumber(Class targetType) { + NumberToNumber(Class targetType) { this.targetType = targetType; } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java index 6a0c3ba395..f99673e118 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java @@ -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 enumType; - public StringToEnum(Class enumType) { + StringToEnum(Class enumType) { this.enumType = enumType; } diff --git a/spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java b/spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java index 1ce015f181..6f9b8f38d4 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java @@ -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. - *

By default only {@code "message/x.rsocket.routing.v0""} is extracted and + *

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. * diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ChangePathPatternParserVisitor.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ChangePathPatternParserVisitor.java index 32668397f4..a6cba32fc5 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ChangePathPatternParserVisitor.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ChangePathPatternParserVisitor.java @@ -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 diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketHandler.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketHandler.java index 908d44019a..85e7b232af 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketHandler.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketHandler.java @@ -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. * - *

See the class-level doc and the reference for more details and + *

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 handle(WebSocketSession session); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 6f4a618fb0..579ef85666 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -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 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); - } }; } }