Java Reference
In-Depth Information
} catch (IOException ioe) {
throw new UncheckedIOException(
"Error working with input stream", ioe
);
}
};
}
public static void main(String[] args) {
generateParallelStream().map(generateMap()).forEach(System.out::println);
}
}
/* RESULT (with a few hundred lines of numbers cut off the front)
...
794
245
190
402
15
57
957
58
16
403
191
Exception in thread "main" java.io.UncheckedIOException: Error working with input stream
at Listing3.lambda$generateMap$1(Listing3.java:35)
at Listing3$$Lambda$1/1149319664.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(
ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(
ArrayList.java:1359)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(
AbstractPipeline.java:502)
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
at java.util.stream.AbstractTask.compute(AbstractTask.java:316)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(
ForkJoinPool.java:916)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.io.IOException: And with a kiss, I die! (After 489 executions)
at Listing3.lambda$generateMap$1(Listing3.java:31)
... 14 more
*/
 
Search WWH ::




Custom Search