From a3a538d7307a9c99090edc705fd6998bbc30a50b Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 30 Jul 2024 15:20:19 +0300 Subject: [PATCH] Several flavours. Fix validator initialization --- .../verapdf/pdfa/validation/validators/BaseValidator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/org/verapdf/pdfa/validation/validators/BaseValidator.java b/core/src/main/java/org/verapdf/pdfa/validation/validators/BaseValidator.java index 515654736..5f52a8ed7 100644 --- a/core/src/main/java/org/verapdf/pdfa/validation/validators/BaseValidator.java +++ b/core/src/main/java/org/verapdf/pdfa/validation/validators/BaseValidator.java @@ -206,6 +206,13 @@ protected void initialise() { this.objectsStack.clear(); this.objectsContext.clear(); this.idSet.clear(); + for (FlavourValidator validator : validators) { + validator.getFailedChecks().clear(); + validator.getDeferredRules().clear(); + validator.results.clear(); + validator.testCounter = 0; + validator.isCompliant = true; + } initializeAllVariables(); }