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

XStream.iterate("abc", obj -> obj).substream(n).parallel().iterator().next() leads to OOM

XMLWordPrintable

      Since approximately JDK8b98/b99-lambda
      code similar to the following samples leads to OOM:

              Stream.iterate("abc", obj -> obj).substream(3).parallel().iterator().next();

              IntStream.iterate(123, i -> i).substream(1).parallel().iterator().next();


      The following JCK tests fail due to this issue:

      api/java_util/stream/DoubleStream/index.html#Iterate[checkSubstream]
      api/java_util/stream/DoubleStream/index.html#Iterate[checkBoxed]
      api/java_util/stream/DoubleStream/index.html#IterateRepeated[checkSubstream]
      api/java_util/stream/DoubleStream/index.html#IterateRepeated[checkBoxed]
      api/java_util/stream/IntStream/index.html#Iterate[checkSubstream]
      api/java_util/stream/IntStream/index.html#Iterate[checkBoxed]
      api/java_util/stream/LongStream/index.html#Iterate[checkSubstream]
      api/java_util/stream/LongStream/index.html#Iterate[checkBoxed]
      api/java_util/stream/Stream/index.html#IterateIntegers[checkSubstream]
      api/java_util/stream/Stream/index.html#IterateIntegersRepeated[checkSubstream]
      api/java_util/stream/Stream/index.html#IterateStringsRepeated[checkSubstream]
      api/java_util/stream/Stream/index.html#IterateStrings[checkSubstream]



            psandoz Paul Sandoz
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: