-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
Affects: 5.2.10 and up
The org.springframework.util.MimeType class implements Serializable interface, but since the resolvedCharset field was introduced in 5.2.10, serialization with charset will fail since Charset class does not implement Serializable.
Code to reproduce:
MimeType mimeType = new MimeType("text", "plain", StandardCharsets.UTF_8);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(mimeType);
On OpenJDK 8 & 11 (Ubuntu), the above gives java.io.NotSerializableException.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression