mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 05:51:08 +01:00
Xlint all the things
and fix all warnings.
This commit is contained in:
parent
7c5428ab0e
commit
f546d28ad8
50 changed files with 142 additions and 122 deletions
|
|
@ -482,7 +482,7 @@ public class InBandBytestreamManager implements BytestreamManager {
|
|||
*
|
||||
* @return a new unique session ID
|
||||
*/
|
||||
private String getNextSessionID() {
|
||||
private static String getNextSessionID() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(SESSION_ID_PREFIX);
|
||||
buffer.append(Math.abs(randomGenerator.nextLong()));
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
}
|
||||
|
||||
// return byte and increment buffer pointer
|
||||
return ((int) buffer[bufferPointer++]) & 0xff;
|
||||
return buffer[bufferPointer++] & 0xff;
|
||||
}
|
||||
|
||||
public synchronized int read(byte[] b, int off, int len) throws IOException {
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
|||
* @param proxy the proxy to query
|
||||
* @return IQ packet to query a SOCKS5 proxy its network settings
|
||||
*/
|
||||
private Bytestream createStreamHostRequest(Jid proxy) {
|
||||
private static Bytestream createStreamHostRequest(Jid proxy) {
|
||||
Bytestream request = new Bytestream();
|
||||
request.setType(IQ.Type.get);
|
||||
request.setTo(proxy);
|
||||
|
|
@ -681,7 +681,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
|||
* @param streamHosts a list of SOCKS5 proxies the target should connect to
|
||||
* @return a SOCKS5 Bytestream initialization request packet
|
||||
*/
|
||||
private Bytestream createBytestreamInitiation(String sessionID, Jid targetJID,
|
||||
private static Bytestream createBytestreamInitiation(String sessionID, Jid targetJID,
|
||||
List<StreamHost> streamHosts) {
|
||||
Bytestream initiation = new Bytestream(sessionID);
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
|||
*
|
||||
* @return a new unique session ID
|
||||
*/
|
||||
private String getNextSessionID() {
|
||||
private static String getNextSessionID() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(SESSION_ID_PREFIX);
|
||||
buffer.append(Math.abs(randomGenerator.nextLong()));
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
*
|
||||
* @param address the address the connection failure counter should be increased
|
||||
*/
|
||||
private void incrementConnectionFailures(String address) {
|
||||
private static void incrementConnectionFailures(String address) {
|
||||
Integer count = ADDRESS_BLACKLIST.get(address);
|
||||
ADDRESS_BLACKLIST.put(address, count == null ? 1 : count + 1);
|
||||
}
|
||||
|
|
@ -320,7 +320,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
* @param address the address
|
||||
* @return number of connection failures
|
||||
*/
|
||||
private int getConnectionFailures(String address) {
|
||||
private static int getConnectionFailures(String address) {
|
||||
Integer count = ADDRESS_BLACKLIST.get(address);
|
||||
return count != null ? count : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue