Remove unnecessary toString() calls

See gh-38739
This commit is contained in:
Yanming Zhou
2023-12-19 22:24:49 -08:00
committed by Phillip Webb
parent b6e87cee35
commit 8599e5a986
19 changed files with 30 additions and 31 deletions

View File

@@ -234,9 +234,8 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
String extensionBeanNames = extensions.stream()
.map(ExtensionBean::getBeanName)
.collect(Collectors.joining(", "));
throw new IllegalStateException("Unable to map duplicate endpoint operations: " + duplicates.toString()
+ " to " + endpointBean.getBeanName()
+ (extensions.isEmpty() ? "" : " (" + extensionBeanNames + ")"));
throw new IllegalStateException("Unable to map duplicate endpoint operations: " + duplicates + " to "
+ endpointBean.getBeanName() + (extensions.isEmpty() ? "" : " (" + extensionBeanNames + ")"));
}
}