Fix NPE in test containers
Fix NPE accidentally introduced during refinement.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user