File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
spring-messaging/src/main/java/org/springframework/messaging/handler
spring-web/src/main/java/org/springframework/web/method Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -270,16 +270,16 @@ public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
270
270
*/
271
271
private class ReturnValueMethodParameter extends HandlerMethodParameter {
272
272
273
- private final Object returnValue ;
273
+ private final Class <?> returnValueType ;
274
274
275
275
public ReturnValueMethodParameter (Object returnValue ) {
276
276
super (-1 );
277
- this .returnValue = returnValue ;
277
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
278
278
}
279
279
280
280
@ Override
281
281
public Class <?> getParameterType () {
282
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
282
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
283
283
}
284
284
}
285
285
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -270,16 +270,16 @@ public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
270
270
*/
271
271
private class ReturnValueMethodParameter extends HandlerMethodParameter {
272
272
273
- private final Object returnValue ;
273
+ private final Class <?> returnValueType ;
274
274
275
275
public ReturnValueMethodParameter (Object returnValue ) {
276
276
super (-1 );
277
- this .returnValue = returnValue ;
277
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
278
278
}
279
279
280
280
@ Override
281
281
public Class <?> getParameterType () {
282
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
282
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
283
283
}
284
284
}
285
285
You can’t perform that action at this time.
0 commit comments