Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902840

JMH: Fix *Statistics iterators to throw NoSuchElementException properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • jmh

      SonarCloud instance reports:
       Add a "NoSuchElementException" for iteration beyond the end of the collection.

      ...in places like:

              @Override
              public Map.Entry<Double, Long> next() {
                  return new AbstractMap.SimpleImmutableEntry<>(values[currentIndex++], 1L);
              }

              @Override
              public Map.Entry<Double, Long> next() {
                  entryReturned = true;
                  return new AbstractMap.SimpleImmutableEntry<>(value, 1L);
              }

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: