Multile code improvements: squid:S1118, squid:S1068
This commit is contained in:
@@ -90,11 +90,6 @@ public class Socket extends Emitter {
|
||||
*/
|
||||
public static final String EVENT_TRANSPORT = "transport";
|
||||
|
||||
private static final Runnable noop = new Runnable() {
|
||||
@Override
|
||||
public void run() {}
|
||||
};
|
||||
|
||||
/**
|
||||
* The protocol version.
|
||||
*/
|
||||
|
||||
@@ -19,9 +19,6 @@ public class PollingXHR extends Polling {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PollingXHR.class.getName());
|
||||
|
||||
private Request sendXhr;
|
||||
private Request pollXhr;
|
||||
|
||||
public PollingXHR(Transport.Options opts) {
|
||||
super(opts);
|
||||
}
|
||||
@@ -92,7 +89,6 @@ public class PollingXHR extends Polling {
|
||||
}
|
||||
});
|
||||
req.create();
|
||||
this.sendXhr = req;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +125,6 @@ public class PollingXHR extends Polling {
|
||||
}
|
||||
});
|
||||
req.create();
|
||||
this.pollXhr = req;
|
||||
}
|
||||
|
||||
public static class Request extends Emitter {
|
||||
|
||||
@@ -8,13 +8,15 @@ import java.util.List;
|
||||
*
|
||||
* @see <a href="https://github.com/mathiasbynens/utf8.js">https://github.com/mathiasbynens/utf8.js</a>
|
||||
*/
|
||||
public class UTF8 {
|
||||
public final class UTF8 {
|
||||
|
||||
private static final String INVALID_CONTINUATION_BYTE = "Invalid continuation byte";
|
||||
private static int[] byteArray;
|
||||
private static int byteCount;
|
||||
private static int byteIndex;
|
||||
|
||||
private UTF8 () {}
|
||||
|
||||
public static String encode(String string) throws UTF8Exception {
|
||||
int[] codePoints = ucs2decode(string);
|
||||
int length = codePoints.length;
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
/**
|
||||
* A Java implementation of yeast. https://github.com/unshiftio/yeast
|
||||
*/
|
||||
public class Yeast {
|
||||
public final class Yeast {
|
||||
private static char[] alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".toCharArray();
|
||||
|
||||
private static int length = alphabet.length;
|
||||
@@ -19,6 +19,8 @@ public class Yeast {
|
||||
}
|
||||
}
|
||||
|
||||
private Yeast () {}
|
||||
|
||||
private static int seed = 0;
|
||||
|
||||
private static String prev;
|
||||
|
||||
Reference in New Issue
Block a user