You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtime
Jason found this through code inspection. This code will never run because of the previous if statement and in fact the code is duplicated in the HandleStopJobCompleted() where it is correct. So we can simply remove the code at line 164.
varparentJob=jobasContainerParentJob;if(parentJob!=null&&parentJob.ExecutionError.Count>0){foreach(vareinparentJob.ExecutionError.Where(
e =>e.FullyQualifiedErrorId=="ContainerParentJobStopError")){WriteError(e);}}
Paul Higinbotham (@PaulHigin) I seem to be missing something with this issue and the associated PR. HandleStopJobCompleted appears to be only used for Job2 instances and not Job instances. While the code is duplicated, removing it for Job instances doesn't appear to be correct.
Paul explained it to me off line. Job does not derive from ContainerParentJob so, other than the job.StopJob() statement, the rest of the else cause is dead code.
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtime
Activity
joeyaiello commentedon May 23, 2017
If we have a "code cleanup" label at some point, this would fall under it.
travisty- commentedon Oct 12, 2017
Hi PowerShell Team (@PowerShell), I just submit a PR (#5091) for this issue.
dantraMSFT commentedon Oct 12, 2017
Paul Higinbotham (@PaulHigin) I seem to be missing something with this issue and the associated PR. HandleStopJobCompleted appears to be only used for Job2 instances and not Job instances. While the code is duplicated, removing it for Job instances doesn't appear to be correct.
Paul explained it to me off line. Job does not derive from ContainerParentJob so, other than the job.StopJob() statement, the rest of the else cause is dead code.