Skip to content

Commit 6670a3d

Browse files
authored
🐛 Defensive null check (#424)
- **: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**
1 parent ff519dc commit 6670a3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

framework/codemodder-base/src/main/java/io/codemodder/DefaultSarifParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ private RuleDescriptor extractRuleId(final Result result, final Run run) {
6464
return null;
6565
}
6666
}
67-
return new RuleDescriptor(result.getRuleId(), result.getMessage().getText());
67+
return new RuleDescriptor(
68+
result.getRuleId(), result.getMessage() != null ? result.getMessage().getText() : null);
6869
}
6970

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

0 commit comments

Comments
 (0)