Skip to content

Commit

Permalink
Address review comments from @bsideup
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorth committed Nov 19, 2016
1 parent 7b3edaa commit 381d9c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void stopContainer(String containerId, String imageName) {

List<Container> allContainers = dockerClient.listContainersCmd().withShowAll(true).exec();

if (allContainers.stream().noneMatch(it -> it.getId().equals(containerId))) {
if (allContainers.stream().map(Container::getId).noneMatch(containerId::equals)) {
LOGGER.trace("Was going to clean up container but it apparently no longer exists: {}");
return;
}
Expand Down Expand Up @@ -116,9 +116,9 @@ private void stopContainer(String containerId, String imageName) {
}

try {
InspectContainerResponse containerInfo = dockerClient.inspectContainerCmd(containerId).exec();
dockerClient.inspectContainerCmd(containerId).exec();
} catch (NotFoundException e) {
LOGGER.trace("Was going to kill container but it apparently no longer exists: {}");
LOGGER.trace("Was going to remove container but it apparently no longer exists: {}");
return;
}

Expand Down

0 comments on commit 381d9c7

Please sign in to comment.