Revise encoding steps towards use of JDK Charset and StandardCharsets

Issue: SPR-14492
This commit is contained in:
Juergen Hoeller
2016-07-19 23:43:05 +02:00
parent 79d30d8c8a
commit 99be15f58b
95 changed files with 480 additions and 569 deletions

View File

@@ -19,7 +19,7 @@ package org.springframework.expression.spel;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -2091,7 +2091,7 @@ public class SpelReproTests extends AbstractExpressionTests {
Expression ex = parser.parseExpression("T(java.nio.charset.Charset).forName(#encoding)");
Object result = ex.getValue(context);
assertEquals(Charset.forName("UTF-8"), result);
assertEquals(StandardCharsets.UTF_8, result);
}