mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not intern when searching for attribute
This commit is contained in:
@@ -675,17 +675,15 @@ public class XmlTagImpl extends XmlElementImpl implements XmlTag {
|
||||
@Nullable
|
||||
public XmlAttribute getAttribute(String qname) {
|
||||
if (qname == null) return null;
|
||||
final CharTable charTableByTree = SharedImplUtil.findCharTableByTree(this);
|
||||
final XmlAttribute[] attributes = getAttributes();
|
||||
|
||||
final CharSequence charTableIndex = charTableByTree.intern(qname);
|
||||
final boolean caseSensitive = isCaseSensitive();
|
||||
|
||||
for (final XmlAttribute attribute : attributes) {
|
||||
final LeafElement attrNameElement = (LeafElement)XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild(attribute.getNode());
|
||||
if (attrNameElement != null &&
|
||||
(caseSensitive && attrNameElement.getChars().equals(charTableIndex) ||
|
||||
!caseSensitive && Comparing.equal(attrNameElement.getChars(), charTableIndex, false))) {
|
||||
(caseSensitive && Comparing.equal(attrNameElement.getChars(), qname) ||
|
||||
!caseSensitive && Comparing.equal(attrNameElement.getChars(), qname, false))) {
|
||||
return attribute;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user