Skip to content
Permalink
Browse files

[FIXED JENKINS-39520] ExtensionList.removeAll is unimplemented.

  • Loading branch information...
jglick committed Nov 4, 2016
1 parent 035c7e2 commit b95b07f52d3d4e5191cf6109b770cc2010026b20
@@ -150,7 +150,9 @@ private static void doAddSpecificDescriptors() {
}
}
LOGGER.log(Level.FINE, "clearing {0}", old);
all().removeAll(old);
for (CustomOrganizationFolderDescriptor d : old) {
all().remove(d);
}
if (ExtensionList.lookup(MultiBranchProjectFactoryDescriptor.class).isEmpty()) {
LOGGER.fine("no MultiBranchProjectFactoryDescriptor");
return; // nothing like workflow-multibranch installed, so do not even offer this option
@@ -32,6 +32,7 @@
import hudson.model.View;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
@@ -112,6 +113,17 @@ public void dynamicLoadReversed() throws Exception {
assertEquals(Collections.singletonList("MockNavigator"), newItemTypes());
}

@Issue("JENKINS-39520")
@SuppressWarnings("deprecation") // ExtensionList.add simulating dynamic installation
@Test
public void dynamicLoad2() throws Exception {
assertEquals(Collections.emptyList(), newItemTypes());
ExtensionList.lookup(SCMNavigatorDescriptor.class).add(new SomeNavigatorNoFactoryInstalledDescriptor());
ExtensionList.lookup(MultiBranchProjectFactoryDescriptor.class).add(new SomeNavigatorSomeFactoryInstalledDescriptor2());
ExtensionList.lookup(SCMNavigatorDescriptor.class).add(new SomeNavigatorSomeFactoryInstalledDescriptor1());
assertEquals(Arrays.asList("MockNavigator", "MockNavigator"), newItemTypes());
}

@Issue("JENKINS-31949")
@Test
public void insideFolder() throws Exception {

0 comments on commit b95b07f

Please sign in to comment.
You can’t perform that action at this time.