[
https://issues.apache.org/jira/browse/XERCESJ-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Glavassevich resolved XERCESJ-1665.
-------------------------------------------
Resolution: Invalid
Working as designed. All XML string identifiers within Xerces are stored in a
SymbolTable and are internalized strings (see java.lang.String.intern()). This
allows them to be compared by reference and is done for performance reasons.
> DTDGrammar.QNameHashtable.get(String key) compares by reference
> ---------------------------------------------------------------
>
> Key: XERCESJ-1665
> URL: https://issues.apache.org/jira/browse/XERCESJ-1665
> Project: Xerces2-J
> Issue Type: Bug
> Components: DTD
> Reporter: Nikola Sprljan
> Priority: Minor
>
> When key is matched with bucket the reference comparison is done:
> {noformat}
> if ((String)bucket[j] == key) {
> {noformat}
> This will work if a string literal is provided as a key, but not for any
> String object. As a consequence dtdGrammar.getElementDeclIndex(String s) does
> not work for String objects.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]