diff --git a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java index b5ca892148..877b8e1b03 100644 --- a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java +++ b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java @@ -482,9 +482,11 @@ private void checkHomeAndWarnIfNeeded(TaskListener listener) { } } + @Override protected Object readResolve() { - this.executables = new HashSet<>(); - return this; + KubernetesSlave ks = (KubernetesSlave) super.readResolve(); + ks.executables = new HashSet<>(); + return ks; } /**