mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Use constant for utf-8 encoding
This commit is contained in:
parent
4df285013e
commit
70c1bddae0
1 changed files with 4 additions and 9 deletions
|
|
@ -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,13 +26,9 @@ 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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue