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

wasted work in PDOptionalContentProperties.setGroupEnabled()

    Details

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

      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. off.diff
          0.9 kB
          Adrian Nistor
        2. on.diff
          0.9 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: