From 1afc3a262260caa999ac9e9e66752f9b1fd1db13 Mon Sep 17 00:00:00 2001 From: MaximPlusov Date: Thu, 2 Nov 2023 10:51:26 +0300 Subject: [PATCH] Merge pull request #606 from veraPDF/metadata_fixer 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));