From 185b8a9a57dde33969061324af10e68f798ffe0d Mon Sep 17 00:00:00 2001 From: Travis Kinney Date: Wed, 11 Oct 2017 23:16:19 -0700 Subject: [PATCH] StopJobCommand: Remove duplicate code 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 7cf6cb8c994..76219bdcbd7 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 @@ protected override void ProcessRecord() 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); - } - } } } }