Use StandardCharsets
[yangtools.git] / yang / yang-model-util / src / test / java / org / opendaylight / yangtools / yang / model / util / Bug5410Test.java
index 08aa0513adab69fb2b715bf94473fd25b22f7567..50f27f9f6107418105fdc6e31b2c0d9eb94a062a 100644 (file)
@@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 import org.junit.Test;
 
@@ -150,7 +151,7 @@ public class Bug5410Test {
             throws UnsupportedEncodingException {
         final PrintStream stdout = System.out;
         final ByteArrayOutputStream output = new ByteArrayOutputStream();
-        System.setOut(new PrintStream(output, true, "UTF-8"));
+        System.setOut(new PrintStream(output, true, StandardCharsets.UTF_8));
 
         RegexUtils.getJavaRegexFromXSD(xsdRegex);