From 52f9125aba897fe5be8aca92cc72a157730b7f50 Mon Sep 17 00:00:00 2001 From: Travis Kinney Date: Mon, 16 Oct 2017 10:06:32 -0700 Subject: [PATCH] StopJobCommand: Remove Unreachable Code (#5091) This code will never get executed, and its logic is duplicated in the HandleStopJobCompleted() method. --- .../engine/remoting/commands/StopJob.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/System.Management.Automation/engine/remoting/commands/StopJob.cs b/src/System.Management.Automation/engine/remoting/commands/StopJob.cs index 7cf6cb8c99..76219bdcbd 100644 --- a/src/System.Management.Automation/engine/remoting/commands/StopJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/StopJob.cs @@ -161,17 +161,6 @@ namespace Microsoft.PowerShell.Commands else { job.StopJob(); - var parentJob = job as ContainerParentJob; - if (parentJob != null && parentJob.ExecutionError.Count > 0) - { - foreach ( - var e in - parentJob.ExecutionError.Where( - e => e.FullyQualifiedErrorId == "ContainerParentJobStopError")) - { - WriteError(e); - } - } } } }