]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use diamond in generic creation where possible
authorPer-Åke Minborg <minborg@speedment.com>
Fri, 28 Oct 2016 06:14:17 +0000 (23:14 -0700)
committerHenri Sara <hesara@vaadin.com>
Wed, 2 Nov 2016 14:19:08 +0000 (14:19 +0000)
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7214

server/src/main/java/com/vaadin/server/BootstrapHandler.java
server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
server/src/main/java/com/vaadin/ui/GridLayout.java
server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java
server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java

index 84ee3c2334f712b00a68164a673251a6dc9ba1ee..fd30d2891d23aadc43d356a71c275cef30ff7932 100644 (file)
@@ -276,7 +276,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
 
             BootstrapContext context = new BootstrapContext(response,
                     new BootstrapFragmentResponse(this, request, session,
-                            uiClass, new ArrayList<Node>(), provider));
+                            uiClass, new ArrayList<>(), provider));
 
             setupMainDiv(context);
 
index 54ab672589bf22cf374b96c8c273c057fd785bb4..e68fbb59033f8e4048ff64ff4ebb6171fea7f8a6 100644 (file)
@@ -716,7 +716,7 @@ public class ComponentSizeValidator implements Serializable {
     public static List<InvalidLayout> validateLayouts(UI ui) {
         List<InvalidLayout> invalidRelativeSizes = ComponentSizeValidator
                 .validateComponentRelativeSizes(ui.getContent(),
-                        new ArrayList<ComponentSizeValidator.InvalidLayout>(),
+                        new ArrayList<>(),
                         null);
 
         // Also check any existing subwindows
index 08ca2cb2b30a043533a407e2f6d356254d14d5b8..a634e47cf324f37237fc83e7c358303e6a4d57c5 100644 (file)
@@ -1281,7 +1281,7 @@ public class GridLayout extends AbstractLayout
         for (Element e : design.children()) {
             if (e.tagName().equalsIgnoreCase("row")) {
                 rowElements.add(e);
-                rows.add(new HashMap<Integer, Component>());
+                rows.add(new HashMap<>());
 
             }
         }
@@ -1333,7 +1333,7 @@ public class GridLayout extends AbstractLayout
                             + colspan; ++colIndex) {
                         if (rowIndex == rows.size()) {
                             // Rowspan with not enough rows. Fix by adding rows.
-                            rows.add(new HashMap<Integer, Component>());
+                            rows.add(new HashMap<>());
                         }
                         rows.get(rowIndex).put(colIndex + skippedColumns,
                                 child);
index 87cdae84af330a09c0a69e0d153bf1b1358f60de..18287d7f901c391bfaebfdea2b5a7d724cdf271b 100644 (file)
@@ -136,7 +136,7 @@ public abstract class ClickableRenderer<T, V> extends AbstractRenderer<T, V> {
                 T item = grid.getDataCommunicator().getKeyMapper().get(rowKey);
                 Column column = grid.getColumn(columnId);
 
-                fireEvent(new RendererClickEvent<T>(grid, item, column,
+                fireEvent(new RendererClickEvent<>(grid, item, column,
                         mouseDetails));
             }
         });
index e488c2f964acae8f31d134216cea6288e6f30385..5752929f973f567c92c76a3edc1cfcabe9905d1c 100644 (file)
@@ -124,7 +124,7 @@ public abstract class DeclarativeTestBase<T extends Component>
                 System.out.println("No comparator found for " + c.getName()
                         + ". Using introspector.");
             }
-            return new IntrospectorEqualsAsserter<T>(c);
+            return new IntrospectorEqualsAsserter<>(c);
         }
         return comp;
     }