Skip to content

Commit 8af6f2f

Browse files
author
Marcus Linke
committed
Polish test and comment
1 parent 2edfcb0 commit 8af6f2f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/github/dockerjava/api/model/ExposedPort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public ExposedPort(int port) {
6565
* @param scheme
6666
* the {@link #getScheme() scheme}, <code>tcp</code> or <code>udp</code>
6767
* @param port
68-
* the {@link #getPort() port number or port range}
68+
* the {@link #getPort() port number}
6969
* @deprecated use {@link #ExposedPort(int, InternetProtocol)}
7070
*/
7171
@Deprecated

src/test/java/com/github/dockerjava/core/command/BuildImageCmdImplTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.github.dockerjava.api.model.ExposedPort;
3535
import com.github.dockerjava.api.model.PortBinding;
3636
import com.github.dockerjava.api.model.Ports;
37+
import com.github.dockerjava.api.model.Ports.Binding;
3738
import com.github.dockerjava.client.AbstractDockerClientTest;
3839
import com.github.dockerjava.core.util.CompressArchiveUtil;
3940

@@ -263,7 +264,7 @@ public void testBuildFromPrivateRegistry() throws Exception {
263264
CreateContainerResponse testregistry = dockerClient
264265
.createContainerCmd("testregistry:2")
265266
.withName("registry")
266-
.withPortBindings(new PortBinding(Ports.Binding.bindPortSpec("5000"), ExposedPort.tcp(5000)))
267+
.withPortBindings(new PortBinding(Binding.bindPort(5000), ExposedPort.tcp(5000)))
267268
.withEnv("REGISTRY_AUTH=htpasswd", "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm",
268269
"REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd", "REGISTRY_LOG_LEVEL=debug",
269270
"REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt", "REGISTRY_HTTP_TLS_KEY=/certs/domain.key")

0 commit comments

Comments
 (0)