i2psnark: type arguments, unused imports

This commit is contained in:
str4d
2013-11-21 12:43:45 +00:00
parent 2f4765665d
commit c32b451733
27 changed files with 158 additions and 184 deletions

View File

@@ -18,7 +18,7 @@ class Piece implements Comparable {
public Piece(int id) {
this.id = id;
this.peers = new HashSet(I2PSnarkUtil.MAX_CONNECTIONS / 2);
this.peers = new HashSet<PeerID>(I2PSnarkUtil.MAX_CONNECTIONS / 2);
// defer creating requests to save memory
}
@@ -82,7 +82,7 @@ class Piece implements Comparable {
public void setRequested(Peer peer, boolean requested) {
if (requested) {
if (this.requests == null)
this.requests = new HashSet(2);
this.requests = new HashSet<PeerID>(2);
this.requests.add(peer.getPeerID());
} else {
if (this.requests != null)