clarify Spliterator.IMMUTABLE and Arrays.asList specifications

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 8
    • Component/s: core-libs
    • None

      The spliterator underlying a stream constructed from Arrays.asList() should have the IMMUTABLE characteristic, since it cannot be structurally modified after creation.

      From: Paul Sandoz:

      The Arrays.ArrayList spliterator should be:

        @Override
        public Spliterator<E> spliterator() {
            return Spliterators.spliterator(a, Spliterator.ORDERED | Spliterator.IMMUTABLE);
        }

            Assignee:
            Stuart Marks
            Reporter:
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: