From 2442c58d367192238f1089ea68e03dd20959ef72 Mon Sep 17 00:00:00 2001 From: noys Date: Wed, 22 Nov 2023 11:32:26 +0200 Subject: [PATCH] :bug: Fixed empty issue-nodes bug in navigation tab --- .../jfrog/ide/common/nodes/SastIssueNode.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/com/jfrog/ide/common/nodes/SastIssueNode.java b/src/main/java/com/jfrog/ide/common/nodes/SastIssueNode.java index d8fdf1ad..b2f5087a 100644 --- a/src/main/java/com/jfrog/ide/common/nodes/SastIssueNode.java +++ b/src/main/java/com/jfrog/ide/common/nodes/SastIssueNode.java @@ -6,6 +6,8 @@ import com.jfrog.ide.common.nodes.subentities.SourceCodeScanType; import lombok.Getter; +import java.util.Arrays; + @Getter public class SastIssueNode extends FileIssueNode { @JsonProperty() @@ -20,4 +22,20 @@ public SastIssueNode(String name, String filePath, int rowStart, int colStart, i super(name, filePath, rowStart, colStart, rowEnd, colEnd, reason, lineSnippet, SourceCodeScanType.SAST, severity, ruleID); this.codeFlows = codeFlows; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + SastIssueNode that = (SastIssueNode) o; + return Arrays.deepEquals(codeFlows, that.codeFlows); + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + Arrays.deepHashCode(codeFlows); + return result; + } }