diff options
author | Peter Verhas <peter@verhas.com> | 2020-02-17 15:58:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 09:58:19 -0500 |
commit | 80839be4577e298335a1d3887518bf1ef4455f64 (patch) | |
tree | 044128b5ba50b42b8d33c6f1db9ddb9b9e4d2b22 /src/main/java/org/apache/commons/lang3/Functions.java | |
parent | f20df2124907ec20479bff5f8784a8dbbdc48425 (diff) | |
download | apache-commons-lang-80839be4577e298335a1d3887518bf1ef4455f64.tar.gz |
JavaDoc was modified adding {@code around pre formatted text so there is no need for HTML escape sequences (#490)
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/Functions.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/Functions.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/org/apache/commons/lang3/Functions.java b/src/main/java/org/apache/commons/lang3/Functions.java index 91b4c9a08..e7808acc9 100644 --- a/src/main/java/org/apache/commons/lang3/Functions.java +++ b/src/main/java/org/apache/commons/lang3/Functions.java @@ -40,21 +40,21 @@ import org.apache.commons.lang3.Streams.FailableStream; * 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> - * Consumer<java.lang.reflect.Method> consumer = (m) -> { + * <pre>{@code + * Consumer<java.lang.reflect.Method> consumer = (m) -> { * try { * m.invoke(o, args); * } catch (Throwable t) { * throw Functions.rethrow(t); * } * }; - * </pre> + * }</pre> * By replacing a {@link java.util.function.Consumer Consumer<O>} with a * {@link FailableConsumer FailableConsumer<O,? extends Throwable>}, this can be * written like follows: - * <pre> - * Functions.accept((m) -> m.invoke(o,args)); - * </pre> + * <pre>{@code + * Functions.accept((m) -> m.invoke(o,args)); + * }</pre> * Obviously, the second version is much more concise and the spirit of * Lambda expressions is met better than the second version. */ @@ -446,10 +446,10 @@ public class Functions { * and regardless of success, or failure. If either the original action, or * any of the resource action fails, then the <em>first</em> failure (aka * {@link Throwable} is rethrown. Example use: - * <pre> + * <pre>{@code * final FileInputStream fis = new FileInputStream("my.file"); - * Functions.tryWithResources(useInputStream(fis), null, () -> fis.close()); - * </pre> + * Functions.tryWithResources(useInputStream(fis), null, () -> fis.close()); + * }</pre> * @param pAction The action to execute. This object <em>will</em> always * be invoked. * @param pErrorHandler An optional error handler, which will be invoked finally, @@ -509,10 +509,10 @@ public class Functions { * and regardless of success, or failure. If either the original action, or * any of the resource action fails, then the <em>first</em> failure (aka * {@link Throwable} is rethrown. Example use: - * <pre> + * <pre>{@code * final FileInputStream fis = new FileInputStream("my.file"); - * Functions.tryWithResources(useInputStream(fis), () -> fis.close()); - * </pre> + * Functions.tryWithResources(useInputStream(fis), () -> fis.close()); + * }</pre> * @param pAction The action to execute. This object <em>will</em> always * be invoked. * @param pResources The resource actions to execute. <em>All</em> resource |