Detector: | Tikanga |
Target: | project ' synthetic ' versionhasnext |
Misuse: | misuse ' hasnext ' |
Tags: |
Details about the known misuse from the MUBench dataset.
Description: | Misses to check that there is another element before calling Iterator.next(). |
Fix Description: | Check iterator.hasNext() or ensure size of the collection (check size(), isEmpty() or add() an element). |
Violation Types: |
|
In File: | OnlyNext.java |
In Method: | misuse(Collection) |
Code with Misuse: |
|
Code with Pattern(s): |
|