Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1643

Check for missing validation processes does not work properly in Preflight

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3, 2.0.0
    • Preflight
    • None

    Description

      org.apache.pdfbox.preflight.PreflightConfiguration#getInstanceOfProcess(String) method is supposed to return a validator instance for given process name. If process is not found (is not set in PreflightConfiguration) and errorOnMissingProcess flag is set, an exception should be thrown. If that flag is not set, an instance of NOP validator (org.apache.pdfbox.preflight.process.EmptyValidationProcess class) is returned.

      Unfortunatelly there is no way to unconfigure (i.e. disable) specific validation process in PreflightConfiguration. Though it contains the methods #replacePageProcess(String, Class) and #replaceProcess(String, Class), if null is given as the second parameter specifying validation class, then #getInstanceOfProcess(String) method fails with NPE instead of expected behavior for missing validation process.

      Attachments

        Activity

          People

            leleueri Eric Leleu
            abyss Petras
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: