Skip to content

Commit 9d5d674

Browse files
author
Robert Fink
authored
Remove redundant formatting code in ServiceException (#15)
1 parent 929f8fe commit 9d5d674

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

errors/src/main/java/com/palantir/remoting/api/errors/ServiceException.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ private static String renderSafeMessage(ErrorType errorType, List<Arg<?>> args)
105105
}
106106

107107
private static String renderNoArgsMessage(ErrorType errorType) {
108-
return errorType.code().name().equals(errorType.name())
109-
? String.format("ServiceException: %s", errorType.code())
110-
: String.format("ServiceException: %s (%s)", errorType.code(), errorType.name());
108+
return String.format("ServiceException: %s (%s)", errorType.code(), errorType.name());
111109
}
112110

113111
@Override

0 commit comments

Comments
 (0)