Skip to content

NPE: Preconditions.checkNotNull #15

@dajester2013

Description

@dajester2013

I'm getting an NPE running sonar-scanner with the following properties:

The problem goes away if I remove the exclusions. I have a feeling I've got a bad exclusion, but I'm not sure how to write it properly. If that is the case, it should throw a useful exception stating as such, not an NPE.

Sonar properties:

# must be unique in a given SonarQube instance
sonar.projectKey=redacted
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=redacted
sonar.projectVersion=1.0
 
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set. 
sonar.sources=modules,library,components

sonar.exclusions=**/*.java,**/*.class,**/extjs*/**/*,**/build/**/*
sonar.java.binaries=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

NPE Exception trace:

	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
	at com.stepstone.sonar.plugin.coldfusion.cflint.CFlintAnalysisResultImporter.createNewIssue(CFlintAnalysisResultImporter.java:106)
	at com.stepstone.sonar.plugin.coldfusion.cflint.CFlintAnalysisResultImporter.handleIssueTag(CFlintAnalysisResultImporter.java:97)
	at com.stepstone.sonar.plugin.coldfusion.cflint.CFlintAnalysisResultImporter.parse(CFlintAnalysisResultImporter.java:74)
	at com.stepstone.sonar.plugin.coldfusion.cflint.CFlintAnalysisResultImporter.parse(CFlintAnalysisResultImporter.java:64)
	at com.stepstone.sonar.plugin.coldfusion.cflint.CFlintAnalysisResultImporter.parse(CFlintAnalysisResultImporter.java:53)
	at com.stepstone.sonar.plugin.coldfusion.ColdFusionSensor.importResults(ColdFusionSensor.java:74)
	at com.stepstone.sonar.plugin.coldfusion.ColdFusionSensor.execute(ColdFusionSensor.java:57)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions