[ https://issues.apache.org/jira/browse/XERCESJ-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936792#comment-14936792 ]
Michael Glavassevich commented on XERCESJ-1665: ----------------------------------------------- org.apache.xerces.impl.dtd.DTDGrammar is an internal class. The intended "user" of its methods was only other internal classes within Xerces which are expected to be passing around internalized strings. > 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: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org