xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lesniak, Alex" <Alex.Lesn...@mdx.com>
Subject Serialization issue with Xalan-J 2.2D?
Date Mon, 07 Jan 2002 22:24:15 GMT

Sorry if this message is posted twice.  I think I got unsubscribed from the
so here is a resend.

I think I may have found a thread safety issue with the Xalan
SerializerToXML class.
We are seeing an issue where character entity references for HTML output
to sometimes be incorrect.  Sometimes the characters are converted to text
entity references and sometimes they are converted to numerical references.
Sometimes, they appear to be set to an incorrect text reference.

The CharInfo class' getEntityNameForChar method does not appear to be thread
safe, since it uses a global object (m_charKey) as a key into the entity ref
hashtable (the value of the key is set in the method itself).

Also, the CharInfo instance appears to be cached and reused among multiple
instances of SerializerToXML (and by extension SerializerToHTML).

We only see this issue under heavy multithreading.

In a single thread scenario, all appears to be OK.

If anyone could confirm or deny this, please do, since I'm not that familiar
the Xalan code.  We saw this with Xalan-J 2.2 D9, and I don't think the
CharInfo code
has changed since then.


-- Alex

View raw message