diff --git a/core/src/main/java/hudson/slaves/CommandStartMethod.java b/core/src/main/java/hudson/slaves/CommandStartMethod.java index 7d123f0b3c..a4144e3acf 100644 --- a/core/src/main/java/hudson/slaves/CommandStartMethod.java +++ b/core/src/main/java/hudson/slaves/CommandStartMethod.java @@ -99,4 +99,8 @@ public class CommandStartMethod extends ComputerStartMethod { } private static final Logger LOGGER = Logger.getLogger(CommandStartMethod.class.getName()); + + static { + LIST.add(DESCRIPTOR); + } } diff --git a/core/src/main/java/hudson/slaves/ComputerStartMethod.java b/core/src/main/java/hudson/slaves/ComputerStartMethod.java index e47579cfb1..67467bd368 100644 --- a/core/src/main/java/hudson/slaves/ComputerStartMethod.java +++ b/core/src/main/java/hudson/slaves/ComputerStartMethod.java @@ -45,8 +45,10 @@ public abstract class ComputerStartMethod implements Describable LIST = new DescriptorList( - JNLPStartMethod.DESCRIPTOR, - CommandStartMethod.DESCRIPTOR - ); + public static final DescriptorList LIST = new DescriptorList(); + + static { + LIST.load(JNLPStartMethod.class); + LIST.load(CommandStartMethod.class); + } } diff --git a/core/src/main/java/hudson/slaves/JNLPStartMethod.java b/core/src/main/java/hudson/slaves/JNLPStartMethod.java index 5f4e112f76..54114746e2 100644 --- a/core/src/main/java/hudson/slaves/JNLPStartMethod.java +++ b/core/src/main/java/hudson/slaves/JNLPStartMethod.java @@ -33,4 +33,8 @@ public class JNLPStartMethod extends ComputerStartMethod { return "Launch slave agents via JNLP"; } }; + + static { + LIST.add(DESCRIPTOR); + } }