xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Glavassevich (JIRA)" <xerces-j-...@xml.apache.org>
Subject [jira] [Resolved] (XERCESJ-1457) Forgotten calls on intern() for QName fields
Date Sat, 14 May 2011 17:35:47 GMT

     [ https://issues.apache.org/jira/browse/XERCESJ-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Glavassevich resolved XERCESJ-1457.
-------------------------------------------

    Resolution: Not A Problem

There was no further discussion on this JIRA issue. Resolving as "Not A Problem" as per my
previous comments.

> Forgotten calls on intern() for QName fields
> --------------------------------------------
>
>                 Key: XERCESJ-1457
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1457
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.10.0
>            Reporter: Stephanie Dietzel
>         Attachments: interning-fix.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> In the class Qname.java, the documentation states, "To be used correctly, the strings
must be identical references for equal strings."
> Here are 26 places where a QName is constructed or modifed with non-interned strings.
> This is an efficiency concern, because the non-interned strings may take up
> more memory than interned ones.  It is also a correctness concern, because
> Xerces-J performs comparisons against QName fields using ==.
> The attached patch corrects these problems.
> For example, in XIncludeHandler.java,
> new QName(
>            XMLSymbols.PREFIX_XMLNS,
>            "",
>            XMLSymbols.PREFIX_XMLNS + ":",
>            NamespaceContext.XMLNS_URI)
> becomes
> new QName(
>              XMLSymbols.PREFIX_XMLNS,
>              "",
>              (XMLSymbols.PREFIX_XMLNS + ":").intern(),
>              NamespaceContext.XMLNS_URI)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Mime
View raw message