From 16bce45fec8861dd040e3d0231a71acabd6b5160 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 29 Jul 2024 19:37:34 -0400 Subject: [PATCH] Use Javadoc @code --- src/main/java/org/apache/commons/lang3/Streams.java | 2 +- .../org/apache/commons/lang3/stream/Streams.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/Streams.java b/src/main/java/org/apache/commons/lang3/Streams.java index 1776b829a..bf3c86a1c 100644 --- a/src/main/java/org/apache/commons/lang3/Streams.java +++ b/src/main/java/org/apache/commons/lang3/Streams.java @@ -53,7 +53,7 @@ import org.apache.commons.lang3.Functions.FailablePredicate; * } * 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. 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 61b1d7bb7..831d7b648 100644 --- a/src/main/java/org/apache/commons/lang3/stream/Streams.java +++ b/src/main/java/org/apache/commons/lang3/stream/Streams.java @@ -49,8 +49,8 @@ import org.apache.commons.lang3.function.FailablePredicate; * 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: * - *
- * Consumer<java.lang.reflect.Method> consumer = m -> {
+ * 
{@code
+ * Consumer consumer = m -> {
  *     try {
  *         m.invoke(o, args);
  *     } catch (Throwable t) {
@@ -58,14 +58,14 @@ import org.apache.commons.lang3.function.FailablePredicate;
  *     }
  * };
  * stream.forEach(consumer);
- * 
+ * }
*

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

* - *
- * Streams.failable(stream).forEach(m -> m.invoke(o, args));
- * 
+ *
{@code
+ * 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. *