diff --git a/src/main/java/com/bazel_diff/TargetHashingClient.java b/src/main/java/com/bazel_diff/TargetHashingClient.java index 383a8b0..0c61358 100644 --- a/src/main/java/com/bazel_diff/TargetHashingClient.java +++ b/src/main/java/com/bazel_diff/TargetHashingClient.java @@ -89,7 +89,7 @@ private byte[] createDigestForRule( digest.update(ruleInput.getBytes()); BazelRule inputRule = allRulesMap.get(ruleInput); byte[] sourceFileDigest = getDigestForSourceTargetName(ruleInput, bazelSourcefileTargets); - if (inputRule != null && !inputRule.getName().equals(rule.getName())) { + if (inputRule != null && inputRule.getName() != null && !inputRule.getName().equals(rule.getName())) { byte[] ruleInputHash = createDigestForRule( inputRule, allRulesMap,