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

if infile is missing, say which one

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.21, 3.0.0 PDFBox
    • 2.0.22, 3.0.0 PDFBox
    • Signing, Utilities
    • None

    Description

      ### Eclipse Workspace Patch 1.0
      #P pdfbox
      Index: examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
      ===================================================================
      --- examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java	(revision 1882597)
      +++ examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java	(working copy)
      @@ -98,7 +98,13 @@
           {
               if (inFile == null || !inFile.exists())
               {
      -            throw new FileNotFoundException("Document for signing does not exist");
      +            String err = "Document for signing ";
      +            if (null == inFile) {
      +            	err += "is null";
      +            } else {
      +            	err += "does not exist "+inFile.getAbsolutePath();
      +            }
      +			throw new FileNotFoundException(err);
               }
       
               try (PDDocument doc = Loader.loadPDF(inFile);
      

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            hauser@acm.org Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: