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,7 +137,9 @@ public Container importContainer(final ContainerType type,
public void deleteContainer(final long containerId, boolean force)
throws IOException {
final Container container = containerSet.getContainer(containerId);
getHandler(container).deleteContainer(container, force);
if (container != null) {
getHandler(container).deleteContainer(container, force);
}
}
/**