forked from I2P_Developers/i2p.i2p
lint
This commit is contained in:
@@ -842,7 +842,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
|
|||||||
if (_log.shouldLog(Log.INFO))
|
if (_log.shouldLog(Log.INFO))
|
||||||
_log.info("Sending error " + msg + " to: " + nInfo);
|
_log.info("Sending error " + msg + " to: " + nInfo);
|
||||||
Map<String, Object> map = new HashMap<String, Object>(4);
|
Map<String, Object> map = new HashMap<String, Object>(4);
|
||||||
List<Object> error = new ArrayList(2);
|
List<Object> error = new ArrayList<Object>(2);
|
||||||
error.add(Integer.valueOf(err));
|
error.add(Integer.valueOf(err));
|
||||||
error.add(msg);
|
error.add(msg);
|
||||||
map.put("e", error);
|
map.put("e", error);
|
||||||
@@ -1294,7 +1294,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
|
|||||||
} else {
|
} else {
|
||||||
List<byte[]> hashes;
|
List<byte[]> hashes;
|
||||||
if (peers.isEmpty()) {
|
if (peers.isEmpty()) {
|
||||||
hashes = Collections.EMPTY_LIST;
|
hashes = Collections.emptyList();
|
||||||
} else {
|
} else {
|
||||||
hashes = new ArrayList<byte[]>(peers.size());
|
hashes = new ArrayList<byte[]>(peers.size());
|
||||||
for (Hash peer : peers) {
|
for (Hash peer : peers) {
|
||||||
|
@@ -1186,7 +1186,7 @@ public class POP3MailBox implements NewMailListener {
|
|||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
return null;
|
return null;
|
||||||
synchronized( synchronizer ) {
|
synchronized( synchronizer ) {
|
||||||
return new ArrayList(uidlToID.keySet());
|
return new ArrayList<String>(uidlToID.keySet());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ public class Ed25519LittleEndianEncoding extends Encoding {
|
|||||||
|
|
||||||
// Step 1:
|
// Step 1:
|
||||||
// Calculate q
|
// Calculate q
|
||||||
q = (19 * h9 + (((int) 1) << 24)) >> 25;
|
q = (19 * h9 + (1 << 24)) >> 25;
|
||||||
q = (h0 + q) >> 26;
|
q = (h0 + q) >> 26;
|
||||||
q = (h1 + q) >> 25;
|
q = (h1 + q) >> 25;
|
||||||
q = (h2 + q) >> 26;
|
q = (h2 + q) >> 26;
|
||||||
|
@@ -337,7 +337,7 @@ public class I2PSSLSocketFactory {
|
|||||||
return enabledArr;
|
return enabledArr;
|
||||||
}
|
}
|
||||||
if (log.shouldLog(Log.DEBUG)) {
|
if (log.shouldLog(Log.DEBUG)) {
|
||||||
List<String> foo = new ArrayList(selected);
|
List<String> foo = new ArrayList<String>(selected);
|
||||||
Collections.sort(foo);
|
Collections.sort(foo);
|
||||||
log.debug("Selected: " + foo);
|
log.debug("Selected: " + foo);
|
||||||
}
|
}
|
||||||
|
@@ -117,7 +117,7 @@ public class Blocklist {
|
|||||||
public void startup() {
|
public void startup() {
|
||||||
if (! _context.getBooleanPropertyDefaultTrue(PROP_BLOCKLIST_ENABLED))
|
if (! _context.getBooleanPropertyDefaultTrue(PROP_BLOCKLIST_ENABLED))
|
||||||
return;
|
return;
|
||||||
List<File> files = new ArrayList(3);
|
List<File> files = new ArrayList<File>(3);
|
||||||
|
|
||||||
// install dir
|
// install dir
|
||||||
File blFile = new File(_context.getBaseDir(), BLOCKLIST_FILE_DEFAULT);
|
File blFile = new File(_context.getBaseDir(), BLOCKLIST_FILE_DEFAULT);
|
||||||
|
@@ -78,7 +78,7 @@ public class PublishLocalRouterInfoJob extends JobImpl {
|
|||||||
_log.debug("Old routerInfo contains " + oldRI.getAddresses().size()
|
_log.debug("Old routerInfo contains " + oldRI.getAddresses().size()
|
||||||
+ " addresses and " + oldRI.getOptionsMap().size() + " options");
|
+ " addresses and " + oldRI.getOptionsMap().size() + " options");
|
||||||
try {
|
try {
|
||||||
List<RouterAddress> oldAddrs = new ArrayList(oldRI.getAddresses());
|
List<RouterAddress> oldAddrs = new ArrayList<RouterAddress>(oldRI.getAddresses());
|
||||||
List<RouterAddress> newAddrs = getContext().commSystem().createAddresses();
|
List<RouterAddress> newAddrs = getContext().commSystem().createAddresses();
|
||||||
int count = _runCount.incrementAndGet();
|
int count = _runCount.incrementAndGet();
|
||||||
if (_notFirstTime && (count % 4) != 0 && oldAddrs.size() == newAddrs.size()) {
|
if (_notFirstTime && (count % 4) != 0 && oldAddrs.size() == newAddrs.size()) {
|
||||||
|
@@ -63,6 +63,7 @@ class PumpedTunnelGateway extends TunnelGateway {
|
|||||||
super(context, preprocessor, sender, receiver);
|
super(context, preprocessor, sender, receiver);
|
||||||
if (getClass() == PumpedTunnelGateway.class) {
|
if (getClass() == PumpedTunnelGateway.class) {
|
||||||
// Unbounded priority queue for outbound
|
// Unbounded priority queue for outbound
|
||||||
|
// fixme lint PendingGatewayMessage is not a CDPQEntry
|
||||||
_prequeue = new CoDelPriorityBlockingQueue(context, "OBGW", INITIAL_OB_QUEUE);
|
_prequeue = new CoDelPriorityBlockingQueue(context, "OBGW", INITIAL_OB_QUEUE);
|
||||||
_nextHop = receiver.getSendTo();
|
_nextHop = receiver.getSendTo();
|
||||||
_isInbound = false;
|
_isInbound = false;
|
||||||
|
Reference in New Issue
Block a user