Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit a67e60f

Browse files
committed
JDK-8259816: Typo in java.util.stream package description
1 parent ac5fac8 commit a67e60f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/java9/util/stream/package-info.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -346,7 +346,7 @@
346346
* <pre>{@code
347347
* List<String> results =
348348
* stream.filter(s -> pattern.matcher(s).matches())
349-
* .collect(Collectors.toList()); // No side-effects!
349+
* .toList(); // No side-effects!
350350
* }</pre>
351351
*
352352
* <h3><a id="Ordering">Ordering</a></h3>
@@ -436,7 +436,7 @@
436436
* can operate on subsets of the data in parallel, and then combine the
437437
* intermediate results to get the final correct answer. (Even if the language
438438
* had a "parallel for-each" construct, the mutative accumulation approach would
439-
* still required the developer to provide
439+
* still require the developer to provide
440440
* thread-safe updates to the shared accumulating variable {@code sum}, and
441441
* the required synchronization would then likely eliminate any performance gain from
442442
* parallelism.) Using {@code reduce()} instead removes all of the

0 commit comments

Comments
 (0)