Skip to content

Commit

Permalink
🐛 Fixed empty issue-nodes bug in navigation tab
Browse files Browse the repository at this point in the history
  • Loading branch information
noyshabtay committed Nov 22, 2023
1 parent 432db7c commit 2442c58
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/jfrog/ide/common/nodes/SastIssueNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;
}
}

0 comments on commit 2442c58

Please sign in to comment.