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

wasted work in PDDocument.addSignature(...)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2
    • Component/s: None
    • Labels:

      Description

      The problem appears in version 1.8.1 and in revision 1476791. I
      attached a one-line patch that fixes it. This problem is similar to
      the already fixed PDFBOX-1447 and PDFBOX-1457.

      In method "PDDocument.addSignature", the loop over "cosObjects" should
      break immediately after "annotNotFound" and "sigFieldNotFound" are set
      to "false". All the iterations after "annotNotFound" and
      "sigFieldNotFound" are set to "false" do not perform any useful work
      because the two "if" statements performing useful work depend on
      "annotNotFound" and "sigFieldNotFound".

        Attachments

        1. patch.diff
          0.6 kB
          Adrian Nistor

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              adriannistor Adrian Nistor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: