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

CharStringCommand overly complex

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.1 PDFBox
    • 4.0.0
    • FontBox
    • None

    Description

      The CharStringCommand class is quite complex and difficult to understand what it does in detail. I suggest a refactoring to make the code shorter and easier to understand. It should also perform better after the refactoring.

      I have prepared a patch that

      • turns CharStringCommand into an enum
      • removes the  internal Key class
      • removes the different maps used for lookup and replaces them with a single array for faster lookup

      Attachments

        1. coding_convention,_use_switch.patch
          2 kB
          Axel Howind
        2. refactor_CharStringCommand.patch
          30 kB
          Axel Howind

        Activity

          People

            lehmi Andreas Lehmkühler
            axh Axel Howind
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: