File tree 1 file changed +4
-4
lines changed
org.springframework.web/src/main/java/org/springframework/web/method
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2012 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.
@@ -253,16 +253,16 @@ public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
253
253
*/
254
254
private class ReturnValueMethodParameter extends HandlerMethodParameter {
255
255
256
- private final Object returnValue ;
256
+ private final Class <?> returnValueType ;
257
257
258
258
public ReturnValueMethodParameter (Object returnValue ) {
259
259
super (-1 );
260
- this .returnValue = returnValue ;
260
+ this .returnValueType = ( returnValue != null ? returnValue . getClass () : null ) ;
261
261
}
262
262
263
263
@ Override
264
264
public Class <?> getParameterType () {
265
- return (this .returnValue != null ) ? this .returnValue . getClass () : super .getParameterType ();
265
+ return (this .returnValueType != null ? this .returnValueType : super .getParameterType () );
266
266
}
267
267
}
268
268
You can’t perform that action at this time.
0 commit comments