Petras created PDFBOX-3320:
------------------------------

             Summary: Statically cached COS objects are mutable
                 Key: PDFBOX-3320
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3320
             Project: PDFBox
          Issue Type: Bug
          Components: Parsing
    Affects Versions: 1.8.11
            Reporter: Petras


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.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to