]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3644 Get rid of potential NPE issue warning (cannot guarantee that subsequent...
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Sep 2013 07:53:25 +0000 (09:53 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Sep 2013 07:53:25 +0000 (09:53 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/ignore/pattern/Pattern.java

index 17ed6118a09e01baf438f6b45624ce9b4cf1c040..5112669c571955088088355129ec61e446d5cec0 100644 (file)
@@ -119,10 +119,11 @@ public class Pattern {
     boolean match = matchResource(issue.componentKey())
       && matchRule(issue.ruleKey());
     if (checkLines) {
-      if (issue.line() == null) {
+      Integer line = issue.line();
+      if (line == null) {
         match = false;
       } else {
-        match = match && matchLine(issue.line());
+        match = match && matchLine(line);
       }
     }
     return match;