Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
When using sonar.branch parameter the analysis fails.
Below the exception stack trace :
Caused by: java.lang.NullPointerException
at org.sonar.plugins.csharp.api.sensor.AbstractTestCSharpSensor.shouldExecuteOnProject(AbstractTestCSharpSensor.java:45)
at org.sonar.plugins.csharp.gallio.TestReportSensor.shouldExecuteOnProject(TestReportSensor.java:78)
at org.sonar.api.batch.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:115)
at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:105)
at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:63)
at org.sonar.batch.phases.SensorsExecutor.<init>(SensorsExecutor.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147)
I think that the root of the problem is in MicrosoftWindowsEnvironment.getProjectByName().
The name of the project is the concatenation of the VS project name with the branch name. In the map projectsByName, the keys are just the VS project name, without the branch name.