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

wasted work in PDOptionalContentProperties.setGroupEnabled()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.1
    • 1.8.0
    • None

    Description

      The problem appears in version version 1.7.1 and in revision 1414788.
      I attached a three-line patch (on.diff) that fixes it. This problem
      and the attached patch are similar the previously fixed PDFBOX-1447
      and its patch.

      In method "PDOptionalContentProperties.setGroupEnabled", the loop over
      "on" should not be executed if "enable" is "true". When "enable" is
      "true", all the iterations just compute "group" and "name", and then
      discard them, because the "if" condition depends on "!enable".

      Similarly, in the same method
      "PDOptionalContentProperties.setGroupEnabled", the loop over "off"
      should not be executed if "enable" is "false". I attached a separate
      patch (off.diff) for the "off" loop.

      Attachments

        1. on.diff
          0.9 kB
          Adrian Nistor
        2. off.diff
          0.9 kB
          Adrian Nistor

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: