diff options
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org')
4 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java index 1ad15e5cd3..f5ddc247ee 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java @@ -102,14 +102,14 @@ public class CommonUtilsTest { */ private void assertSortedLike(String... inputs) { List<String> expected = Arrays.asList(inputs); - List<String> tmp = new ArrayList<String>(expected); + List<String> tmp = new ArrayList<>(expected); Collections.shuffle(tmp, new Random(1)); Collections.sort(tmp, CommonUtils.STRING_ASCENDING_COMPARATOR); assertEquals(expected, tmp); - List<String> expectedWithoutDuplicates = new ArrayList<String>( - new LinkedHashSet<String>(expected)); - List<String> shuffeled = new ArrayList<String>(expected); + List<String> expectedWithoutDuplicates = new ArrayList<>( + new LinkedHashSet<>(expected)); + List<String> shuffeled = new ArrayList<>(expected); Collections.shuffle(shuffeled, new Random(1)); TreeSet<String> sortedSet = new TreeSet<String>( CommonUtils.STRING_ASCENDING_COMPARATOR); diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/prefpages/configuration/GlobalConfigurationPageTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/prefpages/configuration/GlobalConfigurationPageTest.java index 5c12d43d88..2eb2191b18 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/prefpages/configuration/GlobalConfigurationPageTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/prefpages/configuration/GlobalConfigurationPageTest.java @@ -378,7 +378,7 @@ public class GlobalConfigurationPageTest { @Test public void testRemoveValue() throws Exception { - List<String> values = new ArrayList<String>(2); + List<String> values = new ArrayList<>(2); values.add("true"); values.add("false"); config.setStringList(TESTSECTION, null, TESTNAME, values); @@ -401,7 +401,7 @@ public class GlobalConfigurationPageTest { @Test public void testRemoveSubSection() throws Exception { - List<String> values = new ArrayList<String>(2); + List<String> values = new ArrayList<>(2); values.add("true"); values.add("false"); config.setStringList(TESTSECTION, null, TESTNAME, values); @@ -427,7 +427,7 @@ public class GlobalConfigurationPageTest { @Test public void testRemoveSection() throws Exception { - List<String> values = new ArrayList<String>(2); + List<String> values = new ArrayList<>(2); values.add("true"); values.add("false"); config.setStringList(TESTSECTION, null, TESTNAME, values); diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java index 02bb84488e..b6cf090f81 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java @@ -473,7 +473,7 @@ public class TestUtil { */ public static void assertRepositoryContainsFiles(Repository repository, String[] paths) throws Exception { - Set<String> expectedfiles = new HashSet<String>(); + Set<String> expectedfiles = new HashSet<>(); for (String path : paths) expectedfiles.add(path); try (TreeWalk treeWalk = new TreeWalk(repository)) { @@ -546,7 +546,7 @@ public class TestUtil { private static HashMap<String, String> mkmap(String... args) { if ((args.length % 2) > 0) throw new IllegalArgumentException("needs to be pairs"); - HashMap<String, String> map = new HashMap<String, String>(); + HashMap<String, String> map = new HashMap<>(); for (int i = 0; i < args.length; i += 2) map.put(args[i], args[i+1]); return map; @@ -695,7 +695,7 @@ public class TestUtil { * @return node containing the text */ public static SWTBotTreeItem getNode(SWTBotTreeItem[] nodes, String searchText) { - List<String> texts = new ArrayList<String>(); + List<String> texts = new ArrayList<>(); List<SWTBotTreeItem> matchingItems = new ArrayList<SWTBotTreeItem>(); for (SWTBotTreeItem item : nodes) { diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java index bf0adfd573..393cdf2804 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java @@ -110,7 +110,7 @@ public class SharingWizardTest extends LocalRepositoryTestCase { @After public void after() throws Exception { - Set<File> d = new TreeSet<File>(); + Set<File> d = new TreeSet<>(); erase(projectName0, d); erase(projectName1, d); erase(projectName2, d); |