Updated to Java 17 + version bumps
This commit is contained in:
@@ -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\"\\?>",
|
||||
""
|
||||
);
|
||||
@@ -324,11 +324,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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user