This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 28552e877 Javadoc
28552e877 is described below
commit 28552e87791297fa507d78ab351970f89d559443
Author: Gary D. Gregory <[email protected]>
AuthorDate: Mon Sep 29 16:36:59 2025 -0400
Javadoc
---
.../java/org/apache/commons/lang3/ObjectUtils.java | 66 +++++++++++-----------
.../apache/commons/lang3/function/Failable.java | 8 +--
2 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/ObjectUtils.java
b/src/main/java/org/apache/commons/lang3/ObjectUtils.java
index fd4edc741..517132208 100644
--- a/src/main/java/org/apache/commons/lang3/ObjectUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ObjectUtils.java
@@ -606,13 +606,13 @@ public static <T> Class<T> getClass(final T object) {
* is obtained, all following suppliers are not executed anymore. If all
the return values are {@code null} or no suppliers are provided then {@code
null}
* is returned.
*
- * <pre>
- * ObjectUtils.firstNonNullLazy(null, () -> null) = null
- * ObjectUtils.firstNonNullLazy(() -> null, () -> "") = ""
- * ObjectUtils.firstNonNullLazy(() -> "", () -> throw new
IllegalStateException()) = ""
- * ObjectUtils.firstNonNullLazy(() -> null, () -> "zz) = "zz"
- * ObjectUtils.firstNonNullLazy() = null
- * </pre>
+ * <pre>{@code
+ * ObjectUtils.firstNonNullLazy(null, () -> null)
= null
+ * ObjectUtils.firstNonNullLazy(() -> null, () -> "")
= ""
+ * ObjectUtils.firstNonNullLazy(() -> "", () -> throw new
IllegalStateException()) = ""
+ * ObjectUtils.firstNonNullLazy(() -> null, () -> "zz)
= "zz"
+ * ObjectUtils.firstNonNullLazy()
= null
+ * }</pre>
*
* @param <T> the type of the return values.
* @param suppliers the suppliers returning the values to test. {@code
null} values are ignored. Suppliers may return {@code null} or a value of type
@@ -633,14 +633,14 @@ public static <T> T getFirstNonNull(final Supplier<T>...
suppliers) {
* The caller responsible for thread-safety and exception handling of
default value supplier.
* </p>
*
- * <pre>
- * ObjectUtils.getIfNull(null, () -> null) = null
- * ObjectUtils.getIfNull(null, null) = null
- * ObjectUtils.getIfNull(null, () -> "") = ""
- * ObjectUtils.getIfNull(null, () -> "zz") = "zz"
- * ObjectUtils.getIfNull("abc", *) = "abc"
- * ObjectUtils.getIfNull(Boolean.TRUE, *) = Boolean.TRUE
- * </pre>
+ * <pre>{@code
+ * ObjectUtils.getIfNull(null, () -> null) = null
+ * ObjectUtils.getIfNull(null, null) = null
+ * ObjectUtils.getIfNull(null, () -> "") = ""
+ * ObjectUtils.getIfNull(null, () -> "zz") = "zz"
+ * ObjectUtils.getIfNull("abc", *) = "abc"
+ * ObjectUtils.getIfNull(Boolean.TRUE, *) = Boolean.TRUE
+ * }</pre>
*
* @param <T> the type of the object.
* @param object the {@link Object} to test, may be {@code null}.
@@ -1249,16 +1249,16 @@ public static String toString(final Object obj, final
String nullStr) {
* Gets the {@code toString} of an {@link Supplier}'s {@link
Supplier#get()} returning
* a specified text if {@code null} input.
*
- * <pre>
- * ObjectUtils.toString(() -> obj, () -> expensive())
+ * <pre>{@code
+ * ObjectUtils.toString(() -> obj, () -> expensive())
* </pre>
* <pre>
- * ObjectUtils.toString(() -> null, () -> expensive()) =
result of expensive()
- * ObjectUtils.toString(() -> null, () -> expensive()) =
result of expensive()
- * ObjectUtils.toString(() -> "", () -> expensive()) = ""
- * ObjectUtils.toString(() -> "bat", () -> expensive()) =
"bat"
- * ObjectUtils.toString(() -> Boolean.TRUE, () -> expensive()) =
"true"
- * </pre>
+ * ObjectUtils.toString(() -> null, () -> expensive()) = result of
expensive()
+ * ObjectUtils.toString(() -> null, () -> expensive()) = result of
expensive()
+ * ObjectUtils.toString(() -> "", () -> expensive()) = ""
+ * ObjectUtils.toString(() -> "bat", () -> expensive()) = "bat"
+ * ObjectUtils.toString(() -> Boolean.TRUE, () -> expensive()) = "true"
+ * }</pre>
*
* @param obj the Object to {@code toString}, may be null.
* @param supplier the Supplier of String used on {@code null} input, may
be null.
@@ -1273,16 +1273,16 @@ public static String toString(final Supplier<Object>
obj, final Supplier<String>
* Gets the {@code toString} of an {@link Object} returning
* a specified text if {@code null} input.
*
- * <pre>
- * ObjectUtils.toString(obj, () -> expensive())
- * </pre>
- * <pre>
- * ObjectUtils.toString(null, () -> expensive()) = result of
expensive()
- * ObjectUtils.toString(null, () -> expensive()) = result of
expensive()
- * ObjectUtils.toString("", () -> expensive()) = ""
- * ObjectUtils.toString("bat", () -> expensive()) = "bat"
- * ObjectUtils.toString(Boolean.TRUE, () -> expensive()) = "true"
- * </pre>
+ * <pre>{@code
+ * ObjectUtils.toString(obj, () -> expensive())
+ * }</pre>
+ * <pre>{@code
+ * ObjectUtils.toString(null, () -> expensive()) = result of
expensive()
+ * ObjectUtils.toString(null, () -> expensive()) = result of
expensive()
+ * ObjectUtils.toString("", () -> expensive()) = ""
+ * ObjectUtils.toString("bat", () -> expensive()) = "bat"
+ * ObjectUtils.toString(Boolean.TRUE, () -> expensive()) = "true"
+ * }</pre>
*
* @param <T> the obj type (used to provide better source compatibility in
3.14.0).
* @param obj the Object to {@code toString}, may be null.
diff --git a/src/main/java/org/apache/commons/lang3/function/Failable.java
b/src/main/java/org/apache/commons/lang3/function/Failable.java
index 1096e9031..2fee999da 100644
--- a/src/main/java/org/apache/commons/lang3/function/Failable.java
+++ b/src/main/java/org/apache/commons/lang3/function/Failable.java
@@ -44,7 +44,7 @@
* constructs like:
*
* <pre>{@code
- * Consumer<java.lang.reflect.Method> consumer = m -> {
+ * Consumer<java.lang.reflect.Method> consumer = m -> {
* try {
* m.invoke(o, args);
* } catch (Throwable t) {
@@ -59,9 +59,9 @@
* FailableConsumer<O,? extends Throwable>}, this can be written like
follows:
* </p>
*
- * <pre>
- * Functions.accept((m) -> m.invoke(o, args));
- * </pre>
+ * <pre>{@code
+ * Functions.accept(m -> m.invoke(o, args));
+ * }</pre>
*
* <p>
* Obviously, the second version is much more concise and the spirit of Lambda
expressions is met better than the second