From f2328e8e3cf91e4c8f8f2a59f930e5c5b8ad30e9 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 29 Jun 2016 10:57:16 +0200 Subject: [PATCH] Polishing --- .../core/convert/ConversionService.java | 8 ++++---- .../web/servlet/HandlerInterceptor.java | 20 +++++-------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/convert/ConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/ConversionService.java index 75f9a276c7..382e5ad353 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/ConversionService.java +++ b/spring-core/src/main/java/org/springframework/core/convert/ConversionService.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 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. @@ -64,11 +64,11 @@ public interface ConversionService { /** * Convert the given {@code source} to the specified {@code targetType}. - * @param source the source object to convert (may be null) + * @param source the source object to convert (may be {@code null}) * @param targetType the target type to convert to (required) * @return the converted object, an instance of targetType * @throws ConversionException if a conversion exception occurred - * @throws IllegalArgumentException if targetType is null + * @throws IllegalArgumentException if targetType is {@code null} */ T convert(Object source, Class targetType); @@ -76,7 +76,7 @@ public interface ConversionService { * Convert the given {@code source} to the specified {@code targetType}. * The TypeDescriptors provide additional context about the source and target locations * where conversion will occur, often object fields or property locations. - * @param source the source object to convert (may be null) + * @param source the source object to convert (may be {@code null}) * @param sourceType context about the source type to convert from * (may be {@code null} if source is {@code null}) * @param targetType context about the target type to convert to (required) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java index 2aa28d5dfb..6f8e803674 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -33,8 +33,8 @@ import org.springframework.web.method.HandlerMethod; * or common handler behavior like locale or theme changes. Its main purpose * is to allow for factoring out repetitive handler code. * - *

In an async processing scenario, the handler may be executed in a separate - * thread while the main thread exits without rendering or invoking the + *

In an asynchronous processing scenario, the handler may be executed in a + * separate thread while the main thread exits without rendering or invoking the * {@code postHandle} and {@code afterCompletion} callbacks. When concurrent * handler execution completes, the request is dispatched back in order to * proceed with rendering the model and all methods of this contract are invoked @@ -77,16 +77,13 @@ public interface HandlerInterceptor { /** * Intercept the execution of a handler. Called after HandlerMapping determined * an appropriate handler object, but before HandlerAdapter invokes the handler. - * *

DispatcherServlet processes a handler in an execution chain, consisting * of any number of interceptors, with the handler itself at the end. * With this method, each interceptor can decide to abort the execution chain, * typically sending a HTTP error or writing a custom response. - * *

Note: special considerations apply for asynchronous * request processing. For more details see * {@link org.springframework.web.servlet.AsyncHandlerInterceptor}. - * * @param request current HTTP request * @param response current HTTP response * @param handler chosen handler to execute, for type and/or instance evaluation @@ -102,19 +99,16 @@ public interface HandlerInterceptor { * Intercept the execution of a handler. Called after HandlerAdapter actually * invoked the handler, but before the DispatcherServlet renders the view. * Can expose additional model objects to the view via the given ModelAndView. - * *

DispatcherServlet processes a handler in an execution chain, consisting * of any number of interceptors, with the handler itself at the end. * With this method, each interceptor can post-process an execution, * getting applied in inverse order of the execution chain. - * *

Note: special considerations apply for asynchronous * request processing. For more details see * {@link org.springframework.web.servlet.AsyncHandlerInterceptor}. - * * @param request current HTTP request * @param response current HTTP response - * @param handler handler (or {@link HandlerMethod}) that started async + * @param handler handler (or {@link HandlerMethod}) that started asynchronous * execution, for type and/or instance examination * @param modelAndView the {@code ModelAndView} that the handler returned * (can also be {@code null}) @@ -127,21 +121,17 @@ public interface HandlerInterceptor { * Callback after completion of request processing, that is, after rendering * the view. Will be called on any outcome of handler execution, thus allows * for proper resource cleanup. - * *

Note: Will only be called if this interceptor's {@code preHandle} * method has successfully completed and returned {@code true}! - * *

As with the {@code postHandle} method, the method will be invoked on each * interceptor in the chain in reverse order, so the first interceptor will be * the last to be invoked. - * *

Note: special considerations apply for asynchronous * request processing. For more details see * {@link org.springframework.web.servlet.AsyncHandlerInterceptor}. - * * @param request current HTTP request * @param response current HTTP response - * @param handler handler (or {@link HandlerMethod}) that started async + * @param handler handler (or {@link HandlerMethod}) that started asynchronous * execution, for type and/or instance examination * @param ex exception thrown on handler execution, if any * @throws Exception in case of errors