Consistent use of JDK 7 StandardCharsets over Charset.forName

Issue: SPR-14492
This commit is contained in:
Juergen Hoeller
2016-08-26 14:16:19 +02:00
parent 50040e6139
commit 2e4a7480fc
18 changed files with 82 additions and 106 deletions

View File

@@ -16,7 +16,6 @@
package org.springframework.util;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
@@ -76,7 +75,7 @@ public class MimeTypeTests {
MimeType mimeType = MimeType.valueOf(s);
assertEquals("Invalid type", "text", mimeType.getType());
assertEquals("Invalid subtype", "html", mimeType.getSubtype());
assertEquals("Invalid charset", Charset.forName("ISO-8859-1"), mimeType.getCharset());
assertEquals("Invalid charset", StandardCharsets.ISO_8859_1, mimeType.getCharset());
}
@Test