diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java index f14c0725802..04aad1f956a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java @@ -133,8 +133,7 @@ class DockerRegistryConfigAuthentication implements DockerRegistryAuthentication } private CredentialHelper getCredentialHelper(String serverUrl) { - String name = this.dockerConfig.getCredHelpers().get(serverUrl); - name = (StringUtils.hasText(name)) ? name : this.dockerConfig.getCredsStore(); + String name = this.dockerConfig.getCredHelpers().getOrDefault(serverUrl, this.dockerConfig.getCredsStore()); return (name != null) ? this.credentialHelperFactory.apply(name.trim()) : null; }