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 d8fdf1a..b2f5087 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; + } }