upgradeThreads[i] = thread;
}
// wait for upgrade to be done
for (UpgradeThread thread : upgradeThreads) {
try {
thread.join();
} catch (InterruptedException e) {
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
}
}
// check for errors