Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-04-14 06:22:49 -0400
committerMichael Keppler2019-04-26 08:08:09 -0400
commit1ec405f058b677b8d83234d8fffa132f800cefd7 (patch)
treeb51caf24bf2501a6a5754deac75e8391b40a1eee /org.eclipse.egit.ui.test/src
parent95bf547c006e288a7cd42b99f03ceaa42a9279b9 (diff)
downloadegit-1ec405f058b677b8d83234d8fffa132f800cefd7.tar.gz
egit-1ec405f058b677b8d83234d8fffa132f800cefd7.tar.xz
egit-1ec405f058b677b8d83234d8fffa132f800cefd7.zip
Remove unnecessary type specifications
Since Java 7 the diamond operator can be used instead of explicit typeparameters. Change-Id: I602e7b1bf45ca1c6612305e655fc4618742d0d4f Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'org.eclipse.egit.ui.test/src')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java8
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/prefpages/configuration/GlobalConfigurationPageTest.java6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java2
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 1ad15e5cd..f5ddc247e 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 5c12d43d8..2eb2191b1 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 02bb84488..b6cf090f8 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 bf0adfd57..393cdf280 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);

Back to the top