From 0e49dcf26ef7b445115170686d738b0fd4a0c4ce Mon Sep 17 00:00:00 2001 From: Robert Fink Date: Mon, 17 Jul 2017 18:26:32 -0700 Subject: [PATCH] Remove redundant formatting code in ServiceException --- .../com/palantir/remoting/api/errors/ServiceException.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/errors/src/main/java/com/palantir/remoting/api/errors/ServiceException.java b/errors/src/main/java/com/palantir/remoting/api/errors/ServiceException.java index 3779651b4..c48af3a80 100644 --- a/errors/src/main/java/com/palantir/remoting/api/errors/ServiceException.java +++ b/errors/src/main/java/com/palantir/remoting/api/errors/ServiceException.java @@ -105,9 +105,7 @@ private static String renderSafeMessage(ErrorType errorType, List> args) } private static String renderNoArgsMessage(ErrorType errorType) { - return errorType.code().name().equals(errorType.name()) - ? String.format("ServiceException: %s", errorType.code()) - : String.format("ServiceException: %s (%s)", errorType.code(), errorType.name()); + return String.format("ServiceException: %s (%s)", errorType.code(), errorType.name()); } @Override