mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Update errorprone(-plugin) and make Unused(Variable|Method) an error
This commit is contained in:
parent
68d7d738b6
commit
7f0dc72dab
46 changed files with 81 additions and 126 deletions
|
@ -16,8 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.transports.jingle_s5b.elements;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.util.Objects;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
|
@ -34,8 +32,6 @@ import org.jxmpp.stringprep.XmppStringprepException;
|
|||
*/
|
||||
public final class JingleS5BTransportCandidate extends JingleContentTransportCandidate {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(JingleS5BTransportCandidate.class.getName());
|
||||
|
||||
public static final String ATTR_CID = "cid";
|
||||
public static final String ATTR_HOST = "host";
|
||||
public static final String ATTR_JID = "jid";
|
||||
|
|
|
@ -69,8 +69,6 @@ public class InBandBytestreamSessionMessageTest extends InitExtensions {
|
|||
// mocked XMPP connection
|
||||
private XMPPConnection connection;
|
||||
|
||||
private InBandBytestreamManager byteStreamManager;
|
||||
|
||||
private Open initBytestream;
|
||||
|
||||
private Verification<Message, IQ> incrementingSequence;
|
||||
|
@ -90,9 +88,6 @@ public class InBandBytestreamSessionMessageTest extends InitExtensions {
|
|||
// create mocked XMPP connection
|
||||
connection = ConnectionUtils.createMockedConnection(protocol, initiatorJID);
|
||||
|
||||
// initialize InBandBytestreamManager to get the InitiationListener
|
||||
byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);
|
||||
|
||||
// create a In-Band Bytestream open packet with message stanza
|
||||
initBytestream = new Open(sessionID, blockSize, StanzaType.MESSAGE);
|
||||
initBytestream.setFrom(initiatorJID);
|
||||
|
@ -318,7 +313,7 @@ public class InBandBytestreamSessionMessageTest extends InitExtensions {
|
|||
}
|
||||
|
||||
byte[] bytes = new byte[3 * blockSize];
|
||||
int read = 0;
|
||||
int read;
|
||||
read = inputStream.read(bytes, 0, blockSize);
|
||||
assertEquals(blockSize, read);
|
||||
read = inputStream.read(bytes, 10, blockSize);
|
||||
|
|
|
@ -70,8 +70,6 @@ public class InBandBytestreamSessionTest extends InitExtensions {
|
|||
// mocked XMPP connection
|
||||
private XMPPConnection connection;
|
||||
|
||||
private InBandBytestreamManager byteStreamManager;
|
||||
|
||||
private Open initBytestream;
|
||||
|
||||
private Verification<Data, IQ> incrementingSequence;
|
||||
|
@ -91,9 +89,6 @@ public class InBandBytestreamSessionTest extends InitExtensions {
|
|||
// create mocked XMPP connection
|
||||
connection = ConnectionUtils.createMockedConnection(protocol, initiatorJID);
|
||||
|
||||
// initialize InBandBytestreamManager to get the InitiationListener
|
||||
byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);
|
||||
|
||||
// create a In-Band Bytestream open packet
|
||||
initBytestream = new Open(sessionID, blockSize);
|
||||
initBytestream.setFrom(initiatorJID);
|
||||
|
@ -512,7 +507,7 @@ public class InBandBytestreamSessionTest extends InitExtensions {
|
|||
}
|
||||
|
||||
byte[] bytes = new byte[3 * blockSize];
|
||||
int read = 0;
|
||||
int read;
|
||||
read = inputStream.read(bytes, 0, blockSize);
|
||||
assertEquals(blockSize, read);
|
||||
read = inputStream.read(bytes, 10, blockSize);
|
||||
|
|
|
@ -50,7 +50,6 @@ public class InitiationListenerTest {
|
|||
|
||||
private static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
|
||||
private static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
|
||||
private static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
|
||||
private static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
|
||||
private static final String proxyAddress = "127.0.0.1";
|
||||
private static final String sessionID = "session_id";
|
||||
|
@ -225,6 +224,7 @@ public class InitiationListenerTest {
|
|||
*
|
||||
* @throws Exception should not happen
|
||||
*/
|
||||
@SuppressWarnings("UnusedVariable")
|
||||
@Test
|
||||
public void shouldInvokeAllRequestsListenerIfUserListenerExists() throws Exception {
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ public class EntityCapsManagerTest extends InitExtensions {
|
|||
assertTrue(di.containsDuplicateIdentities());
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedVariable")
|
||||
private static void testSimpleDirectoryCache(StringEncoder<String> stringEncoder) throws IOException {
|
||||
|
||||
EntityCapsPersistentCache cache = new SimpleDirectoryPersistentCache(createTempDirectory());
|
||||
|
|
|
@ -46,6 +46,7 @@ public class JingleUtilTest extends SmackTestSuite {
|
|||
jutil = new JingleUtil(connection);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedVariable")
|
||||
@Test
|
||||
public void sessionInitiateTest() throws XmppStringprepException {
|
||||
FullJid romeo = connection.getUser().asFullJidOrThrow();
|
||||
|
|
|
@ -53,7 +53,7 @@ public class MoodElementTest extends SmackTestSuite {
|
|||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void illegalArgumentsTest() {
|
||||
MoodElement element = new MoodElement(null, "Text alone is not allowed.");
|
||||
new MoodElement(null, "Text alone is not allowed.");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -78,6 +78,6 @@ public class MoodElementTest extends SmackTestSuite {
|
|||
"<unknown/>" +
|
||||
"</mood>";
|
||||
XmlPullParser parser = TestUtils.getParser(xml);
|
||||
MoodElement element = MoodProvider.INSTANCE.parse(parser);
|
||||
MoodProvider.INSTANCE.parse(parser);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue