Adapt to deprecation of StringUtils.isEmpty(Object)

See gh-23774
This commit is contained in:
Andy Wilkinson
2020-10-22 17:09:33 +01:00
parent 3bfe1b00b5
commit 2d8528d5bd
10 changed files with 21 additions and 20 deletions

View File

@@ -87,10 +87,10 @@ public class DockerEngineException extends RuntimeException {
Assert.notNull(uri, "URI must not be null");
StringBuilder message = new StringBuilder(
"Docker API call to '" + host + uri + "' failed with status code " + statusCode);
if (!StringUtils.isEmpty(reasonPhrase)) {
if (StringUtils.hasLength(reasonPhrase)) {
message.append(" \"").append(reasonPhrase).append("\"");
}
if (responseMessage != null && !StringUtils.isEmpty(responseMessage.getMessage())) {
if (responseMessage != null && StringUtils.hasLength(responseMessage.getMessage())) {
message.append(" and message \"").append(responseMessage.getMessage()).append("\"");
}
if (errors != null && !errors.isEmpty()) {