File tree 2 files changed +10
-10
lines changed
spring-messaging/src/main/java/org/springframework/messaging/handler
spring-web/src/main/java/org/springframework/web/method
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2021 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.
@@ -420,21 +420,21 @@ public HandlerMethodParameter clone() {
420
420
private class ReturnValueMethodParameter extends HandlerMethodParameter {
421
421
422
422
@ Nullable
423
- private final Object returnValue ;
423
+ private final Class <?> returnValueType ;
424
424
425
425
public ReturnValueMethodParameter (@ Nullable Object returnValue ) {
426
426
super (-1 );
427
- this .returnValue = returnValue ;
427
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
428
428
}
429
429
430
430
protected ReturnValueMethodParameter (ReturnValueMethodParameter original ) {
431
431
super (original );
432
- this .returnValue = original .returnValue ;
432
+ this .returnValueType = original .returnValueType ;
433
433
}
434
434
435
435
@ Override
436
436
public Class <?> getParameterType () {
437
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
437
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
438
438
}
439
439
440
440
@ Override
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2021 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.
@@ -582,21 +582,21 @@ public HandlerMethodParameter clone() {
582
582
private class ReturnValueMethodParameter extends HandlerMethodParameter {
583
583
584
584
@ Nullable
585
- private final Object returnValue ;
585
+ private final Class <?> returnValueType ;
586
586
587
587
public ReturnValueMethodParameter (@ Nullable Object returnValue ) {
588
588
super (-1 );
589
- this .returnValue = returnValue ;
589
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
590
590
}
591
591
592
592
protected ReturnValueMethodParameter (ReturnValueMethodParameter original ) {
593
593
super (original );
594
- this .returnValue = original .returnValue ;
594
+ this .returnValueType = original .returnValueType ;
595
595
}
596
596
597
597
@ Override
598
598
public Class <?> getParameterType () {
599
- return (this .returnValue != null ? this .returnValue . getClass () : super .getParameterType ());
599
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType ());
600
600
}
601
601
602
602
@ Override
You can’t perform that action at this time.
0 commit comments