From 8d6e7437480692d62e7b6402fc1a1ccc8ab032aa Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Fri, 4 Nov 2022 16:21:54 -0400 Subject: [PATCH] Simplify --- .../org/apache/commons/lang3/exception/ExceptionUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java index 218fab913..08f038af9 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java @@ -238,9 +238,8 @@ public class ExceptionUtils { * @since 2.2 */ public static String getRootCauseMessage(final Throwable throwable) { - Throwable root = getRootCause(throwable); - root = root == null ? throwable : root; - return getMessage(root); + final Throwable root = getRootCause(throwable); + return getMessage(root == null ? throwable : root); } /**