[JENKINS-53401] Tie nodeProperties to the current node for save purpose

上级 2652a1b1
......@@ -146,8 +146,8 @@ public abstract class Slave extends Node implements Serializable {
*/
private String label="";
private /*almost final*/ DescribableList<NodeProperty<?>,NodePropertyDescriptor> nodeProperties =
new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Jenkins.getInstance().getNodesObject());
private /*almost final*/ DescribableList<NodeProperty<?>,NodePropertyDescriptor> nodeProperties =
new DescribableList<>(this);
/**
* Lazily computed set of labels from {@link #label}.
......@@ -559,7 +559,7 @@ public abstract class Slave extends Node implements Serializable {
*/
protected Object readResolve() {
if(nodeProperties==null)
nodeProperties = new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Jenkins.getInstance().getNodesObject());
nodeProperties = new DescribableList<>(this);
return this;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册