**[Rossen Stoyanchev](https://jira.spring.io/secure/ViewProfile.jspa?name=rstoya05-aop)** opened **[SPR-16606](https://jira.spring.io/browse/SPR-16606?redirect=false)** and commented This is due to the following check `clazz.isAssignableFrom(ByteArrayResource.class)`, which is in reverse order to what it should be. --- **Affects:** 5.0.4 **Referenced from:** commits https://github.com/spring-projects/spring-framework/commit/30583a62cfeef79ccbd18daf9c6045d89688e22b