From 1612e4302f7fd456fa54120fbaef013c931e0698 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 28 Jul 2023 18:25:04 -0400 Subject: [PATCH 1/2] Do not even try to use `LogTaskListener` --- .../plugins/workflow/steps/durable_task/DurableTaskStep.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java index 0057eaad..64b4e712 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java @@ -430,11 +430,11 @@ private void getWorkspaceProblem(Exception x) { LOGGER.log(Level.FINEST, "JENKINS-34021: DurableTaskStep.Execution.listener present in {0}", context); } else { LOGGER.log(Level.WARNING, "JENKINS-34021: TaskListener not available upon request in {0}", context); - l = new LogTaskListener(LOGGER, Level.FINE); + l = TaskListener.NULL; } } catch (Exception x) { LOGGER.log(Level.FINE, "JENKINS-34021: could not get TaskListener in " + context, x); - l = new LogTaskListener(LOGGER, Level.FINE); + l = TaskListener.NULL; recurrencePeriod = 0; } return l; From a4d908371f5df26f13bb53bc3555ec6fb8090371 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 28 Jul 2023 18:26:52 -0400 Subject: [PATCH 2/2] Unused import --- .../plugins/workflow/steps/durable_task/DurableTaskStep.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java index 64b4e712..4b56cab0 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java @@ -47,7 +47,6 @@ import hudson.slaves.OfflineCause; import hudson.util.DaemonThreadFactory; import hudson.util.FormValidation; -import hudson.util.LogTaskListener; import hudson.util.NamingThreadFactory; import hudson.util.StreamTaskListener; import java.io.FilterOutputStream;