squid:S00117 - Local variable and method parameter names should comply with a naming convention.

This commit is contained in:
George Kankava
2016-02-01 18:30:56 +04:00
parent 831203e617
commit 86307a13be
6 changed files with 30 additions and 30 deletions

View File

@@ -19,13 +19,13 @@ public class HandshakeData {
/*package*/ HandshakeData(JSONObject data) throws JSONException {
JSONArray upgrades = data.getJSONArray("upgrades");
int length = upgrades.length();
String[] _upgrades = new String[length];
String[] tempUpgrades = new String[length];
for (int i = 0; i < length; i ++) {
_upgrades[i] = upgrades.getString(i);
tempUpgrades[i] = upgrades.getString(i);
}
this.sid = data.getString("sid");
this.upgrades = _upgrades;
this.upgrades = tempUpgrades;
this.pingInterval = data.getLong("pingInterval");
this.pingTimeout = data.getLong("pingTimeout");
}

View File

@@ -128,8 +128,8 @@ abstract public class Polling extends Transport {
if (data instanceof String) {
@SuppressWarnings("unchecked")
Parser.DecodePayloadCallback<String> _callback = callback;
Parser.decodePayload((String)data, _callback);
Parser.DecodePayloadCallback<String> tempCallback = callback;
Parser.decodePayload((String)data, tempCallback);
} else if (data instanceof byte[]) {
Parser.decodePayload((byte[])data, callback);
}
@@ -203,19 +203,19 @@ abstract public class Polling extends Transport {
query.put(this.timestampParam, Yeast.yeast());
}
String _query = ParseQS.encode(query);
String derivedQuery = ParseQS.encode(query);
if (this.port > 0 && (("https".equals(schema) && this.port != 443)
|| ("http".equals(schema) && this.port != 80))) {
port = ":" + this.port;
}
if (_query.length() > 0) {
_query = "?" + _query;
if (derivedQuery.length() > 0) {
derivedQuery = "?" + derivedQuery;
}
boolean ipv6 = this.hostname.contains(":");
return schema + "://" + (ipv6 ? "[" + this.hostname + "]" : this.hostname) + port + this.path + _query;
return schema + "://" + (ipv6 ? "[" + this.hostname + "]" : this.hostname) + port + this.path + derivedQuery;
}
abstract protected void doWrite(byte[] data, Runnable fn);

View File

@@ -281,9 +281,9 @@ public class PollingXHR extends Polling {
int len = 0;
byte[] buffer = new byte[1024];
while ((len = input.read(buffer)) > 0) {
byte[] _buffer = new byte[len];
System.arraycopy(buffer, 0, _buffer, 0, len);
buffers.add(_buffer);
byte[] tempBuffer = new byte[len];
System.arraycopy(buffer, 0, tempBuffer, 0, len);
buffers.add(tempBuffer);
capacity += len;
}
ByteBuffer data = ByteBuffer.allocate(capacity);

View File

@@ -221,12 +221,12 @@ public class WebSocket extends Transport {
query.put(this.timestampParam, Yeast.yeast());
}
String _query = ParseQS.encode(query);
if (_query.length() > 0) {
_query = "?" + _query;
String derivedQuery = ParseQS.encode(query);
if (derivedQuery.length() > 0) {
derivedQuery = "?" + derivedQuery;
}
boolean ipv6 = this.hostname.contains(":");
return schema + "://" + (ipv6 ? "[" + this.hostname + "]" : this.hostname) + port + this.path + _query;
return schema + "://" + (ipv6 ? "[" + this.hostname + "]" : this.hostname) + port + this.path + derivedQuery;
}
}