From bfe1c07958184b3043298cc045c0ae011cede77b Mon Sep 17 00:00:00 2001 From: kl Date: Thu, 16 Mar 2023 10:06:24 +0800 Subject: [PATCH] chore(apollo-java): Streamlined code --- .../java/com/ctrip/framework/apollo/util/ExceptionUtil.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/util/ExceptionUtil.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/util/ExceptionUtil.java index ed97ca6c..28df3f5f 100644 --- a/apollo-client/src/main/java/com/ctrip/framework/apollo/util/ExceptionUtil.java +++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/util/ExceptionUtil.java @@ -53,7 +53,7 @@ public static String getDetailMessage(Throwable ex) { continue; } builder.append(" [Cause: ") - .append(getThrowingClassName(cause)) + .append(cause.getClass().getSimpleName()) .append("(") .append(cause.getMessage()) .append(")"); @@ -64,7 +64,4 @@ public static String getDetailMessage(Throwable ex) { return builder.toString(); } - public static String getThrowingClassName(Throwable throwable) { - return throwable.getClass().getSimpleName(); - } }