1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Use StandardCharsets.(UTF_8|US_ASCII)

This also gets rid of a ton of UnsupportedEncodingException s.
This commit is contained in:
Florian Schmaus 2019-05-08 11:34:40 +02:00
parent 2a4d110b22
commit d2f5efcb20
33 changed files with 125 additions and 227 deletions

View file

@ -20,7 +20,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import org.jivesoftware.smack.SmackException;
@ -48,12 +48,7 @@ public class FileTransferIntegrationTest extends AbstractSmackIntegrationTest {
private static final byte[] dataToSend;
static {
try {
dataToSend = StringUtils.insecureRandomString(1024 * 4 * 5).getBytes(StringUtils.UTF8);
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
dataToSend = StringUtils.insecureRandomString(1024 * 4 * 5).getBytes(StandardCharsets.UTF_8);
}
@SmackIntegrationTest