Skip to content

Commit 884b846

Browse files
committed
Fix override of canRead(…) in AlpsJacksonJsonHttpMessageConverter.
We invalidly overrode canRead(ResolvableType, MediaType) which caused our opt-out for deserialization not being applied and thus, the converter being used for payload deserialization. Fixes GH-2533.
1 parent e02ea86 commit 884b846

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/alps/AlpsJacksonJsonHttpMessageConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import org.jspecify.annotations.Nullable;
2626
import org.springframework.core.MethodParameter;
27-
import org.springframework.core.ResolvableType;
2827
import org.springframework.data.rest.webmvc.RootResourceInformation;
2928
import org.springframework.hateoas.MediaTypes;
3029
import org.springframework.hateoas.mediatype.alps.Alps;
@@ -98,7 +97,7 @@ public boolean canWrite(Class<?> clazz, @Nullable MediaType mediaType) {
9897
}
9998

10099
@Override
101-
public boolean canRead(ResolvableType type, @Nullable MediaType mediaType) {
100+
public boolean canRead(Class<?> type, @Nullable MediaType mediaType) {
102101
return false;
103102
}
104103

0 commit comments

Comments
 (0)