if (allMetadata != null && allMetadata.length > 0) {
for (CreateContainerMetadata metadata : allMetadata) {
Container container = metadata.getContainer();
containers.add(ContainerProxy.wrap(container, fabricServiceProxy));
if (!metadata.isSuccess()) {
throw new FabricException("Failed to create container." , metadata.getFailure());
}
}
}
return containers;