DATAREST-296 - ResourceMetadataHandlerMethodArgumentResolver now properly implements ….supports(…).
ResourceMetadataHandlerMethodArgumentResolver.supports(…) now properly checks for ResourceMetadata. It previously checked for RepositoryInformation which is probably a left-over from a previous state of the codebase and has been unnoticed so far as the class is only used as a direct dependency of other HandlerMethodArgumentResolvers.
This commit is contained in:
@@ -19,7 +19,6 @@ import static org.springframework.util.ClassUtils.*;
|
||||
import static org.springframework.util.StringUtils.*;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.repository.core.RepositoryInformation;
|
||||
import org.springframework.data.repository.support.Repositories;
|
||||
import org.springframework.data.rest.core.mapping.ResourceMappings;
|
||||
import org.springframework.data.rest.core.mapping.ResourceMetadata;
|
||||
@@ -36,6 +35,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
*
|
||||
* @author Jon Brisbin
|
||||
* @author Oliver Gierke
|
||||
* @author jiacheng Yang
|
||||
*/
|
||||
public class ResourceMetadataHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class ResourceMetadataHandlerMethodArgumentResolver implements HandlerMet
|
||||
*/
|
||||
@Override
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
return isAssignable(parameter.getParameterType(), RepositoryInformation.class);
|
||||
return isAssignable(parameter.getParameterType(), ResourceMetadata.class);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user