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:
parent
2a4d110b22
commit
d2f5efcb20
33 changed files with 125 additions and 227 deletions
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.sasl.provided;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import javax.security.auth.callback.CallbackHandler;
|
||||
|
||||
|
@ -103,13 +103,7 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
|
|||
if (challenge.length == 0) {
|
||||
throw new SmackSaslException("Initial challenge has zero length");
|
||||
}
|
||||
String challengeString;
|
||||
try {
|
||||
challengeString = new String(challenge, StringUtils.UTF8);
|
||||
}
|
||||
catch (UnsupportedEncodingException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
String challengeString = new String(challenge, StandardCharsets.UTF_8);
|
||||
String[] challengeParts = challengeString.split(",");
|
||||
byte[] response = null;
|
||||
switch (state) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue