Skip to content

Commit 3fb51b0

Browse files
committed
Polishing
1 parent 25a1bfb commit 3fb51b0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

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

Lines changed: 14 additions & 14 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,13 +46,13 @@ public class InvocableHandlerMethod extends HandlerMethod {
4646
private static final Object[] EMPTY_ARGS = new Object[0];
4747

4848

49-
@Nullable
50-
private WebDataBinderFactory dataBinderFactory;
51-
5249
private HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
5350

5451
private ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer();
5552

53+
@Nullable
54+
private WebDataBinderFactory dataBinderFactory;
55+
5656

5757
/**
5858
* Create an instance from a {@code HandlerMethod}.
@@ -83,16 +83,8 @@ public InvocableHandlerMethod(Object bean, String methodName, Class<?>... parame
8383

8484

8585
/**
86-
* Set the {@link WebDataBinderFactory} to be passed to argument resolvers allowing them to create
87-
* a {@link WebDataBinder} for data binding and type conversion purposes.
88-
* @param dataBinderFactory the data binder factory.
89-
*/
90-
public void setDataBinderFactory(WebDataBinderFactory dataBinderFactory) {
91-
this.dataBinderFactory = dataBinderFactory;
92-
}
93-
94-
/**
95-
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use to use for resolving method argument values.
86+
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}
87+
* to use for resolving method argument values.
9688
*/
9789
public void setHandlerMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
9890
this.resolvers = argumentResolvers;
@@ -107,6 +99,14 @@ public void setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDisc
10799
this.parameterNameDiscoverer = parameterNameDiscoverer;
108100
}
109101

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

111111
/**
112112
* 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/method/InvocableHandlerMethod.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.
@@ -57,7 +57,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
5757
private static final Object NO_ARG_VALUE = new Object();
5858

5959

60-
private HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
60+
private final HandlerMethodArgumentResolverComposite resolvers = new HandlerMethodArgumentResolverComposite();
6161

6262
private ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer();
6363

0 commit comments

Comments
 (0)