From 04a0f6ef69a56698788562ddf9fc7f23f8edc173 Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 1 Nov 2023 22:36:09 +0300 Subject: [PATCH] Update metadata fixer. Fix addPDFAIdentificationSchema --- .../verapdf/metadata/fixer/gf/impl/model/MetadataImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/metadata-fixer/src/main/java/org/verapdf/metadata/fixer/gf/impl/model/MetadataImpl.java b/metadata-fixer/src/main/java/org/verapdf/metadata/fixer/gf/impl/model/MetadataImpl.java index e5ae766ff..d42c97327 100644 --- a/metadata-fixer/src/main/java/org/verapdf/metadata/fixer/gf/impl/model/MetadataImpl.java +++ b/metadata-fixer/src/main/java/org/verapdf/metadata/fixer/gf/impl/model/MetadataImpl.java @@ -204,9 +204,6 @@ public void addPDFUAIdentificationSchema(MetadataFixerResultImpl.Builder resultB } public void addPDFAIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour) { - if (isValidPDFAIdentification() && !isWrongPDFAIdentification(flavour)) { - return; - } int part = flavour.getPart().getPartNumber(); String conformance = flavour != PDFAFlavour.PDFA_4 ? flavour.getLevel().getCode().toUpperCase() : null; try { @@ -217,7 +214,7 @@ public void addPDFAIdentificationSchema(MetadataFixerResultImpl.Builder resultBu this.setNeedToBeUpdated(true); } - if (isWrongPDFAIdentification(flavour)) { + if (!isValidPDFAIdentification() || isWrongPDFAIdentification(flavour)) { resultBuilder.addFix(String.format(this.metadata.getPDFAIdentificationConformance() == null ? ADD_PROPERTY_MESSAGE : (conformance == null ? REMOVE_PROPERTY_MESSAGE : SET_PROPERTY_MESSAGE), VeraPDFMeta.CONFORMANCE, conformance));