Commit 77c5040483c11ad90662106643465e3c83e61576
1 parent
468d2b2e
Exists in
staging
and in
4 other branches
prevent null pointer exception in smile block
Showing
1 changed file
with
0 additions
and
3 deletions
Show diff stats
plugins/serpro_integration/lib/serpro_integration_plugin/smile_block.rb
@@ -33,9 +33,6 @@ class SerproIntegrationPlugin::SmileBlock < Block | @@ -33,9 +33,6 @@ class SerproIntegrationPlugin::SmileBlock < Block | ||
33 | #FIXME make this test | 33 | #FIXME make this test |
34 | def smile_factor | 34 | def smile_factor |
35 | collect_sonar_information | 35 | collect_sonar_information |
36 | - factor = (self.sonar_info[METRIC_COVERAGE] * self.sonar_info[METRIC_SUCCESS_DENSITY]).to_f/1000 | ||
37 | - factor | ||
38 | - collect_sonar_information | ||
39 | factor = 0 | 36 | factor = 0 |
40 | if self.sonar_info[METRIC_COVERAGE] && self.sonar_info[METRIC_SUCCESS_DENSITY] | 37 | if self.sonar_info[METRIC_COVERAGE] && self.sonar_info[METRIC_SUCCESS_DENSITY] |
41 | factor = (self.sonar_info[METRIC_COVERAGE] * self.sonar_info[METRIC_SUCCESS_DENSITY]).to_f/1000 | 38 | factor = (self.sonar_info[METRIC_COVERAGE] * self.sonar_info[METRIC_SUCCESS_DENSITY]).to_f/1000 |