mirror of https://github.com/zlatinb/muwire
avoid groovy == instead use Objects.equals on critical path
parent
d7880a866c
commit
378cf8a5d0
|
@ -30,7 +30,7 @@ class ResultTreeModel extends DefaultTreeModel {
|
||||||
def nodeData = new ResultTreeRenderer.ResultTreeNode(hiddenRoot, element)
|
def nodeData = new ResultTreeRenderer.ResultTreeNode(hiddenRoot, element)
|
||||||
def elementNode = null
|
def elementNode = null
|
||||||
for(int i = 0; i < node.childCount; i++) {
|
for(int i = 0; i < node.childCount; i++) {
|
||||||
if (node.getChildAt(i).getUserObject() == nodeData) {
|
if (Objects.equals(node.getChildAt(i).getUserObject(), nodeData)) {
|
||||||
elementNode = node.getChildAt(i)
|
elementNode = node.getChildAt(i)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,8 @@ class ResultTreeRenderer extends DefaultTreeCellRenderer {
|
||||||
if (!(o instanceof ResultTreeNode))
|
if (!(o instanceof ResultTreeNode))
|
||||||
return false
|
return false
|
||||||
ResultTreeNode other = (ResultTreeNode)o
|
ResultTreeNode other = (ResultTreeNode)o
|
||||||
hiddenRoot == other.hiddenRoot &&
|
Objects.equals(hiddenRoot, other.hiddenRoot) &&
|
||||||
element == other.element
|
Objects.equals(element, other.element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue