Fix group_by concurrent modification exception
Change-Id: I98e824067b7d46837812b687708b13144620947b Closes-Bug: #1581563
This commit is contained in:
parent
22d360b805
commit
7365487c76
|
@ -23,6 +23,7 @@ import java.io.IOException;
|
|||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -205,9 +206,12 @@ public class MeasurementVerticaRepoImpl implements MeasurementRepo {
|
|||
}
|
||||
|
||||
// clean up any empty measurements
|
||||
for (Map.Entry<String, Measurements> entry : results.entrySet()) {
|
||||
Iterator<Map.Entry<String, Measurements>> it = results.entrySet().iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
Map.Entry<String, Measurements> entry = it.next();
|
||||
if (entry.getValue().getMeasurements().size() == 0) {
|
||||
results.remove(entry.getKey());
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue