I have to correct myself. COSFloat is also immutable. That leaves
COSString to be mutable. COSBase should also be reviewed.

I'll create a ticket to track that.

BR
Maruan



Am Freitag, dem 06.03.2026 um 13:12 +0100 schrieb Tilman Hausherr:
> Yes it makes sense.
> 
> Tilman
> 
> Am 06.03.2026 um 12:50 schrieb [email protected]:
> > Dear Colleagues,
> > 
> > I've started looking at some of the base classes of PDFBox while
> > refreshing my understanding of the different APIs.
> > 
> > In org.apache.pdfbox.cos whe have classes which represent the PDF
> > base
> > objects. Some of the 'primitive' types such as COSNull, COSBoolean
> > ...
> > are immutable where COSFloat and COSString are mutable. Wouldn't it
> > make sense to have COSFloat and COSString also immutable?
> > 
> > E.g. why should COSInteger be immutable where COSFloat isn't?
> > 
> > Thoughts?
> > 
> > I know that this might affect many areas and isn't without risks
> > but
> > would IMHO make the implementation cleaner and more transparent. It
> > would also help as a foundation for thread safety. We could change
> > that
> > in trunk if that's something to be changed.
> > 
> > BR
> > Maruan
> > 
> > -------------------------------------------------------------------
> > --
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

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

Reply via email to