HDDS-1756. DeleteContainerCommandHandler fails with NPE. Contributed by Nanda kumar(#1095).
This commit is contained in:
parent
7a93be0f60
commit
1502e6a22f
@ -137,8 +137,10 @@ public Container importContainer(final ContainerType type,
|
|||||||
public void deleteContainer(final long containerId, boolean force)
|
public void deleteContainer(final long containerId, boolean force)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
final Container container = containerSet.getContainer(containerId);
|
final Container container = containerSet.getContainer(containerId);
|
||||||
|
if (container != null) {
|
||||||
getHandler(container).deleteContainer(container, force);
|
getHandler(container).deleteContainer(container, force);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a container, returns its handler instance.
|
* Given a container, returns its handler instance.
|
||||||
|
Loading…
Reference in New Issue
Block a user