diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 926d4cee4d..9430e0b125 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -978,7 +978,7 @@ public class Functions { @Restricted(DoNotUse.class) @RestrictedSince("2.12") public static List> getComputerLauncherDescriptors() { - return Jenkins.get().>getDescriptorList(ComputerLauncher.class); + return Jenkins.get().getDescriptorList(ComputerLauncher.class); } /** diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index 63180e9691..45ff31bd60 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -728,7 +728,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * Returns all the registered {@link SCMDescriptor}s. */ public static DescriptorExtensionList> all() { - return Jenkins.get().>getDescriptorList(SCM.class); + return Jenkins.get().getDescriptorList(SCM.class); } /** diff --git a/core/src/test/java/hudson/FunctionsTest.java b/core/src/test/java/hudson/FunctionsTest.java index bb5eb4e039..5b74567cb9 100644 --- a/core/src/test/java/hudson/FunctionsTest.java +++ b/core/src/test/java/hudson/FunctionsTest.java @@ -179,7 +179,7 @@ public class FunctionsTest { when(view.getOwner().getItemGroup()).thenReturn(parent); createMockAncestors(req, createAncestor(j, "../.."), createAncestor(view, ".")); TopLevelItem i = createMockItem(parent, "job/i/"); - when(view.getItems()).thenReturn(Collections.emptyList()); + when(view.getItems()).thenReturn(Collections.emptyList()); String result = Functions.getRelativeLinkTo(i); assertEquals("/jenkins/job/i/", result); } diff --git a/core/src/test/java/hudson/model/MockItem.java b/core/src/test/java/hudson/model/MockItem.java index cce38184c8..47e545fb85 100644 --- a/core/src/test/java/hudson/model/MockItem.java +++ b/core/src/test/java/hudson/model/MockItem.java @@ -34,7 +34,7 @@ import java.util.List; public class MockItem extends Queue.Item { public MockItem(long id) { - super(null, Collections.emptyList(), id, null); + super(null, Collections.emptyList(), id, null); } public MockItem(Queue.Task task) { diff --git a/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java b/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java index 639067dc7b..5d3cec0c34 100644 --- a/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java +++ b/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java @@ -350,7 +350,7 @@ public class HistoryPageFilterTest { @Test @Issue("JENKINS-40718") public void should_search_builds_by_build_params() throws IOException { - List runs = ImmutableList.of( + List runs = ImmutableList.of( new MockBuild(2).withBuildParameters(ImmutableMap.of("env", "dummyEnv")), new MockBuild(1).withBuildParameters(ImmutableMap.of("env", "otherEnv"))); assertOneMatchingBuildForGivenSearchStringAndRunItems("dummyEnv", runs); diff --git a/test/src/test/java/hudson/ExtensionListTest.java b/test/src/test/java/hudson/ExtensionListTest.java index de2ee11d53..ae48d2b642 100644 --- a/test/src/test/java/hudson/ExtensionListTest.java +++ b/test/src/test/java/hudson/ExtensionListTest.java @@ -121,7 +121,7 @@ public class ExtensionListTest { public void descriptorLookup() throws Exception { Descriptor d = new Sishamo().getDescriptor(); - DescriptorExtensionList> list = j.jenkins.>getDescriptorList(Fish.class); + DescriptorExtensionList> list = j.jenkins.getDescriptorList(Fish.class); assertSame(d,list.get(Sishamo.DescriptorImpl.class)); assertSame(d, j.jenkins.getDescriptor(Sishamo.class)); @@ -132,7 +132,7 @@ public class ExtensionListTest { // imagine that this is a static instance, like it is in many LIST static field in Hudson. DescriptorList LIST = new DescriptorList(Fish.class); - DescriptorExtensionList> list = j.jenkins.>getDescriptorList(Fish.class); + DescriptorExtensionList> list = j.jenkins.getDescriptorList(Fish.class); assertEquals(2,list.size()); assertNotNull(list.get(Tai.DescriptorImpl.class)); assertNotNull(list.get(Saba.DescriptorImpl.class)); diff --git a/test/src/test/java/hudson/model/ParametersAction2Test.java b/test/src/test/java/hudson/model/ParametersAction2Test.java index 5b2e665126..c8eab55337 100644 --- a/test/src/test/java/hudson/model/ParametersAction2Test.java +++ b/test/src/test/java/hudson/model/ParametersAction2Test.java @@ -139,7 +139,7 @@ public class ParametersAction2Test { @Issue("SECURITY-170") public void whitelistedParameter() throws Exception { FreeStyleProject p = j.createFreeStyleProject(); - p.addProperty(new ParametersDefinitionProperty(Arrays.asList( + p.addProperty(new ParametersDefinitionProperty(Arrays.asList( new StringParameterDefinition("foo", "foo"), new StringParameterDefinition("bar", "bar")))); diff --git a/test/src/test/java/hudson/slaves/NodeProvisionerTest.java b/test/src/test/java/hudson/slaves/NodeProvisionerTest.java index 92a791db6f..dc425490d8 100644 --- a/test/src/test/java/hudson/slaves/NodeProvisionerTest.java +++ b/test/src/test/java/hudson/slaves/NodeProvisionerTest.java @@ -185,7 +185,7 @@ public class NodeProvisionerTest { // no build on the master, to make sure we get everything from the cloud r.jenkins.setNumExecutors(0); - r.jenkins.setNodes(Collections.emptyList()); + r.jenkins.setNodes(Collections.emptyList()); return cloud; } diff --git a/test/src/test/java/hudson/tasks/LogRotatorTest.java b/test/src/test/java/hudson/tasks/LogRotatorTest.java index 85d9877652..a0782239dc 100644 --- a/test/src/test/java/hudson/tasks/LogRotatorTest.java +++ b/test/src/test/java/hudson/tasks/LogRotatorTest.java @@ -74,7 +74,7 @@ public class LogRotatorTest { assertEquals(Result.FAILURE, build(project)); // #2 assertEquals(Result.FAILURE, build(project)); // #3 assertEquals(1, numberOf(project.getLastSuccessfulBuild())); - project.getBuildersList().replaceBy(Collections.emptySet()); + project.getBuildersList().replaceBy(Collections.emptySet()); assertEquals(Result.SUCCESS, build(project)); // #4 assertEquals(4, numberOf(project.getLastSuccessfulBuild())); assertNull(project.getBuildByNumber(1)); @@ -92,7 +92,7 @@ public class LogRotatorTest { assertEquals(Result.UNSTABLE, build(project)); // #2 assertEquals(Result.UNSTABLE, build(project)); // #3 assertEquals(1, numberOf(project.getLastStableBuild())); - project.getPublishersList().replaceBy(Collections.emptySet()); + project.getPublishersList().replaceBy(Collections.emptySet()); assertEquals(Result.SUCCESS, build(project)); // #4 assertNull(project.getBuildByNumber(1)); assertNull(project.getBuildByNumber(2)); diff --git a/test/src/test/java/hudson/tasks/MavenTest.java b/test/src/test/java/hudson/tasks/MavenTest.java index 698d658850..aadb8f8994 100644 --- a/test/src/test/java/hudson/tasks/MavenTest.java +++ b/test/src/test/java/hudson/tasks/MavenTest.java @@ -274,7 +274,7 @@ public class MavenTest { @Issue("JENKINS-18898") @Test public void testNullHome() { EnvVars env = new EnvVars(); - new MavenInstallation("_", "", Collections.>emptyList()).buildEnvVars(env); + new MavenInstallation("_", "", Collections.emptyList()).buildEnvVars(env); assertTrue(env.isEmpty()); } diff --git a/test/src/test/java/hudson/tools/InstallerTranslatorTest.java b/test/src/test/java/hudson/tools/InstallerTranslatorTest.java index 4c6905441f..e6df77e970 100644 --- a/test/src/test/java/hudson/tools/InstallerTranslatorTest.java +++ b/test/src/test/java/hudson/tools/InstallerTranslatorTest.java @@ -51,7 +51,7 @@ public class InstallerTranslatorTest { @Issue("JENKINS-23517") @Test public void offlineNodeForJDK() throws Exception { - Node slave = new DumbSlave("disconnected-slave", null, "/wherever", "1", Node.Mode.NORMAL, null, new JNLPLauncher(true), RetentionStrategy.NOOP, Collections.>emptyList()); + Node slave = new DumbSlave("disconnected-slave", null, "/wherever", "1", Node.Mode.NORMAL, null, new JNLPLauncher(true), RetentionStrategy.NOOP, Collections.emptyList()); String globalDefaultLocation = "/usr/lib/jdk"; JDK jdk = new JDK("my-jdk", globalDefaultLocation, Collections.singletonList(new InstallSourceProperty(Collections.singletonList(new CommandInstaller(null, "irrelevant", "/opt/jdk"))))); r.jenkins.getJDKs().add(jdk); diff --git a/test/src/test/java/jenkins/model/TransientActionFactoryTest.java b/test/src/test/java/jenkins/model/TransientActionFactoryTest.java index 7510890730..469823ccc0 100644 --- a/test/src/test/java/jenkins/model/TransientActionFactoryTest.java +++ b/test/src/test/java/jenkins/model/TransientActionFactoryTest.java @@ -100,16 +100,16 @@ public class TransientActionFactoryTest { // getAllActions List allActions = p.getAllActions(); assertEquals(1, LazyFactory.count); - assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); - assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(1)); - assertThat(Util.filter(allActions, MyProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(Util.filter(allActions, MyProminentProjectAction.class), Matchers.iterableWithSize(1)); LazyFactory.count = 0; // getActions(Class) - assertThat(p.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(p.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); assertEquals(0, LazyFactory.count); - assertThat(p.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(p.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(1)); assertEquals(1, LazyFactory.count); - assertThat(p.getActions(MyProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(p.getActions(MyProminentProjectAction.class), Matchers.iterableWithSize(1)); assertEquals(2, LazyFactory.count); LazyFactory.count = 0; // different context type @@ -117,10 +117,10 @@ public class TransientActionFactoryTest { assertNull(d.getAction(FoldableAction.class)); assertNull(d.getAction(ProminentProjectAction.class)); allActions = d.getAllActions(); - assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); - assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(0)); - assertThat(d.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); - assertThat(d.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(0)); + assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(0)); + assertThat(d.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(d.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(0)); assertEquals(0, LazyFactory.count); } @SuppressWarnings("rawtypes") @@ -145,13 +145,13 @@ public class TransientActionFactoryTest { // getAllActions List allActions = p.getAllActions(); assertEquals(1, OldFactory.count); - assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); - assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(Util.filter(allActions, FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(Util.filter(allActions, ProminentProjectAction.class), Matchers.iterableWithSize(1)); OldFactory.count = 0; // getActions(Class) - assertThat(p.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); + assertThat(p.getActions(FoldableAction.class), Matchers.iterableWithSize(0)); assertEquals(1, OldFactory.count); - assertThat(p.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(1)); + assertThat(p.getActions(ProminentProjectAction.class), Matchers.iterableWithSize(1)); assertEquals(2, OldFactory.count); } @TestExtension("compatibility") public static class OldFactory extends TransientActionFactory { diff --git a/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java b/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java index a50ce37a27..630b47651e 100644 --- a/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java +++ b/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java @@ -142,7 +142,7 @@ public class SimpleBuildWrapperTest { } private static class SpecialEnvSlave extends Slave { SpecialEnvSlave(File remoteFS, ComputerLauncher launcher) throws Descriptor.FormException, IOException { - super("special", "SpecialEnvSlave", remoteFS.getAbsolutePath(), 1, Mode.NORMAL, "", launcher, RetentionStrategy.NOOP, Collections.>emptyList()); + super("special", "SpecialEnvSlave", remoteFS.getAbsolutePath(), 1, Mode.NORMAL, "", launcher, RetentionStrategy.NOOP, Collections.emptyList()); } @Override public Computer createComputer() { return new SpecialEnvComputer(this); diff --git a/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java b/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java index 39c7009441..58b422e813 100644 --- a/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java +++ b/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java @@ -69,7 +69,7 @@ public class HistoryPageFilterCaseSensitiveSearchTest { User.get(TEST_USER_NAME).addProperty(new UserSearchProperty(false)); //test logic - final List runs = ImmutableList.of(new MockRun(2, Result.FAILURE), new MockRun(1, Result.SUCCESS)); + final List runs = ImmutableList.of(new MockRun(2, Result.FAILURE), new MockRun(1, Result.SUCCESS)); assertNoMatchingBuildsForGivenSearchStringAndRunItems(searchString, runs, assertionOnSearchResults); } @@ -83,7 +83,7 @@ public class HistoryPageFilterCaseSensitiveSearchTest { historyPageFilter.setSearchString(searchString); //when - historyPageFilter.add(runs, Collections.emptyList()); + historyPageFilter.add(runs, Collections.emptyList()); //then assertionOnSearchResults.doAssertion(historyPageFilter); diff --git a/test/src/test/java/lib/form/RepeatableTest.java b/test/src/test/java/lib/form/RepeatableTest.java index 99868f48f6..22bd02b667 100644 --- a/test/src/test/java/lib/form/RepeatableTest.java +++ b/test/src/test/java/lib/form/RepeatableTest.java @@ -335,7 +335,7 @@ public class RepeatableTest extends HudsonTestCase { } public DescriptorExtensionList> getFruitDescriptors() { - return jenkins.>getDescriptorList(Fruit.class); + return jenkins.getDescriptorList(Fruit.class); } public void testDropdownList() throws Exception {