Commit b9293842 authored by Matthias Betz's avatar Matthias Betz
Browse files

prevent errors to be written multiple times in qualityADE

parent 6010fc7c
Pipeline #1995 canceled with stage
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
package de.hft.stuttgart.citydoctor2.utils; package de.hft.stuttgart.citydoctor2.utils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import org.citygml4j.model.citygml.ade.ADEComponent; import org.citygml4j.model.citygml.ade.ADEComponent;
import org.citygml4j.model.citygml.core.CityModel; import org.citygml4j.model.citygml.core.CityModel;
...@@ -65,7 +67,8 @@ public class QualityADEUtils { ...@@ -65,7 +67,8 @@ public class QualityADEUtils {
res.setResult(ResultType.OK); res.setResult(ResultType.OK);
} else { } else {
res.setResult(ResultType.ERROR); res.setResult(ResultType.ERROR);
for (CheckError e : errors) { Set<CheckError> errorSet = new HashSet<>(errors);
for (CheckError e : errorSet) {
e.convertToQualityAdeDatastructure().ifPresent(res.getErrors()::add); e.convertToQualityAdeDatastructure().ifPresent(res.getErrors()::add);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment