diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdvice.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdvice.java index b9c8c83d0e4..46ec4e4e157 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdvice.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdvice.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. @@ -27,7 +27,7 @@ import org.springframework.http.server.ServerHttpResponse; * or a {@code ResponseEntity} controller method but before the body is written * with an {@code HttpMessageConverter}. * - *

Implementations may be may be registered directly with + *

Implementations may be registered directly with * {@code RequestMappingHandlerAdapter} and {@code ExceptionHandlerExceptionResolver} * or more likely annotated with {@code @ControllerAdvice} in which case they * will be auto-detected by both. @@ -42,7 +42,8 @@ public interface ResponseBodyAdvice { * and the selected {@code HttpMessageConverter} type. * @param returnType the return type * @param converterType the selected converter type - * @return {@code true} if {@link #beforeBodyWrite} should be invoked, {@code false} otherwise + * @return {@code true} if {@link #beforeBodyWrite} should be invoked; + * {@code false} otherwise */ boolean supports(MethodParameter returnType, Class> converterType); @@ -55,7 +56,7 @@ public interface ResponseBodyAdvice { * @param selectedConverterType the converter type selected to write to the response * @param request the current request * @param response the current response - * @return the body that was passed in or a modified, possibly new instance + * @return the body that was passed in or a modified (possibly new) instance */ T beforeBodyWrite(T body, MethodParameter returnType, MediaType selectedContentType, Class> selectedConverterType,