[External] : Re: Potential Thread-Safety Bug in XMLEntityManager

Archie Cobbs archie.cobbs at gmail.com
Fri Oct 31 15:26:56 UTC 2025


On Fri, Oct 31, 2025 at 12:01 AM Stuart Marks <stuart.marks at oracle.com>
wrote:

> Unfortunately the CatalogImpl object is mutated to hold temporary state
> that's used during the resolution process. This temporary state doesn't
> really belong in the object itself, so it seems likely that a fix would
> involve refactoring this temporary state out of the Catalog itself into an
> object owned by some resolver object (or similar).
>
This reminds me of a similar situation with the XML DOM classes like
org.w3c.dom.Element: instances are not thread safe even if the threads are
only accessing them read-only. This was surprising to me to discover at the
time.

Be careful out there! :)

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20251031/3c48f6ef/attachment.htm>


More information about the core-libs-dev mailing list