RandomXSpliterators report SIZED and SUBSIZED even if semantically non-finite

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 17, 18, 19, 20, 21, 22, 23, 24
    • Component/s: core-libs
    • None

      There are several ways of obtaining Spliterators from random generators (Random::ints(…) etc) which do not have a user-supplied size, which means that they currently operate as though they have Long.MAX_VALUE elements, and report the characteristics SIZED and SUBSIZED.

      However, the documentation for SIZED states:

      ```
      Characteristic value signifying that the value returned from estimateSize() prior to traversal or splitting represents a finite size that, in the absence of structural source modification, represents an exact count of the number of elements that would be encountered by a complete traversal.
      ```

      The aforementioned Spliterators reporting SIZED and SUBSIZED seems to violate that specification.

            Assignee:
            Viktor Klang
            Reporter:
            Viktor Klang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: