From 504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 5 Sep 2016 12:33:39 +0300 Subject: Use diamond operator where it can be used Does not modify compatibility packages to keep to closer to Vaadin 7.7 Change-Id: Ic9c4944eb90218290545a04ecd7455eb63910012 --- .../java/com/vaadin/client/DateTimeServiceTest.java | 2 +- .../vaadin/client/ui/grid/ListDataSourceTest.java | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'client/src/test') diff --git a/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java b/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java index 912abc412a..1329b7fdc9 100755 --- a/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java +++ b/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java @@ -12,7 +12,7 @@ public class DateTimeServiceTest { final long MILLISECONDS_PER_DAY = 24 * 3600 * 1000; - static Map isoWeekNumbers = new HashMap(); + static Map isoWeekNumbers = new HashMap<>(); static { isoWeekNumbers.put(getDate(2005, 02, 02), 5); diff --git a/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java b/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java index b3a4f24ebb..7d9bf530ce 100644 --- a/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java +++ b/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java @@ -32,7 +32,7 @@ public class ListDataSourceTest { @Test public void testDataSourceConstruction() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); assertEquals(4, ds.size()); assertEquals(0, (int) ds.getRow(0)); @@ -40,7 +40,7 @@ public class ListDataSourceTest { assertEquals(2, (int) ds.getRow(2)); assertEquals(3, (int) ds.getRow(3)); - ds = new ListDataSource(Arrays.asList(0, 1, 2, 3)); + ds = new ListDataSource<>(Arrays.asList(0, 1, 2, 3)); assertEquals(4, ds.size()); assertEquals(0, (int) ds.getRow(0)); @@ -52,7 +52,7 @@ public class ListDataSourceTest { @Test public void testListAddOperation() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); DataChangeHandler handler = EasyMock .createNiceMock(DataChangeHandler.class); @@ -76,7 +76,7 @@ public class ListDataSourceTest { @Test public void testListAddAllOperation() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); DataChangeHandler handler = EasyMock .createNiceMock(DataChangeHandler.class); @@ -102,7 +102,7 @@ public class ListDataSourceTest { @Test public void testListRemoveOperation() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); DataChangeHandler handler = EasyMock .createNiceMock(DataChangeHandler.class); @@ -124,7 +124,7 @@ public class ListDataSourceTest { @Test public void testListRemoveAllOperation() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); DataChangeHandler handler = EasyMock .createNiceMock(DataChangeHandler.class); @@ -144,7 +144,7 @@ public class ListDataSourceTest { @Test public void testListClearOperation() throws Exception { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); DataChangeHandler handler = EasyMock .createNiceMock(DataChangeHandler.class); @@ -162,19 +162,19 @@ public class ListDataSourceTest { @Test(expected = IllegalStateException.class) public void testFetchingNonExistantItem() { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); ds.ensureAvailability(5, 1); } @Test(expected = UnsupportedOperationException.class) public void testUnsupportedIteratorRemove() { - ListDataSource ds = new ListDataSource(0, 1, 2, 3); + ListDataSource ds = new ListDataSource<>(0, 1, 2, 3); ds.asList().iterator().remove(); } @Test public void sortColumn() { - ListDataSource ds = new ListDataSource(3, 4, 2, 3, 1); + ListDataSource ds = new ListDataSource<>(3, 4, 2, 3, 1); // TODO Should be simplified to sort(). No point in providing these // trivial comparators. -- cgit v1.2.3