int s, sSize = sequences.size();
SequenceI[] sarray = new SequenceI[sSize];
this.sequences = sarray;
-
+ try {
for (s = 0; s < sSize; s++)
{
sarray[s] = (SequenceI) sequences.elementAt(s);
maxLength = sarray[s].getLength();
}
}
+ } catch (ArrayIndexOutOfBoundsException ex)
+ {
+ // bail - another thread has modified the sequence array, so the current calculation is probably invalid.
+ this.sequences=new SequenceI[0];
+ maxLength=0;
+ }
}
/**
}
}
- total[i - start] = resultHash;
+ if (total.length>0) {
+ total[i - start] = resultHash;
+ }
}
}