From 5450534dc8887d68e5ee252e6302c1e7a0c7d86a Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sun, 18 May 2008 23:32:20 +0000 Subject: [PATCH] fixed a problem in the initialization order issue. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9414 71c3de6d-444a-0410-be80-ed276b4c234a --- .../main/java/hudson/slaves/CommandStartMethod.java | 4 ++++ .../main/java/hudson/slaves/ComputerStartMethod.java | 10 ++++++---- core/src/main/java/hudson/slaves/JNLPStartMethod.java | 4 ++++ 3 files changed, 14 insertions(+), 4 deletions(-) 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); + } } -- GitLab