Commit 55f76a2c authored by Matthias Betz's avatar Matthias Betz
Browse files

don't remove global parsing errors on checking

parent 2290b62b
Pipeline #12288 failed with stage
in 1 minute and 18 seconds
...@@ -83,4 +83,8 @@ public interface CheckError extends Serializable { ...@@ -83,4 +83,8 @@ public interface CheckError extends Serializable {
*/ */
public void report(ErrorReport report); public void report(ErrorReport report);
public default boolean isParsingError() {
return false;
}
} }
...@@ -71,8 +71,4 @@ public class CheckResult implements Serializable { ...@@ -71,8 +71,4 @@ public class CheckResult implements Serializable {
return String.format("CheckResult [id=%s, status=%s, error=%s]", id, status, err); return String.format("CheckResult [id=%s, status=%s, error=%s]", id, status, err);
} }
public boolean isParsingError() {
return false;
}
} }
...@@ -224,7 +224,7 @@ public abstract class Checkable implements Serializable { ...@@ -224,7 +224,7 @@ public abstract class Checkable implements Serializable {
* Clears the checkResults of this checkable unless the error occured during parsing. * Clears the checkResults of this checkable unless the error occured during parsing.
*/ */
public void clearCheckResults() { public void clearCheckResults() {
checkResults.entrySet().removeIf(e -> !e.getValue().isParsingError()); checkResults.entrySet().removeIf(e -> !e.getValue().getError().isParsingError());
setValidated(!checkResults.isEmpty()); setValidated(!checkResults.isEmpty());
} }
......
...@@ -55,5 +55,10 @@ public class XMLValidationError implements CheckError { ...@@ -55,5 +55,10 @@ public class XMLValidationError implements CheckError {
public void report(ErrorReport report) { public void report(ErrorReport report) {
report.add("message", message); report.add("message", message);
} }
@Override
public boolean isParsingError() {
return true;
}
} }
...@@ -700,7 +700,8 @@ public class Checker { ...@@ -700,7 +700,8 @@ public class Checker {
AtomicInteger checkedCount = new AtomicInteger(0); AtomicInteger checkedCount = new AtomicInteger(0);
// clear global errors // clear global errors
model.getGlobalErrors().clear(); model.getGlobalErrors().removeIf(e -> !e.isParsingError());
CityObjectCache cache = model.getCache(); CityObjectCache cache = model.getCache();
logger.trace("Setting up ThreadPool"); logger.trace("Setting up ThreadPool");
int threadCount = Runtime.getRuntime().availableProcessors() * 5; int threadCount = Runtime.getRuntime().availableProcessors() * 5;
......
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