In-line some local vars

This commit is contained in:
Gary Gregory 2022-06-18 13:27:48 -04:00
parent c6cfdc6149
commit 01f8edc18b
1 changed files with 2 additions and 4 deletions

View File

@ -210,8 +210,7 @@ public class ExceptionUtils {
return StringUtils.EMPTY;
}
final String clsName = ClassUtils.getShortClassName(th, null);
final String msg = th.getMessage();
return clsName + ": " + StringUtils.defaultString(msg);
return clsName + ": " + StringUtils.defaultString(th.getMessage());
}
/**
@ -469,8 +468,7 @@ public class ExceptionUtils {
* @return the array of throwables, never null
*/
public static Throwable[] getThrowables(final Throwable throwable) {
final List<Throwable> list = getThrowableList(throwable);
return list.toArray(ArrayUtils.EMPTY_THROWABLE_ARRAY);
return getThrowableList(throwable).toArray(ArrayUtils.EMPTY_THROWABLE_ARRAY);
}
/**