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 elementNode = null
|
||||
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)
|
||||
break
|
||||
}
|
||||
|
|
|
@ -86,8 +86,8 @@ class ResultTreeRenderer extends DefaultTreeCellRenderer {
|
|||
if (!(o instanceof ResultTreeNode))
|
||||
return false
|
||||
ResultTreeNode other = (ResultTreeNode)o
|
||||
hiddenRoot == other.hiddenRoot &&
|
||||
element == other.element
|
||||
Objects.equals(hiddenRoot, other.hiddenRoot) &&
|
||||
Objects.equals(element, other.element)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue