Skip to content

NPE in RestTemplate with Resource implementation where getFilename() returns null [SPR-10848] #15475

@spring-projects-issues

Description

@spring-projects-issues

Gabriel Axel opened SPR-10848 and commented

When attempting to use a Resource implementation where getFilename() returns null, such as ByteArrayResource, as the payload for RestTemplate operations, ResourceHttpMessageConverter.ActivationMediaTypeFactory.getMediaType() calls FileTypeMap.getContentType() with null value which throws NullPointerException.


Affects: 3.2.4

Referenced from: commits a17912d, d662067

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions