Use old syntax due to Javadoc 8 issue
Using @code on Java 17 is OK here
This commit is contained in:
parent
3a854b01f6
commit
fa01994df1
|
@ -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<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);
|
||||
* }
|
||||
* </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 -> 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
|
||||
|
|
Loading…
Reference in New Issue