clarify the nextInt/nextLong boundaries (thanks oOo)

This commit is contained in:
jrandom
2004-08-29 22:42:21 +00:00
committed by zzz
parent 53c7ff14df
commit 07ef3582f7
4 changed files with 7 additions and 9 deletions

View File

@ -138,8 +138,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
return null;
}
int index = I2PAppContext.getGlobalContext().random().nextInt(size);
if (index >= size) index = size - 1;
if (index < 0) return null;
String proxy = (String)proxyList.get(index);
return proxy;
}