1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Bump "Error Prone" to 2.0.15

and fix a few things :)
This commit is contained in:
Florian Schmaus 2017-02-11 16:16:41 +01:00
parent ef0af66b21
commit 4c646436a5
246 changed files with 1122 additions and 124 deletions

View file

@ -16,6 +16,8 @@
*/
package org.jivesoftware.smack.sasl.provided;
import java.io.UnsupportedEncodingException;
import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.SmackException;
@ -101,7 +103,14 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
if (challenge.length == 0) {
throw new SmackException("Initial challenge has zero length");
}
String[] challengeParts = (new String(challenge)).split(",");
String challengeString;
try {
challengeString = new String(challenge, StringUtils.UTF8);
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
String[] challengeParts = challengeString.split(",");
byte[] response = null;
switch (state) {
case INITIAL:

View file

@ -16,6 +16,8 @@
*/
package org.jivesoftware.smack.sasl.provided;
import java.io.UnsupportedEncodingException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.sasl.DigestMd5SaslTest;
@ -28,12 +30,14 @@ public class SASLDigestMD5Test extends DigestMd5SaslTest {
}
@Test
public void testDigestMD5() throws NotConnectedException, SmackException, InterruptedException, XmppStringprepException {
public void testDigestMD5() throws NotConnectedException, SmackException, InterruptedException,
XmppStringprepException, UnsupportedEncodingException {
runTest(false);
}
@Test
public void testDigestMD5Authzid() throws NotConnectedException, SmackException, InterruptedException, XmppStringprepException {
public void testDigestMD5Authzid() throws NotConnectedException, SmackException, InterruptedException,
XmppStringprepException, UnsupportedEncodingException {
runTest(true);
}
}