Skip to content

Commit fbef1cd

Browse files
author
Christopher Dancy
committed
Return null, instead of NullPointerException, should no exposedPorts be found
1 parent 1cf2a46 commit fbef1cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class ContainerConfig {
8484

8585
@JsonIgnore
8686
public ExposedPort[] getExposedPorts() {
87-
return exposedPorts.getExposedPorts();
87+
return exposedPorts != null ? exposedPorts.getExposedPorts() : null;
8888
}
8989

9090
public Boolean isNetworkDisabled() {

0 commit comments

Comments
 (0)