Skip to content

Commit 289fb1e

Browse files
committed
in fact it could be null
1 parent 92fb19b commit 289fb1e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/java/com/github/dockerjava/core/DockerConfigFile.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void addAuthConfig(AuthConfig config) {
5050
}
5151

5252
@CheckForNull
53-
public AuthConfig resolveAuthConfig(@Nonnull String hostname) {
53+
public AuthConfig resolveAuthConfig(@CheckForNull String hostname) {
5454
if (StringUtils.isEmpty(hostname) || AuthConfig.DEFAULT_SERVER_ADDRESS.equals(hostname)) {
5555
return auths.get(AuthConfig.DEFAULT_SERVER_ADDRESS);
5656
}
@@ -124,10 +124,8 @@ public static DockerConfigFile loadConfig(@CheckForNull String dockerConfigPath)
124124
return new DockerConfigFile();
125125
}
126126

127-
DockerConfigFile dockerConfig;
128-
129127
//parse new docker config file format
130-
dockerConfig = loadCurrentConfig(dockerConfigPath);
128+
DockerConfigFile dockerConfig = loadCurrentConfig(dockerConfigPath);
131129

132130
//parse old auth config file format
133131
if (dockerConfig == null) {

0 commit comments

Comments
 (0)