Commit 85d3f5a1 authored by Phillip Webb's avatar Phillip Webb

Fix NPE in test containers

Fix NPE accidentally introduced during refinement.
parent fb614c64
......@@ -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;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment