[GitHub] jmeter pull request #337: Tidy JavaDoc and fix error in getTop5ErrorMetrics ...

2017-11-23 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/jmeter/pull/337


---


[GitHub] jmeter pull request #337: Tidy JavaDoc and fix error in getTop5ErrorMetrics ...

2017-11-22 Thread ham1
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

- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [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 
Date:   2017-11-22T18:03:14Z

Tidy JavaDoc and fix error in getTop5ErrorMetrics method.




---