Stream.generate should use a covariant Supplier as parameter

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: 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

            Assignee:
            Paul Sandoz
            Reporter:
            Rémi Forax
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: