Skip to content

Commit e9cd37a

Browse files
committed
Merge branch '5.2.x'
# Conflicts: # spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java
2 parents 0af09e0 + f3f1950 commit e9cd37a

File tree

7 files changed

+19
-34
lines changed

7 files changed

+19
-34
lines changed

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/HandlerMethodReturnValueHandlerComposite.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,6 @@ public class HandlerMethodReturnValueHandlerComposite implements HandlerMethodRe
3838

3939
protected final Log logger = LogFactory.getLog(getClass());
4040

41-
4241
private final List<HandlerMethodReturnValueHandler> returnValueHandlers = new ArrayList<>();
4342

4443

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/InvocableHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@
4646
*/
4747
class InvocableHelper {
4848

49-
private static Log logger = LogFactory.getLog(InvocableHelper.class);
49+
private static final Log logger = LogFactory.getLog(InvocableHelper.class);
5050

5151

5252
private final HandlerMethodArgumentResolverComposite argumentResolvers =

spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public class InvocableHandlerMethod extends HandlerMethod {
4949
private static final Object[] EMPTY_ARGS = new Object[0];
5050

5151

52-
@Nullable
53-
private WebDataBinderFactory dataBinderFactory;
54-
5552
private HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
5653

5754
private ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer();
5855

56+
@Nullable
57+
private WebDataBinderFactory dataBinderFactory;
58+
5959

6060
/**
6161
* Create an instance from a {@code HandlerMethod}.
@@ -86,16 +86,8 @@ public InvocableHandlerMethod(Object bean, String methodName, Class<?>... parame
8686

8787

8888
/**
89-
* Set the {@link WebDataBinderFactory} to be passed to argument resolvers allowing them to create
90-
* a {@link WebDataBinder} for data binding and type conversion purposes.
91-
* @param dataBinderFactory the data binder factory.
92-
*/
93-
public void setDataBinderFactory(WebDataBinderFactory dataBinderFactory) {
94-
this.dataBinderFactory = dataBinderFactory;
95-
}
96-
97-
/**
98-
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use to use for resolving method argument values.
89+
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}
90+
* to use for resolving method argument values.
9991
*/
10092
public void setHandlerMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
10193
this.resolvers = argumentResolvers;
@@ -110,6 +102,14 @@ public void setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDisc
110102
this.parameterNameDiscoverer = parameterNameDiscoverer;
111103
}
112104

105+
/**
106+
* Set the {@link WebDataBinderFactory} to be passed to argument resolvers allowing them
107+
* to create a {@link WebDataBinder} for data binding and type conversion purposes.
108+
*/
109+
public void setDataBinderFactory(WebDataBinderFactory dataBinderFactory) {
110+
this.dataBinderFactory = dataBinderFactory;
111+
}
112+
113113

114114
/**
115115
* Invoke the method after resolving its argument values in the context of the given request.

spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractMediaTypeExpression.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.web.reactive.result.condition;
1818

19-
import org.apache.commons.logging.Log;
20-
import org.apache.commons.logging.LogFactory;
21-
2219
import org.springframework.http.MediaType;
2320
import org.springframework.lang.Nullable;
2421
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,8 +32,6 @@
3532
*/
3633
abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTypeExpression>, MediaTypeExpression {
3734

38-
protected final Log logger = LogFactory.getLog(getClass());
39-
4035
private final MediaType mediaType;
4136

4237
private final boolean isNegated;

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/HandlerMethodArgumentResolverComposite.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import java.util.Map;
2323
import java.util.concurrent.ConcurrentHashMap;
2424

25-
import org.apache.commons.logging.Log;
26-
import org.apache.commons.logging.LogFactory;
2725
import reactor.core.publisher.Mono;
2826

2927
import org.springframework.core.MethodParameter;
@@ -41,8 +39,6 @@
4139
*/
4240
class HandlerMethodArgumentResolverComposite implements HandlerMethodArgumentResolver {
4341

44-
protected final Log logger = LogFactory.getLog(getClass());
45-
4642
private final List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>();
4743

4844
private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache =

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
6060
private static final Object NO_ARG_VALUE = new Object();
6161

6262

63-
private HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
63+
private final HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
6464

6565
private ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer();
6666

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.web.servlet.mvc.condition;
1818

19-
import org.apache.commons.logging.Log;
20-
import org.apache.commons.logging.LogFactory;
21-
2219
import org.springframework.http.MediaType;
2320
import org.springframework.lang.Nullable;
2421
import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +30,6 @@
3330
*/
3431
abstract class AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> {
3532

36-
protected final Log logger = LogFactory.getLog(getClass());
37-
3833
private final MediaType mediaType;
3934

4035
private final boolean isNegated;

0 commit comments

Comments
 (0)