Details
Description
The parsing fails with the following stack:
java.lang.NumberFormatException at java.math.BigDecimal.<init>(BigDecimal.java:459) at java.math.BigDecimal.<init>(BigDecimal.java:728) at java.math.BigDecimal.valueOf(BigDecimal.java:1054) at org.sonar.api.utils.ParsingUtils.scaleValue(ParsingUtils.java:70) at org.sonar.api.utils.ParsingUtils.scaleValue(ParsingUtils.java:63) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.saveCoverageMeasure(PhpUnitCoverageResultParser.java:160) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFileNodes(PhpUnitCoverageResultParser.java:123) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile(PhpUnitCoverageResultParser.java:107) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parse(PhpUnitCoverageResultParser.java:91) ...
This is due to a bad division (0/0) that leads to a NaN double value that can't be parsed afterwards.
Issue Links
- duplicates
-
SONARPLUGINS-1541
Coverage analysis crashes when "statements" metric is zero.
-