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

Code cleanup: Fix some warnings

This commit is contained in:
Florian Schmaus 2015-09-23 23:21:37 +02:00
parent 9c772add93
commit 9c694a0a75
7 changed files with 10 additions and 21 deletions

View file

@ -37,7 +37,7 @@ public class AMPExtensionTest {
private InputStream INCORRECT_RECEIVING_STANZA_STREAM;
@Before
public void setUp() throws IOException {
public void setUp() {
CORRECT_SENDING_STANZA_STREAM = getClass().getResourceAsStream("correct_stanza_test.xml");
INCORRECT_RECEIVING_STANZA_STREAM = getClass().getResourceAsStream("incorrect_stanza_test.xml");
}
@ -97,7 +97,7 @@ public class AMPExtensionTest {
}
private String toString(InputStream stream) throws IOException {
private static String toString(InputStream stream) throws IOException {
byte[] data = new byte[stream.available()];
stream.read(data);
stream.close();

View file

@ -214,7 +214,7 @@ public class Socks5ClientForInitiatorTest {
socks5Proxy.start();
StreamHost streamHost = new StreamHost(proxyJID,
socks5Proxy.getAddress(), socks5Proxy.getPort());
Socks5TestProxy.getAddress(), socks5Proxy.getPort());
// create digest to get the socket opened by target
String digest = Socks5Utils.createDigest(sessionID, initiatorJID, targetJID);
@ -267,7 +267,7 @@ public class Socks5ClientForInitiatorTest {
socks5Proxy.start();
StreamHost streamHost = new StreamHost(proxyJID,
socks5Proxy.getAddress(), socks5Proxy.getPort());
Socks5TestProxy.getAddress(), socks5Proxy.getPort());
// create digest to get the socket opened by target
String digest = Socks5Utils.createDigest(sessionID, initiatorJID, targetJID);

View file

@ -146,7 +146,7 @@ public final class Socks5TestProxy {
*
* @return the host address of the local SOCKS5 proxy server
*/
public String getAddress() {
public static String getAddress() {
try {
return InetAddress.getLocalHost().getHostAddress();
}

View file

@ -33,7 +33,6 @@ import org.jivesoftware.smackx.pubsub.packet.PubSub;
import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.junit.Assert;
import org.junit.Test;
import org.jxmpp.stringprep.XmppStringprepException;
/**
* Configure form test.
@ -78,7 +77,7 @@ public class ConfigureFormTest
}
@Test (expected=SmackException.class)
public void getConfigFormWithTimeout() throws XMPPException, SmackException, InterruptedException, XmppStringprepException
public void getConfigFormWithTimeout() throws XMPPException, SmackException, InterruptedException
{
ThreadedDummyConnection con = new ThreadedDummyConnection();
PubSubManager mgr = new PubSubManager(con, PubSubManagerTest.DUMMY_PUBSUB_SERVICE);