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 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2015 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.
@@ -281,16 +281,16 @@ public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
281
281
*/
282
282
private class ReturnValueMethodParameter extends HandlerMethodParameter {
283
283
284
- private final Object returnValue ;
284
+ private final Class <?> returnValueType ;
285
285
286
286
public ReturnValueMethodParameter (Object returnValue ) {
287
287
super (-1 );
288
- this .returnValue = returnValue ;
288
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
289
289
}
290
290
291
291
@ Override
292
292
public Class <?> getParameterType () {
293
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
293
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
294
294
}
295
295
}
296
296
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2015 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.
@@ -276,16 +276,16 @@ public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
276
276
*/
277
277
private class ReturnValueMethodParameter extends HandlerMethodParameter {
278
278
279
- private final Object returnValue ;
279
+ private final Class <?> returnValueType ;
280
280
281
281
public ReturnValueMethodParameter (Object returnValue ) {
282
282
super (-1 );
283
- this .returnValue = returnValue ;
283
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
284
284
}
285
285
286
286
@ Override
287
287
public Class <?> getParameterType () {
288
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
288
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
289
289
}
290
290
}
291
291
You can’t perform that action at this time.
0 commit comments