aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
index 884e298bd68..da4059eeb0d 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
@@ -82,8 +82,11 @@ public class IssueTracking implements BatchExtension {
// If each new issue matches an old one we can stop the matching mechanism
if (result.matched().size() != newIssues.size()) {
- if (sourceHashHolder != null && sourceHashHolder.getHashedReference() != null && hasLastScan) {
- mapNewissues(sourceHashHolder.getHashedReference(), sourceHashHolder.getHashedSource(), newIssues, result);
+ if (sourceHashHolder != null && hasLastScan) {
+ FileHashes hashedReference = sourceHashHolder.getHashedReference();
+ if (hashedReference != null) {
+ mapNewissues(hashedReference, sourceHashHolder.getHashedSource(), newIssues, result);
+ }
}
mapIssuesOnSameRule(newIssues, result);
}