Merge pull request #1067 from phax/java17-base

Set Java 17 as base + dependency updates + test fix
This commit is contained in:
Jochen Staerk
2026-05-07 13:22:43 +02:00
committed by GitHub
15 changed files with 75 additions and 73 deletions

View File

@@ -113,7 +113,7 @@ public class PDFValidator extends Validator {
ItemDetails itemDetails = ItemDetails.fromValues(pdfFilename);
inputStream.mark(Integer.MAX_VALUE);
processorResult = processor.process(itemDetails, inputStream);
pdfReport = processorResult.getValidationResult().toString().replaceAll(
pdfReport = processorResult.getValidationResults().get(0).toString().replaceAll(
"<\\?xml version=\"1\\.0\" encoding=\"utf-8\"\\?>",
""
);
@@ -330,11 +330,11 @@ public class PDFValidator extends Validator {
//end
final long endTime = Calendar.getInstance().getTimeInMillis();
if (!processorResult.getValidationResult().isCompliant()) {
if (!processorResult.getValidationResults().get (0).isCompliant()) {
context.setInvalid();
}
PDFAFlavour pdfaFlavourFromValidationResult = processorResult.getValidationResult().getPDFAFlavour();
PDFAFlavour pdfaFlavourFromValidationResult = processorResult.getValidationResults().get (0).getPDFAFlavour();
if (Arrays.stream(PDF_A_3_FLAVOURS)
.noneMatch(pdfaFlavourFromValidationResult::equals)) {
context.addResultItem(

View File

@@ -24,15 +24,15 @@ import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.mustangproject.util.ByteArraySearcher;
import org.mustangproject.XMLTools;
import org.mustangproject.util.ByteArraySearcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
import com.helger.commons.io.stream.StreamHelper;
import com.helger.base.io.stream.StreamHelper;
import jakarta.xml.bind.DatatypeConverter;