This commit is contained in:
zzz
2015-03-13 17:26:15 +00:00
parent 521eb2d8f8
commit 0289cefd8d
7 changed files with 8 additions and 7 deletions

View File

@@ -842,7 +842,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
if (_log.shouldLog(Log.INFO))
_log.info("Sending error " + msg + " to: " + nInfo);
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(msg);
map.put("e", error);
@@ -1294,7 +1294,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
} else {
List<byte[]> hashes;
if (peers.isEmpty()) {
hashes = Collections.EMPTY_LIST;
hashes = Collections.emptyList();
} else {
hashes = new ArrayList<byte[]>(peers.size());
for (Hash peer : peers) {

View File

@@ -1186,7 +1186,7 @@ public class POP3MailBox implements NewMailListener {
if (!isConnected())
return null;
synchronized( synchronizer ) {
return new ArrayList(uidlToID.keySet());
return new ArrayList<String>(uidlToID.keySet());
}
}

View File

@@ -70,7 +70,7 @@ public class Ed25519LittleEndianEncoding extends Encoding {
// Step 1:
// Calculate q
q = (19 * h9 + (((int) 1) << 24)) >> 25;
q = (19 * h9 + (1 << 24)) >> 25;
q = (h0 + q) >> 26;
q = (h1 + q) >> 25;
q = (h2 + q) >> 26;

View File

@@ -337,7 +337,7 @@ public class I2PSSLSocketFactory {
return enabledArr;
}
if (log.shouldLog(Log.DEBUG)) {
List<String> foo = new ArrayList(selected);
List<String> foo = new ArrayList<String>(selected);
Collections.sort(foo);
log.debug("Selected: " + foo);
}

View File

@@ -117,7 +117,7 @@ public class Blocklist {
public void startup() {
if (! _context.getBooleanPropertyDefaultTrue(PROP_BLOCKLIST_ENABLED))
return;
List<File> files = new ArrayList(3);
List<File> files = new ArrayList<File>(3);
// install dir
File blFile = new File(_context.getBaseDir(), BLOCKLIST_FILE_DEFAULT);

View File

@@ -78,7 +78,7 @@ public class PublishLocalRouterInfoJob extends JobImpl {
_log.debug("Old routerInfo contains " + oldRI.getAddresses().size()
+ " addresses and " + oldRI.getOptionsMap().size() + " options");
try {
List<RouterAddress> oldAddrs = new ArrayList(oldRI.getAddresses());
List<RouterAddress> oldAddrs = new ArrayList<RouterAddress>(oldRI.getAddresses());
List<RouterAddress> newAddrs = getContext().commSystem().createAddresses();
int count = _runCount.incrementAndGet();
if (_notFirstTime && (count % 4) != 0 && oldAddrs.size() == newAddrs.size()) {

View File

@@ -63,6 +63,7 @@ class PumpedTunnelGateway extends TunnelGateway {
super(context, preprocessor, sender, receiver);
if (getClass() == PumpedTunnelGateway.class) {
// Unbounded priority queue for outbound
// fixme lint PendingGatewayMessage is not a CDPQEntry
_prequeue = new CoDelPriorityBlockingQueue(context, "OBGW", INITIAL_OB_QUEUE);
_nextHop = receiver.getSendTo();
_isInbound = false;