Skip to content

Commit

Permalink
Merge pull request #986 from openpreserve/fix/docinfodates
Browse files Browse the repository at this point in the history
FIX: Date error output
  • Loading branch information
carlwilson authored Jan 22, 2025
2 parents 55568f4 + 4fd44c2 commit 646e053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jhove-bbt/scripts/create-1.33-target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ find "${targetRoot}" -type f -name "audit-PDF-hul.jhove.xml" -exec sed -i 's/<re
find "${targetRoot}" -type f -name "audit-PDF-hul.jhove.xml" -exec sed -i 's/2024-08-22/2025-01-24/' {} \;

# Fix the results affected by the improvements to date handling in the PDF module
sed -i 's/<message offset/<message subMessage="For date property CreationDate" offset/' "${targetRoot}/examples/modules/PDF-hul/AA_Banner.pdf.jhove.xml"
sed -i 's/<message offset/<message subMessage="For date property: CreationDate, value: Tue Feb 03 16:19:57 2004" offset/' "${targetRoot}/examples/modules/PDF-hul/AA_Banner.pdf.jhove.xml"
if [[ -f "${candidateRoot}/errors/modules/PDF-hul/pdf-hul-9-govdocs-065694.pdf.jhove.xml" ]]; then
cp "${candidateRoot}/errors/modules/PDF-hul/pdf-hul-9-govdocs-065694.pdf.jhove.xml" "${targetRoot}/errors/modules/PDF-hul/pdf-hul-9-govdocs-065694.pdf.jhove.xml"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ protected void addDateProperty(PdfDictionary dict, List<Property> propList,
} catch (PdfInvalidException e) {
info.setValid(false);
info.setMessage(new ErrorMessage(JhoveMessages.getMessageInstance(
MessageConstants.PDF_HUL_133.getId(), MessageConstants.PDF_HUL_133.getMessage(), "For date property: " + propName + ", value: " + lit.getValue()), _parser.getOffset()));
MessageConstants.PDF_HUL_133.getId(), MessageConstants.PDF_HUL_133.getMessage(), "For date property: " + propName.trim() + ", value: " + lit.getValue().trim()), _parser.getOffset()));
}
}
}
Expand Down

0 comments on commit 646e053

Please sign in to comment.