Changeset 552dd18


Ignore:
Timestamp:
Nov 22, 2013 4:18:26 AM (7 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
5fa0376f
Parents:
57144f3e
Message:

streaming: type arguments, unused imports

Location:
apps/streaming/java
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • apps/streaming/java/src/net/i2p/client/streaming/Connection.java

    r57144f3e r552dd18  
    1616import net.i2p.data.Destination;
    1717import net.i2p.util.Log;
    18 import net.i2p.util.SimpleScheduler;
    1918import net.i2p.util.SimpleTimer;
    2019import net.i2p.util.SimpleTimer2;
     
    126125        _outputStream = new MessageOutputStream(_context, timer, _receiver, (opts == null ? Packet.MAX_PAYLOAD_SIZE : opts.getMaxMessageSize()));
    127126        _timer = timer;
    128         _outboundPackets = new TreeMap();
     127        _outboundPackets = new TreeMap<Long, PacketLocal>();
    129128        if (opts != null) {
    130129            _localPort = opts.getLocalPort();
     
    470469                    if (!nacked) { // aka ACKed
    471470                        if (acked == null)
    472                             acked = new ArrayList(8);
     471                            acked = new ArrayList<PacketLocal>(8);
    473472                        PacketLocal ackedPacket = e.getValue();
    474473                        ackedPacket.ackReceived();
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionHandler.java

    r57144f3e r552dd18  
    77import net.i2p.data.Destination;
    88import net.i2p.util.Log;
    9 import net.i2p.util.SimpleScheduler;
    109import net.i2p.util.SimpleTimer;
    1110
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java

    r57144f3e r552dd18  
    768768        Set<Hash> accessList, blackList;
    769769        if (accessListEnabled)
    770             accessList = new HashSet();
     770            accessList = new HashSet<Hash>();
    771771        else
    772             accessList = Collections.EMPTY_SET;
     772            accessList = Collections.emptySet();
    773773        if (blackListEnabled)
    774             blackList = new HashSet();
     774            blackList = new HashSet<Hash>();
    775775        else
    776             blackList = Collections.EMPTY_SET;
     776            blackList = Collections.emptySet();
    777777        if (accessListEnabled || blackListEnabled) {
    778778            String hashes = opts.getProperty(PROP_ACCESS_LIST);
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionPacketHandler.java

    r57144f3e r552dd18  
    88import net.i2p.data.Destination;
    99import net.i2p.util.Log;
    10 import net.i2p.util.SimpleScheduler;
    1110import net.i2p.util.SimpleTimer;
    1211
  • apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java

    r57144f3e r552dd18  
    99import net.i2p.client.I2PSessionException;
    1010import net.i2p.client.I2PSessionMuxedListener;
     11import net.i2p.client.streaming.I2PSocketManager.DisconnectListener;
    1112import net.i2p.util.Log;
    1213
     
    2627        _manager = mgr;
    2728        _context = ctx;
    28         _listeners = new CopyOnWriteArraySet();
     29        _listeners = new CopyOnWriteArraySet<DisconnectListener>();
    2930        _log = ctx.logManager().getLog(MessageHandler.class);
    3031        _context.statManager().createRateStat("stream.packetReceiveFailure", "When do we fail to decrypt or otherwise receive a packet sent to us?", "Stream", new long[] { 60*60*1000, 24*60*60*1000 });
  • apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java

    r57144f3e r552dd18  
    55import java.io.InterruptedIOException;
    66import java.util.ArrayList;
    7 import java.util.Arrays;
    87import java.util.HashMap;
    98import java.util.List;
     
    6463    public MessageInputStream(I2PAppContext ctx) {
    6564        _log = ctx.logManager().getLog(MessageInputStream.class);
    66         _readyDataBlocks = new ArrayList(4);
     65        _readyDataBlocks = new ArrayList<ByteArray>(4);
    6766        _highestReadyBlockId = -1;
    6867        _highestBlockId = -1;
    6968        _readTimeout = -1;
    70         _notYetReadyBlocks = new HashMap(4);
     69        _notYetReadyBlocks = new HashMap<Long, ByteArray>(4);
    7170        _dataLock = new Object();
    7271        //_cache = ByteCache.getInstance(128, Packet.MAX_PAYLOAD_SIZE);
     
    111110            } else {
    112111                if (ids == null)
    113                     ids = new ArrayList(4);
     112                    ids = new ArrayList<Long>(4);
    114113                ids.add(l);
    115114            }
  • apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java

    r57144f3e r552dd18  
    33import java.text.SimpleDateFormat;
    44import java.util.Date;
    5 import java.util.Set;
    6 
    75import net.i2p.I2PAppContext;
    86import net.i2p.I2PException;
  • apps/streaming/java/src/net/i2p/client/streaming/PcapWriter.java

    r57144f3e r552dd18  
    1010import net.i2p.data.DataFormatException;
    1111import net.i2p.data.DataHelper;
    12 import net.i2p.data.Hash;
    1312
    1413/**
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java

    r57144f3e r552dd18  
    3737    }
    3838   
    39     private List createSchedulers() {
    40         List rv = new ArrayList(8);
     39    private List<TaskScheduler> createSchedulers() {
     40        List<TaskScheduler> rv = new ArrayList<TaskScheduler>(8);
    4141        rv.add(new SchedulerHardDisconnected(_context));
    4242        rv.add(new SchedulerPreconnect(_context));
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerImpl.java

    r57144f3e r552dd18  
    33import net.i2p.I2PAppContext;
    44import net.i2p.util.Log;
    5 import net.i2p.util.SimpleScheduler;
    65
    76/**
  • apps/streaming/java/test/junit/net/i2p/client/streaming/ConnectInactivityTest.java

    r57144f3e r552dd18  
    77
    88import net.i2p.I2PAppContext;
    9 import net.i2p.client.I2PClient;
    109import net.i2p.client.I2PSession;
    1110import net.i2p.util.Log;
  • apps/streaming/java/test/junit/net/i2p/client/streaming/ConnectTest.java

    r57144f3e r552dd18  
    77
    88import net.i2p.I2PAppContext;
    9 import net.i2p.client.I2PClient;
    109import net.i2p.client.I2PSession;
    1110import net.i2p.util.Log;
  • apps/streaming/java/test/junit/net/i2p/client/streaming/ConnectTimeoutTest.java

    r57144f3e r552dd18  
    77
    88import net.i2p.I2PAppContext;
    9 import net.i2p.client.I2PClient;
    109import net.i2p.client.I2PClientFactory;
    1110import net.i2p.client.I2PSession;
  • apps/streaming/java/test/junit/net/i2p/client/streaming/EchoLargeTest.java

    r57144f3e r552dd18  
    1010import net.i2p.I2PAppContext;
    1111import net.i2p.client.I2PSession;
    12 import net.i2p.data.Base64;
    1312import net.i2p.util.Log;
    1413
  • apps/streaming/java/test/junit/net/i2p/client/streaming/MessageInputStreamTest.java

    r57144f3e r552dd18  
    6060       
    6161        MessageInputStream in = new MessageInputStream(_context);
    62         ArrayList order = new ArrayList(32);
     62        ArrayList<Integer> order = new ArrayList<Integer>(32);
    6363        for (int i = 0; i < orig.length / 1024; i++)
    6464            order.add(new Integer(i));
     
    9393        MessageInputStream in = new MessageInputStream(_context);
    9494        for (int n = 0; n < 3; n++) {
    95             ArrayList order = new ArrayList(32);
     95            ArrayList<Integer> order = new ArrayList<Integer>(32);
    9696            for (int i = 0; i < orig.length / 1024; i++)
    9797                order.add(new Integer(i));
     
    127127       
    128128        MessageInputStream in = new MessageInputStream(_context);
    129         ArrayList order = new ArrayList(32);
     129        ArrayList<Integer> order = new ArrayList<Integer>(32);
    130130        for (int i = 0; i < orig.length / 1024; i++)
    131131            order.add(new Integer(i));
Note: See TracChangeset for help on using the changeset viewer.