-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Tomoya Honjo opened SPR-14124 and commented
MimeTypeUtil#parseMimeType throws java.lang.ArrayIndexOutOfBoundsException when only delimiter ";" passed as the argument. Because in the method it parse the argument by StringUtils.tokenizeToStringArray(mimeType, ";"); but, it returns an empty array only passed the delimiter, so the exception is thrown by this next line String fullType = parts[0].trim();
For such a case, there is the dedicated exception InvalidMimeTypeException which express passed mimetype string cannot be parsed, so it's better to throw the exception.
Affects: 4.1.7
Reference URL: #1016
Referenced from: commits 50c1102
1 votes, 2 watchers
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement