提交 5baac357 编写于 作者: K kohsuke

Persistence of Slave bypasses the constructor, so nodeProperties need to be...

Persistence of Slave bypasses the constructor, so nodeProperties need to be set back to non-null in readResolve.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15709 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6a689ab8
......@@ -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<NodeProperty<?>,NodePropertyDescriptor> nodeProperties = new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Hudson.getInstance());
private /*almost final*/ DescribableList<NodeProperty<?>,NodePropertyDescriptor> nodeProperties = new DescribableList<NodeProperty<?>,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<NodeProperty<?>,NodePropertyDescriptor>(Hudson.getInstance());
return this;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册