I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 500f6cf8 authored by zzz's avatar zzz
Browse files

use context field

parent a23ea5e5
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ import java.util.ArrayList; ...@@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocket;
import net.i2p.data.DataFormatException; import net.i2p.data.DataFormatException;
import net.i2p.data.Destination; import net.i2p.data.Destination;
...@@ -110,7 +109,7 @@ public class I2PTunnelClient extends I2PTunnelClientBase { ...@@ -110,7 +109,7 @@ public class I2PTunnelClient extends I2PTunnelClientBase {
} }
if (size == 1) // skip the rand in the most common case if (size == 1) // skip the rand in the most common case
return dests.get(0); return dests.get(0);
int index = I2PAppContext.getGlobalContext().random().nextInt(size); int index = _context.random().nextInt(size);
return dests.get(index); return dests.get(index);
} }
} }
...@@ -146,7 +146,7 @@ public class I2PTunnelConnectClient extends I2PTunnelClientBase implements Runna ...@@ -146,7 +146,7 @@ public class I2PTunnelConnectClient extends I2PTunnelClientBase implements Runna
int size = _proxyList.size(); int size = _proxyList.size();
if (size <= 0) if (size <= 0)
return null; return null;
int index = I2PAppContext.getGlobalContext().random().nextInt(size); int index = _context.random().nextInt(size);
return _proxyList.get(index); return _proxyList.get(index);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment