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

Stream.generate should use a covariant Supplier as parameter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs

    Description

      The signature of Stream.generate doesn't to use a wildcard (? extends) hence some programs are rejected even if they are valid.
      The signature should be public static<T> Stream<T> generate(Supplier<? extends T> s).

      see http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-July/034601.html

      Attachments

        Issue Links

          Activity

            People

              psandoz Paul Sandoz
              forax RĂ©mi Forax
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: