spring-framework/spring-context-support
Brian Clozel 412f5f677b Fix NPEs in MimeMessageHelper when adding files without names
Prior to this commit, `MimeMessageHelper` would accept `Resource`
instances as inline attachments in multipart MIME messages. If the
provided `Resource` implementation returns `null` for `getFileName()`,
the `addInLine` method would fail with a `NullPointerException` as
Jakarta activation fails to detect the content type for a null filename.

This commit falls back on "application/octet-stream" when the filename
is not known for the given resource instead of failing with an
exception.

Fixes gh-33527
2024-09-13 10:17:58 +02:00
..
src Fix NPEs in MimeMessageHelper when adding files without names 2024-09-13 10:17:58 +02:00
spring-context-support.gradle Support for late-determined cache misses from retrieve(key) 2023-11-21 23:11:34 +01:00