You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/02/07 15:34:42 UTC
[commons-lang] 08/08: Better local variable name.
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
commit 63d7c27bef02b9fd3037463a60ae0109bff80e85
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Feb 7 10:33:24 2021 -0500
Better local variable name.
---
src/main/java/org/apache/commons/lang3/function/Objects.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/function/Objects.java b/src/main/java/org/apache/commons/lang3/function/Objects.java
index 59d20ab..93081c3 100755
--- a/src/main/java/org/apache/commons/lang3/function/Objects.java
+++ b/src/main/java/org/apache/commons/lang3/function/Objects.java
@@ -150,13 +150,13 @@ public class Objects {
public static <T, E extends Throwable> @Nonnull T requireNonNull(@Nullable T value, @Nonnull FailableSupplier<T, E> defaultValueSupplier) throws NullPointerException {
if (value == null) {
final FailableSupplier<T, ?> supplier = requireNonNull(defaultValueSupplier, "The supplier must not be null");
- final T o;
+ final T defaultValue;
try {
- o = supplier.get();
+ defaultValue = supplier.get();
} catch (Throwable t) {
throw Failable.rethrow(t);
}
- return requireNonNull(o, "The supplier must not return null.");
+ return requireNonNull(defaultValue, "The supplier must not return null.");
}
return value;
}