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

Statically cached COS objects are mutable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.8.11
    • None
    • Parsing
    • None

    Description

      The range of COSInteger (from -100 to 256) instances, COSBoolean, many COSName instances and COSNull objects are statically cached in corresponding classes. Though such such kind of cached objects are supposed to be immutable, they are not: they inherit and do not block from modification parent COSBase class properties direct and needToBeUpdate. As these are properties are set during parsing and modification, and considered during writing the document, their mutability affects both the objects within the same document (when ex. the same COSNumber value from the cached range is used in different contexts both direct and indirect), as well as other documents, which might parsed and saved using the same classloader.

      Attachments

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              abyss Petras
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: