diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 5e2ab71644b9..a2275d7d1fbb 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -1779,6 +1779,10 @@ public static SimplePageDecorator getSimplePageDecorator() { return SimplePageDecorator.first(); } + public static List getSimplePageDecorators() { + return SimplePageDecorator.all(); + } + public static List> getCloudDescriptors() { return Cloud.all(); } diff --git a/core/src/main/java/jenkins/model/SimplePageDecorator.java b/core/src/main/java/jenkins/model/SimplePageDecorator.java index 4d3b0682bda3..89e6fe3a8eac 100644 --- a/core/src/main/java/jenkins/model/SimplePageDecorator.java +++ b/core/src/main/java/jenkins/model/SimplePageDecorator.java @@ -23,10 +23,12 @@ */ package jenkins.model; -import hudson.DescriptorExtensionList; import hudson.ExtensionPoint; import hudson.model.Describable; import hudson.model.Descriptor; + +import java.util.List; + /** * Participates in the rendering of the login page * @@ -56,17 +58,21 @@ public final String getUrl() { return "descriptor/"+clazz.getName(); } + /** + * Returns all login page decorators. + * @since TODO + */ + public static List all() { + return Jenkins.get().getDescriptorList(SimplePageDecorator.class); + } + /** * The first found LoginDecarator, there can only be one. * @return the first found {@link SimplePageDecorator} */ public static SimplePageDecorator first(){ - DescriptorExtensionList descriptorList = Jenkins.getInstanceOrNull().getDescriptorList(SimplePageDecorator.class); - if (descriptorList.size() >= 1) { - return descriptorList.get(0); - } else { - return null; - } + List decorators = all(); + return decorators.isEmpty() ? null : decorators.get(0); } } diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly index f588306700be..ff5d9ea136a5 100644 --- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly +++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly @@ -44,6 +44,7 @@ THE SOFTWARE. + ${%Create an account! [Jenkins]} @@ -292,6 +293,11 @@ THE SOFTWARE. } + diff --git a/core/src/main/resources/jenkins/model/Jenkins/login.jelly b/core/src/main/resources/jenkins/model/Jenkins/login.jelly index 3276493af8ab..7fbe3dc26fde 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/login.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/login.jelly @@ -50,6 +50,7 @@ THE SOFTWARE. + @@ -145,8 +146,9 @@ THE SOFTWARE. diff --git a/core/src/test/java/hudson/UtilTest.java b/core/src/test/java/hudson/UtilTest.java index 7aae66de482d..f537bc7b9bc1 100644 --- a/core/src/test/java/hudson/UtilTest.java +++ b/core/src/test/java/hudson/UtilTest.java @@ -57,6 +57,7 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.junit.Assume; +import org.junit.Ignore; import org.junit.Test; import org.jvnet.hudson.test.Issue; @@ -352,6 +353,7 @@ public void testDeleteContentsRecursive() throws Exception { } @Test + @Ignore("Frequently flaky test") public void testDeleteContentsRecursive_onWindows() throws Exception { Assume.assumeTrue(Functions.isWindows()); final File dir = tmp.newFolder();