Skip to content

Commit

Permalink
Fix NPE in test containers
Browse files Browse the repository at this point in the history
Fix NPE accidentally introduced during refinement.
  • Loading branch information
philwebb committed Jan 9, 2018
1 parent fb614c6 commit 85d3f5a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ <T extends GenericContainer<T>> Container(String dockerImageName, int port,
this.containerFactory = () -> {
T container = (T) new GenericContainer<>(dockerImageName)
.withExposedPorts(port);
customizer.accept(container);
if (customizer != null) {
customizer.accept(container);
}
return container;
};
}
Expand Down

0 comments on commit 85d3f5a

Please sign in to comment.