mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Bump "Error Prone" to 2.0.15
and fix a few things :)
This commit is contained in:
parent
ef0af66b21
commit
4c646436a5
246 changed files with 1122 additions and 124 deletions
|
@ -180,6 +180,7 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
*
|
||||
* @param packet the stanza(/packet) to process.
|
||||
*/
|
||||
@Override
|
||||
public void processStanza(Stanza packet) {
|
||||
invokeStanzaCollectorsAndNotifyRecvListeners(packet);
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ public class StanzaCollectorTest
|
|||
assertNull(collector.pollResult());
|
||||
}
|
||||
|
||||
class OKEverything implements StanzaFilter
|
||||
static class OKEverything implements StanzaFilter
|
||||
{
|
||||
@Override
|
||||
public boolean accept(Stanza packet)
|
||||
|
@ -186,7 +186,7 @@ public class StanzaCollectorTest
|
|||
|
||||
}
|
||||
|
||||
class TestStanzaCollector extends StanzaCollector
|
||||
static class TestStanzaCollector extends StanzaCollector
|
||||
{
|
||||
protected TestStanzaCollector(XMPPConnection conection, StanzaFilter packetFilter, int size)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ public class StanzaCollectorTest
|
|||
}
|
||||
}
|
||||
|
||||
class TestPacket extends Stanza
|
||||
static class TestPacket extends Stanza
|
||||
{
|
||||
public TestPacket(int i)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.jivesoftware.smack.sasl;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -38,14 +39,14 @@ public class DigestMd5SaslTest extends AbstractSaslTest {
|
|||
super(saslMechanism);
|
||||
}
|
||||
|
||||
protected void runTest(boolean useAuthzid) throws NotConnectedException, SmackException, InterruptedException, XmppStringprepException {
|
||||
protected void runTest(boolean useAuthzid) throws NotConnectedException, SmackException, InterruptedException, XmppStringprepException, UnsupportedEncodingException {
|
||||
EntityBareJid authzid = null;
|
||||
if (useAuthzid) {
|
||||
authzid = JidCreate.entityBareFrom("shazbat@xmpp.org");
|
||||
}
|
||||
saslMechanism.authenticate("florian", "irrelevant", JidCreate.domainBareFrom("xmpp.org"), "secret", authzid, null);
|
||||
byte[] response = saslMechanism.evaluateChallenge(challengeBytes);
|
||||
String responseString = new String(response);
|
||||
String responseString = new String(response, StringUtils.UTF8);
|
||||
String[] responseParts = responseString.split(",");
|
||||
Map<String, String> responsePairs = new HashMap<String, String>();
|
||||
for (String part : responseParts) {
|
||||
|
|
|
@ -851,6 +851,7 @@ public class PacketParserUtilsTest {
|
|||
XmlUnitUtils.assertSimilar(saslFailureString, saslFailure.toXML());
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReferenceEquality")
|
||||
private static String determineNonDefaultLanguage() {
|
||||
String otherLanguage = "jp";
|
||||
Locale[] availableLocales = Locale.getAvailableLocales();
|
||||
|
|
|
@ -21,6 +21,8 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
|
@ -72,16 +74,16 @@ public class StringUtilsTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEncodeHex() {
|
||||
public void testEncodeHex() throws UnsupportedEncodingException {
|
||||
String input = "";
|
||||
String output = "";
|
||||
assertEquals(new String(StringUtils.encodeHex(input.getBytes())),
|
||||
new String(output.getBytes()));
|
||||
assertEquals(new String(StringUtils.encodeHex(input.getBytes(StringUtils.UTF8))),
|
||||
output);
|
||||
|
||||
input = "foo bar 123";
|
||||
output = "666f6f2062617220313233";
|
||||
assertEquals(new String(StringUtils.encodeHex(input.getBytes())),
|
||||
new String(output.getBytes()));
|
||||
assertEquals(new String(StringUtils.encodeHex(input.getBytes(StringUtils.UTF8))),
|
||||
output);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue