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

Stream.generate should use a covariant Supplier as parameter

XMLWordPrintable

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

      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

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

              Created:
              Updated:
              Resolved: