[
https://issues.apache.org/jira/browse/PDFBOX-3320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Lehmkühler closed PDFBOX-3320.
--------------------------------------
Resolution: Duplicate
Assignee: Andreas Lehmkühler
Looks like a duplicate of PDFBOX-2685
> 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
> Assignee: Andreas Lehmkühler
>
> 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]