Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: TAGLIST-1.0
-
Fix Version/s: None
-
Component/s: TagList
-
Labels:None
-
Number of attachments :
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
- is duplicated by
-
SONAR-2534
NPE by running decorators
-
-
SONARPLUGINS-1627
TagList crash if I use ':'
-
Hello.
I add the problem also. I could fix it with modification in the JAVA source code.
I add some "TODO:", or "TODO," ....
By removing ":" or "," no more NullPointer.
Regards.
Etienne Jouvin
www.amexio.fr