mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
412f5f677b
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