1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-13 14:31:08 +01:00

Fix or suppress warnings

This commit is contained in:
Florian Schmaus 2014-04-03 23:00:36 +02:00
parent d8a5610d7b
commit ef43ba6322
14 changed files with 40 additions and 42 deletions

View file

@ -16,8 +16,9 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static junit.framework.Assert.*;
import static org.custommonkey.xmlunit.XMLAssert.*;
import static org.junit.Assert.assertEquals;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import java.util.Properties;

View file

@ -16,8 +16,9 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static junit.framework.Assert.*;
import static org.custommonkey.xmlunit.XMLAssert.*;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.util.Properties;

View file

@ -16,8 +16,9 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static junit.framework.Assert.*;
import static org.custommonkey.xmlunit.XMLAssert.*;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.*;
import java.util.Properties;

View file

@ -16,8 +16,8 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static junit.framework.Assert.*;
import static org.custommonkey.xmlunit.XMLAssert.*;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.junit.Assert.assertEquals;
import java.util.Properties;

View file

@ -192,6 +192,7 @@ public class Socks5ProxyTest {
Socks5Proxy proxy = Socks5Proxy.getSocks5Proxy();
proxy.start();
@SuppressWarnings("resource")
Socket socket = new Socket(proxy.getLocalAddresses().get(0), proxy.getPort());
OutputStream out = socket.getOutputStream();
@ -222,6 +223,7 @@ public class Socks5ProxyTest {
Socks5Proxy proxy = Socks5Proxy.getSocks5Proxy();
proxy.start();
@SuppressWarnings("resource")
Socket socket = new Socket(proxy.getLocalAddresses().get(0), proxy.getPort());
OutputStream out = socket.getOutputStream();
@ -252,6 +254,7 @@ public class Socks5ProxyTest {
Socks5Proxy proxy = Socks5Proxy.getSocks5Proxy();
proxy.start();
@SuppressWarnings("resource")
Socket socket = new Socket(proxy.getLocalAddresses().get(0), proxy.getPort());
OutputStream out = socket.getOutputStream();
@ -300,6 +303,7 @@ public class Socks5ProxyTest {
// add digest to allow connection
proxy.addTransfer(digest);
@SuppressWarnings("resource")
Socket socket = new Socket(proxy.getLocalAddresses().get(0), proxy.getPort());
OutputStream out = socket.getOutputStream();

View file

@ -20,25 +20,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.DummyConnection;
import org.jivesoftware.smack.ThreadedDummyConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.test.util.TestUtils;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smackx.iqversion.packet.Version;
import org.junit.Before;
import org.junit.Test;
public class VersionTest {
private DummyConnection dummyCon;
private ThreadedDummyConnection threadedCon;
@Before
public void setup() {
dummyCon = new DummyConnection();
threadedCon = new ThreadedDummyConnection();
}
@Test
public void checkProvider() throws Exception {
// @formatter:off

View file

@ -86,7 +86,8 @@ public class ConnectionDetachedPacketCollectorTest
catch (InterruptedException e)
{
}
Packet packet = collector.nextResult();
@SuppressWarnings("unused")
Packet packet = collector.nextResult();
// System.out.println(Thread.currentThread().getName() + " packet: " + packet);
}
}