try {
String lastLocation = null;
for (String location : aegSplit.getLocations()) {
lastLocation = location;
if (map.containsKey(location)) {
AegCombinedSplit temp = map.get(location);
cntAdded++;
temp.getSplits().add(aegSplit);
if (temp.getLength() >= MAX_SPLIT_SIZE) {
combinedSplits.add(temp);
map.remove(location);
}
continue top;
}
}
cntAdded++;
AegCombinedSplit temp = new AegCombinedSplit(aegSplit);
map.put(lastLocation, temp);
} catch (InterruptedException e) {
throw new IOException(e);
}