()
| 91 | } |
| 92 | |
| 93 | private Optional<DockerProtocol> getDocker() { |
| 94 | if (dockerClient.isPresent()) { |
| 95 | return dockerClient; |
| 96 | } |
| 97 | |
| 98 | synchronized (this) { |
| 99 | if (dockerClient.isEmpty()) { |
| 100 | VersionCommand versionCommand = new VersionCommand(client); |
| 101 | dockerClient = |
| 102 | apiVersion != null |
| 103 | ? versionCommand.getDockerProtocol(apiVersion) |
| 104 | : versionCommand.getDockerProtocol(); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | return dockerClient; |
| 109 | } |
| 110 | } |
no test coverage detected