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

OutOfMemoryError: ThreadLocalRandom.current().doubles().parallel().substream(100).iterator().next()

XMLWordPrintable

      java.lang.OutOfMemoryError is caused by following code:

      import java.util.concurrent.ThreadLocalRandom;

      public class ThreadLocalRandomSubstream {
          public static void main(String[] argv) {
              ThreadLocalRandom.current().doubles().parallel().substream(100).iterator().next();
          }
      }


      The code is attached for your convenience. This was reproduced on b88.

            psandoz Paul Sandoz
            grakov Georgiy Rakov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: