From fa01994df1ca311a2840703207fccea7ebd17d6b Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 29 Jul 2024 19:30:48 -0400 Subject: [PATCH] Use old syntax due to Javadoc 8 issue Using @code on Java 17 is OK here --- .../apache/commons/lang3/stream/Streams.java | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/stream/Streams.java b/src/main/java/org/apache/commons/lang3/stream/Streams.java index 3e552b112..61b1d7bb7 100644 --- a/src/main/java/org/apache/commons/lang3/stream/Streams.java +++ b/src/main/java/org/apache/commons/lang3/stream/Streams.java @@ -45,13 +45,12 @@ import org.apache.commons.lang3.function.FailableFunction; import org.apache.commons.lang3.function.FailablePredicate; /** - * Provides utility functions, and classes for working with the {@link java.util.stream} package, or more generally, - * with Java 8 lambdas. More specifically, it attempts to address the fact that lambdas are supposed not to throw - * Exceptions, at least not checked Exceptions, AKA instances of {@link Exception}. This enforces the use of constructs - * like: + * Provides utility functions, and classes for working with the {@link java.util.stream} package, or more generally, with Java 8 lambdas. More specifically, it + * attempts to address the fact that lambdas are supposed not to throw Exceptions, at least not checked Exceptions, AKA instances of {@link Exception}. This + * enforces the use of constructs like: * - *
{@code
- * Consumer consumer = m -> {
+ * 
+ * Consumer<java.lang.reflect.Method> consumer = m -> {
  *     try {
  *         m.invoke(o, args);
  *     } catch (Throwable t) {
@@ -59,20 +58,17 @@ import org.apache.commons.lang3.function.FailablePredicate;
  *     }
  * };
  * stream.forEach(consumer);
- * }
  * 
*

* Using a {@link FailableStream}, this can be rewritten as follows: *

* *
- * {@code
- * Streams.failable(stream).forEach((m) -> m.invoke(o, args));
- * }
+ * Streams.failable(stream).forEach(m -> m.invoke(o, args));
  * 
- * - * Obviously, the second version is much more concise and the spirit of Lambda expressions is met better than in the - * first version. + *

+ * Obviously, the second version is much more concise and the spirit of Lambda expressions is met better than in the first version. + *

* * @see Stream * @see Failable