Fix NPE in test containers

Fix NPE accidentally introduced during refinement.
pull/11498/merge
Phillip Webb 7 years ago
parent fb614c64da
commit 85d3f5a180

@ -52,7 +52,9 @@ class Container implements TestRule {
this.containerFactory = () -> {
T container = (T) new GenericContainer<>(dockerImageName)
.withExposedPorts(port);
customizer.accept(container);
if (customizer != null) {
customizer.accept(container);
}
return container;
};
}

Loading…
Cancel
Save