Use old syntax due to Javadoc 8 issue

Using @code on Java 17 is OK here
This commit is contained in:
Gary Gregory 2024-07-29 19:30:48 -04:00
parent 3a854b01f6
commit fa01994df1
1 changed files with 9 additions and 13 deletions

View File

@ -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:
*
* <pre>{@code
* Consumer<java.lang.reflect.Method> consumer = m -> {
* <pre>
* Consumer&lt;java.lang.reflect.Method&gt; consumer = m -&gt; {
* try {
* m.invoke(o, args);
* } catch (Throwable t) {
@ -59,20 +58,17 @@ import org.apache.commons.lang3.function.FailablePredicate;
* }
* };
* stream.forEach(consumer);
* }
* </pre>
* <p>
* Using a {@link FailableStream}, this can be rewritten as follows:
* </p>
*
* <pre>
* {@code
* Streams.failable(stream).forEach((m) -> m.invoke(o, args));
* }
* Streams.failable(stream).forEach(m -&gt; m.invoke(o, args));
* </pre>
*
* Obviously, the second version is much more concise and the spirit of Lambda expressions is met better than in the
* first version.
* <p>
* Obviously, the second version is much more concise and the spirit of Lambda expressions is met better than in the first version.
* </p>
*
* @see Stream
* @see Failable