Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19703

clover-plugin: Ratio.getPercentageFloat() appears to handle N/0 improperly

XMLWordPrintable

      The clover-plugin Ratio.getPercentageFloat() does not seem to handle a ratio of N / 0 properly. It seems that this should be 100%, not 0%.

      It looks like https://github.com/jenkinsci/clover-plugin/commit/ddbf016c17933cba373903bb797f18172b422509 may have introduced this issue.

      I have created a pull on GitHub (https://github.com/jenkinsci/clover-plugin/pull/9).

      I have also added some tests for the Ratio.getPercentageFloat() in my pull request, but they are incomplete due to not being able to find documentation on the edge cases.

      I am willing to change the way the patch is assembled (if you want the testing broken into a different branch pull request, for example). I am also willing to flesh out the test for that method, I just need to know what the expected behavior should be.

            marekparf Marek Parfianowicz
            midlifexis Brian Wightman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: