我希望代码在行结束时重新使用代理,当行结束时给我这个错误
@Override
public void run()
{
try
{
String proxy = null;
while (true)
{
proxyCount++;
if(proxyCount >= proxyList.size() - 1)
{
proxyCount = 0;
}
proxy = proxyList.get(proxyCount);
if (!deadProxy.contains(proxy))
{
break;
}
}
String[] split = proxy.split(":");
String proxyHost = split[0];
int proxyPort = Integer.parseInt(split[1]);
这是错误
java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at PingDeath$2.run(PingDeath.java:142)
at java.lang.Thread.run(Unknown Source)