Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266604

Enchance ofNullable with a collection as input

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      A DESCRIPTION OF THE PROBLEM :
      ofNullable to have a collection as input. So a stream of elements are initialized instead of the collection.

      public static <T> Stream<T> ofNullable(Collection<T> collection) {
          return collection == null ? Stream.empty() : collection.stream();
        }


        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: