Fix ResourceRegion HttpMessageConverter write checks

This commit fixes the write checks for
`ResourceRegionHttpMessageConverter`, which was previously not checking
properly the parameterized type (e.g. in case of a `List<Something>`).

Issue: SPR-16932
This commit is contained in:
Brian Clozel
2018-06-11 22:43:59 +02:00
parent ef41dcf687
commit 05ff8b722d
2 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -119,7 +119,7 @@ public class ResourceRegionHttpMessageConverter extends AbstractGenericHttpMessa
}
Class<?> typeArgumentClass = (Class<?>) typeArgument;
return typeArgumentClass.isAssignableFrom(ResourceRegion.class);
return ResourceRegion.class.isAssignableFrom(typeArgumentClass);
}
@Override