Skip to content

Commit fa95f12

Browse files
izeyesbrannen
authored andcommitted
Fix condition for "Too many elements" in MimeTypeUtils.sortBySpecificity()
See gh-31254 See gh-31769 Closes gh-31773 (cherry picked from commit 7b95bd7)
1 parent 035cc72 commit fa95f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public static String toString(Collection<? extends MimeType> mimeTypes) {
362362
*/
363363
public static <T extends MimeType> void sortBySpecificity(List<T> mimeTypes) {
364364
Assert.notNull(mimeTypes, "'mimeTypes' must not be null");
365-
if (mimeTypes.size() >= 50) {
365+
if (mimeTypes.size() > 50) {
366366
throw new InvalidMimeTypeException(mimeTypes.toString(), "Too many elements");
367367
}
368368

0 commit comments

Comments
 (0)