GitHub user ham1 opened a pull request: https://github.com/apache/jmeter/pull/337
Tidy JavaDoc and fix error in getTop5ErrorMetrics method. ## Description Fixed bug whereby calling `registerError` with the following data set `["A", "B", "C", "D", "E", "F"]` would return `[["A", 1], [null, null], [null, null], [null, null], [null, null]]` instead of `[["A", 1], ["B", 1], ["C", 1], ["D", 1], ["E", 1]]`. Improved JavaDoc for `registerError` Also removed JavaDoc which did not add anything to the method names. ## Motivation and Context Made the code more readable and at the same time fixed a subtle error. ## How Has This Been Tested? On my spock branch: ```groovy def "errors with the same frequency are preserved up until the size limit"() { given: def testData = ["A", "B", "C", "D", "E", "F"] for (def key : testData) { sut.registerError(key) } expect: sut.getTop5ErrorsMetrics() == [["A", 1], ["B", 1], ["C", 1], ["D", 1], ["E", 1]] } ``` ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Delete as appropriate --> - Bug fix (non-breaking change which fixes an issue) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the [code style][style-guide] of this project. - [x] I have updated the documentation accordingly. [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines You can merge this pull request into a Git repository by running: $ git pull https://github.com/ham1/jmeter top_5_error_bug Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jmeter/pull/337.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #337 ---- commit 762b0fe5919e8aa75f1d21abb3fdaf7292a8d049 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-22T18:03:14Z Tidy JavaDoc and fix error in getTop5ErrorMetrics method. ---- ---