From fdd231289a5929df9d75da9db5fc2cad5e2ac366 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Mon, 3 Jun 2013 10:45:11 +0200 Subject: [PATCH] 8014731: j.u.stream.StreamSupport class has default constructor generated This change set also fixes broken links Co-authored-by: Henry Jen Reviewed-by: alanb, chegar --- .../java/util/stream/StreamSupport.java | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/jdk/src/share/classes/java/util/stream/StreamSupport.java b/jdk/src/share/classes/java/util/stream/StreamSupport.java index ddc4dd5f1cb..2b3cbfaeb76 100644 --- a/jdk/src/share/classes/java/util/stream/StreamSupport.java +++ b/jdk/src/share/classes/java/util/stream/StreamSupport.java @@ -41,7 +41,11 @@ import java.util.function.Supplier; * * @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 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -75,7 +79,7 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -102,7 +106,7 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)}} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -195,7 +199,7 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)}} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -220,7 +224,7 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -310,7 +314,7 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -335,7 +339,7 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -426,7 +430,7 @@ public class StreamSupport { * *

It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be - * late-binding. Otherwise, + * late-binding. Otherwise, * {@link #stream(Supplier, int)} should be used to * reduce the scope of potential interference with the source. See * Non-Interference for @@ -451,7 +455,7 @@ public class StreamSupport { *

* For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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 @@ public class StreamSupport { * *

For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are - * late-binding, it is likely + * late-binding, 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