Skip to content

Commit

Permalink
🐛 Defensive null check (#424)
Browse files Browse the repository at this point in the history
- **:recycle: provide messageText to all RuleSarifFactory impls**
- **Bind AppScan sarif to rule by rule name from message text**
- **:bug: fix distinct rule ID bug**
- **:bug: defensive null check**
  • Loading branch information
ryandens authored Jul 18, 2024
1 parent ff519dc commit 6670a3d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ private RuleDescriptor extractRuleId(final Result result, final Run run) {
return null;
}
}
return new RuleDescriptor(result.getRuleId(), result.getMessage().getText());
return new RuleDescriptor(
result.getRuleId(), result.getMessage() != null ? result.getMessage().getText() : null);
}

private Stream<Map.Entry<String, RuleSarif>> fromSarif(
Expand Down

0 comments on commit 6670a3d

Please sign in to comment.