mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-11 01:59:38 +02:00
Code cleanup: unused imports, values, blocks, etc.
This commit is contained in:
parent
6dd64da930
commit
2e11470aee
26 changed files with 47 additions and 45 deletions
|
@ -2,10 +2,6 @@ package org.jivesoftware.smack.initializer;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -21,9 +21,12 @@ import java.io.IOException;
|
|||
*
|
||||
* @author Atul Aggarwal
|
||||
*/
|
||||
public class ProxyException
|
||||
extends IOException
|
||||
{
|
||||
public class ProxyException extends IOException {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ProxyException(ProxyInfo.ProxyType type, String ex, Throwable cause)
|
||||
{
|
||||
super("Proxy Exception " + type.toString() + " : "+ex+", "+cause);
|
||||
|
|
|
@ -74,8 +74,7 @@ public class Socks4ProxySocketFactory
|
|||
String proxy_host = proxy.getProxyAddress();
|
||||
int proxy_port = proxy.getProxyPort();
|
||||
String user = proxy.getProxyUsername();
|
||||
String passwd = proxy.getProxyPassword();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
socket=new Socket(proxy_host, proxy_port);
|
||||
|
|
|
@ -461,7 +461,6 @@ public class Base64
|
|||
|
||||
// Isolate options
|
||||
int gzip = (options & GZIP);
|
||||
int dontBreakLines = (options & DONT_BREAK_LINES);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1220,9 +1219,8 @@ public class Base64
|
|||
private int numSigBytes; // Number of meaningful bytes in the buffer
|
||||
private int lineLength;
|
||||
private boolean breakLines; // Break lines at less than 80 characters
|
||||
private int options; // Record options used to create the stream.
|
||||
private byte[] alphabet; // Local copies to avoid extra method calls
|
||||
private byte[] decodabet; // Local copies to avoid extra method calls
|
||||
private int options; // Record options used to create the stream.
|
||||
private byte[] decodabet; // Local copies to avoid extra method calls
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1267,9 +1265,8 @@ public class Base64
|
|||
this.buffer = new byte[ bufferLength ];
|
||||
this.position = -1;
|
||||
this.lineLength = 0;
|
||||
this.options = options; // Record for later, mostly to determine which alphabet to use
|
||||
this.alphabet = getAlphabet(options);
|
||||
this.decodabet = getDecodabet(options);
|
||||
this.options = options; // Record for later, mostly to determine which alphabet to use
|
||||
this.decodabet = getDecodabet(options);
|
||||
} // end constructor
|
||||
|
||||
/**
|
||||
|
@ -1457,9 +1454,8 @@ public class Base64
|
|||
private boolean breakLines;
|
||||
private byte[] b4; // Scratch used in a few places
|
||||
private boolean suspendEncoding;
|
||||
private int options; // Record for later
|
||||
private byte[] alphabet; // Local copies to avoid extra method calls
|
||||
private byte[] decodabet; // Local copies to avoid extra method calls
|
||||
private int options; // Record for later
|
||||
private byte[] decodabet; // Local copies to avoid extra method calls
|
||||
|
||||
/**
|
||||
* Constructs a {@link Base64.OutputStream} in ENCODE mode.
|
||||
|
@ -1504,9 +1500,8 @@ public class Base64
|
|||
this.lineLength = 0;
|
||||
this.suspendEncoding = false;
|
||||
this.b4 = new byte[4];
|
||||
this.options = options;
|
||||
this.alphabet = getAlphabet(options);
|
||||
this.decodabet = getDecodabet(options);
|
||||
this.options = options;
|
||||
this.decodabet = getDecodabet(options);
|
||||
} // end constructor
|
||||
|
||||
|
||||
|
|
|
@ -253,6 +253,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
return map.containsKey(key);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void putAll(Map<? extends K, ? extends V> map) {
|
||||
for (Entry<? extends K, ? extends V> entry : map.entrySet()) {
|
||||
V value = entry.getValue();
|
||||
|
@ -273,6 +274,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
deleteExpiredEntries();
|
||||
|
||||
//noinspection unchecked
|
||||
@SuppressWarnings("unchecked")
|
||||
CacheObject<V> cacheObject = new CacheObject<V>((V) value);
|
||||
|
||||
return map.containsValue(cacheObject);
|
||||
|
@ -454,6 +456,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
/**
|
||||
* A count of the number of times the object has been read from cache.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public int readCount = 0;
|
||||
|
||||
/**
|
||||
|
@ -509,6 +512,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
*
|
||||
* @return the first element of the list.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public LinkedListNode getFirst() {
|
||||
LinkedListNode node = head.next;
|
||||
if (node == head) {
|
||||
|
@ -565,6 +569,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
* @param object the object to add to the end of the list.
|
||||
* @return the node created to wrap the object.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public LinkedListNode addLast(Object object) {
|
||||
LinkedListNode node = new LinkedListNode(object, head, head.previous);
|
||||
node.previous.next = node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue