diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-05 12:33:39 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2016-09-05 10:02:48 +0000 |
commit | 504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3 (patch) | |
tree | e65c1813439a25bbab6c81e71c27ba8ccf69970b /client/src/test | |
parent | 6941d683eb15a8ae10e0d302bcf9608be8825f8a (diff) | |
download | vaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.tar.gz vaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.zip |
Use diamond operator where it can be used
Does not modify compatibility packages to keep to closer to Vaadin 7.7
Change-Id: Ic9c4944eb90218290545a04ecd7455eb63910012
Diffstat (limited to 'client/src/test')
-rwxr-xr-x | client/src/test/java/com/vaadin/client/DateTimeServiceTest.java | 2 | ||||
-rw-r--r-- | client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java | 20 |
2 files changed, 11 insertions, 11 deletions
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<Date, Integer> isoWeekNumbers = new HashMap<Date, Integer>(); + static Map<Date, Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer>(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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> 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<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3); ds.ensureAvailability(5, 1); } @Test(expected = UnsupportedOperationException.class) public void testUnsupportedIteratorRemove() { - ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3); + ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3); ds.asList().iterator().remove(); } @Test public void sortColumn() { - ListDataSource<Integer> ds = new ListDataSource<Integer>(3, 4, 2, 3, 1); + ListDataSource<Integer> ds = new ListDataSource<>(3, 4, 2, 3, 1); // TODO Should be simplified to sort(). No point in providing these // trivial comparators. |