mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Use StandardCharsets.(UTF_8|US_ASCII)
This also gets rid of a ton of UnsupportedEncodingException s.
This commit is contained in:
parent
2a4d110b22
commit
d2f5efcb20
33 changed files with 125 additions and 227 deletions
|
@ -22,6 +22,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.jivesoftware.smack.test.util.SmackTestSuite;
|
||||
import org.jivesoftware.smack.test.util.TestUtils;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
@ -53,7 +55,7 @@ public class HashElementTest extends SmackTestSuite {
|
|||
assertTrue(element.equals(parsed));
|
||||
|
||||
HashElement other = new HashElement(HashManager.ALGORITHM.SHA_512,
|
||||
"861844d6704e8573fec34d967e20bcfef3d424cf48be04e6dc08f2bd58c729743371015ead891cc3cf1c9d34b49264b510751b1ff9e537937bc46b5d6ff4ecc8".getBytes(StringUtils.UTF8));
|
||||
"861844d6704e8573fec34d967e20bcfef3d424cf48be04e6dc08f2bd58c729743371015ead891cc3cf1c9d34b49264b510751b1ff9e537937bc46b5d6ff4ecc8".getBytes(StandardCharsets.UTF_8));
|
||||
assertFalse(element.equals(other));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue