File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2019  the original author or authors. 
2+  * Copyright 2002-2022  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. 
@@ -416,21 +416,21 @@ public HandlerMethodParameter clone() {
416416	private  class  ReturnValueMethodParameter  extends  HandlerMethodParameter  {
417417
418418		@ Nullable 
419- 		private  final  Object   returnValue ;
419+ 		private  final  Class <?>  returnValueType ;
420420
421421		public  ReturnValueMethodParameter (@ Nullable  Object  returnValue ) {
422422			super (-1 );
423- 			this .returnValue  =  returnValue ;
423+ 			this .returnValueType  = ( returnValue  !=  null  ?  returnValue . getClass () :  null ) ;
424424		}
425425
426426		protected  ReturnValueMethodParameter (ReturnValueMethodParameter  original ) {
427427			super (original );
428- 			this .returnValue  = original .returnValue ;
428+ 			this .returnValueType  = original .returnValueType ;
429429		}
430430
431431		@ Override 
432432		public  Class <?> getParameterType () {
433- 			return  (this .returnValue  != null  ? this .returnValue . getClass ()  : super .getParameterType ());
433+ 			return  (this .returnValueType  != null  ? this .returnValueType  : super .getParameterType ());
434434		}
435435
436436		@ Override 
Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2020  the original author or authors. 
2+  * Copyright 2002-2022  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. 
@@ -536,21 +536,21 @@ public HandlerMethodParameter clone() {
536536	private  class  ReturnValueMethodParameter  extends  HandlerMethodParameter  {
537537
538538		@ Nullable 
539- 		private  final  Object   returnValue ;
539+ 		private  final  Class <?>  returnValueType ;
540540
541541		public  ReturnValueMethodParameter (@ Nullable  Object  returnValue ) {
542542			super (-1 );
543- 			this .returnValue  =  returnValue ;
543+ 			this .returnValueType  = ( returnValue  !=  null  ?  returnValue . getClass () :  null ) ;
544544		}
545545
546546		protected  ReturnValueMethodParameter (ReturnValueMethodParameter  original ) {
547547			super (original );
548- 			this .returnValue  = original .returnValue ;
548+ 			this .returnValueType  = original .returnValueType ;
549549		}
550550
551551		@ Override 
552552		public  Class <?> getParameterType () {
553- 			return  (this .returnValue  != null  ? this .returnValue . getClass ()  : super .getParameterType ());
553+ 			return  (this .returnValueType  != null  ? this .returnValueType  : super .getParameterType ());
554554		}
555555
556556		@ Override 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments