mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 11:09:49 +08:00
Use constant for utf-8 encoding
This commit is contained in:
@@ -4,7 +4,6 @@ import junit.framework.AssertionFailedError;
|
|||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@@ -27,14 +26,10 @@ public abstract class TerminalTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getOutputAndClear() {
|
public String getOutputAndClear() {
|
||||||
try {
|
String result = new String(baos.toByteArray(), StandardCharsets.UTF_8);
|
||||||
String result = new String(baos.toByteArray(), "UTF-8");
|
baos.reset();
|
||||||
baos.reset();
|
return result;
|
||||||
return result;
|
}
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void titleChanged(String oldTitle, String newTitle) {
|
public void titleChanged(String oldTitle, String newTitle) {
|
||||||
|
Reference in New Issue
Block a user