RFR 8014731: j.u.stream.StreamSupport class has default constructor generated
Chris Hegarty
chris.hegarty at oracle.com
Wed May 29 12:54:26 UTC 2013
Looks fine to me.
-Chris.
On 29/05/2013 12:12, Paul Sandoz wrote:
> Hi,
>
> Please review these changes to j.u.s. StreamSupport to make it final and non-instantiable, i also tacked on some JavaDoc broken link fixes made by Henry.
>
> Paul.
>
> # HG changeset patch
> # User psandoz
> # Date 1369825082 -7200
> # Node ID bfdc1ed75460c9e6869827cf9acabd4b1a5e9d29
> # Parent 6be3ce51e61dbdab6766c74223c076a7b3472be6
> 8014731: j.u.stream.StreamSupport class has default constructor generated
> Summary: This change set also fixes broken links
> Reviewed-by:
> Contributed-by: Paul Sandoz<paul.sandoz at oracle.com>, Henry Jen<henry.jen at oracle.com>
>
> diff -r 6be3ce51e61d -r bfdc1ed75460 src/share/classes/java/util/stream/StreamSupport.java
> --- a/src/share/classes/java/util/stream/StreamSupport.java Tue May 28 15:22:30 2013 +0200
> +++ b/src/share/classes/java/util/stream/StreamSupport.java Wed May 29 12:58:02 2013 +0200
> @@ -41,7 +41,11 @@
> *
> * @since 1.8
> */
> -public class StreamSupport {
> +public final class StreamSupport {
> +
> + // Suppresses default constructor, ensuring non-instantiability.
> + private StreamSupport() {}
> +
> /**
> * Creates a new sequential {@code Stream} from a {@code Spliterator}.
> *
> @@ -50,7 +54,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -75,7 +79,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -102,7 +106,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #stream(java.util.Spliterator)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -138,7 +142,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #stream(Spliterator)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -172,7 +176,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)}} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -195,7 +199,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)}} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -220,7 +224,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #intStream(Spliterator.OfInt)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -254,7 +258,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #intStream(Spliterator.OfInt)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -286,7 +290,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -310,7 +314,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -335,7 +339,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #longStream(Spliterator.OfLong)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -369,7 +373,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #longStream(Spliterator.OfLong)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -402,7 +406,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -426,7 +430,7 @@
> *
> *<p>It is strongly recommended the spliterator report a characteristic of
> * {@code IMMUTABLE} or {@code CONCURRENT}, or be
> - *<a href="Spliterator.html#binding">late-binding</a>. Otherwise,
> + *<a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
> * {@link #stream(Supplier, int)} should be used to
> * reduce the scope of potential interference with the source. See
> *<a href="package-summary.html#Non-Interference">Non-Interference</a> for
> @@ -451,7 +455,7 @@
> *<p>
> * For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
> @@ -485,7 +489,7 @@
> *
> *<p>For spliterators that report a characteristic of {@code IMMUTABLE}
> * or {@code CONCURRENT}, or that are
> - *<a href="Spliterator.html#binding">late-binding</a>, it is likely
> + *<a href="../Spliterator.html#binding">late-binding</a>, it is likely
> * more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead.
> * The use of a {@code Supplier} in this form provides a level of
> * indirection that reduces the scope of potential interference with the
>
More information about the core-libs-dev
mailing list