Skip to content

Commit a3e190e

Browse files
committed
Support sub-types of ResponseEntity
Issue: SPR-10207
1 parent 0a09da7 commit a3e190e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 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.
@@ -68,7 +68,7 @@ public boolean supportsParameter(MethodParameter parameter) {
6868

6969
public boolean supportsReturnType(MethodParameter returnType) {
7070
Class<?> parameterType = returnType.getParameterType();
71-
return HttpEntity.class.equals(parameterType) || ResponseEntity.class.equals(parameterType);
71+
return HttpEntity.class.isAssignableFrom(parameterType) || ResponseEntity.class.isAssignableFrom(parameterType);
7272
}
7373

7474
public Object resolveArgument(

0 commit comments

Comments
 (0)