HDDS-1756. DeleteContainerCommandHandler fails with NPE. Contributed by Nanda kumar(#1095).

This commit is contained in:
Nanda kumar 2019-07-16 15:06:41 +05:30 committed by Mukul Kumar Singh
parent 7a93be0f60
commit 1502e6a22f

View File

@ -137,8 +137,10 @@ public Container importContainer(final ContainerType type,
public void deleteContainer(final long containerId, boolean force)
throws IOException {
final Container container = containerSet.getContainer(containerId);
if (container != null) {
getHandler(container).deleteContainer(container, force);
}
}
/**
* Given a container, returns its handler instance.