SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-925

NullPointerException when CheckStyle rule has default value

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: TAGLIST-1.0
    • Fix Version/s: TAGLIST-1.1
    • Component/s: TagList
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When the TodoComment CheckStyle rule has its format parameter set to default (empty = "TODO:") we get a NullPointerException. This can be fixed by explicitly setting a value.

      Caused by: java.lang.NullPointerException
             at java.util.TreeMap.getEntry(TreeMap.java:324)
             at java.util.TreeMap.get(TreeMap.java:255)
             at org.apache.commons.collections.bag.AbstractMapBag.add(AbstractMapBag.java:257)
             at org.sonar.api.measures.CountDistributionBuilder.add(CountDistributionBuilder.java:65)
             at org.sonar.api.measures.CountDistributionBuilder.add(CountDistributionBuilder.java:79)
             at org.sonar.plugins.taglist.ViolationsDecorator.saveFileMeasures(ViolationsDecorator.java:98)
             at org.sonar.plugins.taglist.ViolationsDecorator.decorate(ViolationsDecorator.java:76)
             at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:83)
             at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:75)
             at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:75)
             at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:66)
             at org.sonar.batch.phases.Phases.execute(Phases.java:73)
             at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:61)
             at org.sonar.batch.Batch.analyzeModule(Batch.java:149)
             at org.sonar.batch.Batch.analyzeModules(Batch.java:106)
             at org.sonar.batch.Batch.execute(Batch.java:66)
             at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142)
             at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133)
             at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
             at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
             ... 21 more
      

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Lars Francke
            • Votes:
              18 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated: