diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index 163ca5b0b094c9f9c75cf61a49eae9d3851b3be8..eb2a3b9acf85c32573b421da39e9ad0b757f1a6e 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -54,7 +54,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -122,7 +121,7 @@ public abstract class Slave extends Node implements Serializable { */ private String label=""; - private final DescribableList,NodePropertyDescriptor> nodeProperties = new DescribableList,NodePropertyDescriptor>(Hudson.getInstance()); + private /*almost final*/ DescribableList,NodePropertyDescriptor> nodeProperties = new DescribableList,NodePropertyDescriptor>(Hudson.getInstance()); /** * Lazily computed set of labels from {@link #label}. @@ -416,6 +415,8 @@ public abstract class Slave extends Node implements Serializable { ? new JNLPLauncher() : new CommandLauncher(agentCommand); } + if(nodeProperties==null) + nodeProperties = new DescribableList,NodePropertyDescriptor>(Hudson.getInstance()); return this; }