summaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-09-05 12:33:39 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2016-09-05 10:02:48 +0000
commit504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3 (patch)
treee65c1813439a25bbab6c81e71c27ba8ccf69970b /shared/src
parent6941d683eb15a8ae10e0d302bcf9608be8825f8a (diff)
downloadvaadin-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 'shared/src')
-rw-r--r--shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/SharedState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java6
17 files changed, 25 insertions, 25 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java b/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
index 52b8ce895d..a37e453835 100644
--- a/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
+++ b/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
@@ -26,8 +26,8 @@ import com.vaadin.shared.communication.SharedState;
public class JavaScriptExtensionState extends SharedState
implements JavaScriptConnectorState {
- private Set<String> callbackNames = new HashSet<String>();
- private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
+ private Set<String> callbackNames = new HashSet<>();
+ private Map<String, Set<String>> rpcInterfaces = new HashMap<>();
@Override
public Set<String> getCallbackNames() {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java b/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
index 818c292fa4..0e2dc2c841 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
@@ -21,7 +21,7 @@ import java.util.Map;
import com.vaadin.shared.ApplicationConstants;
public class LegacyChangeVariablesInvocation extends MethodInvocation {
- private Map<String, Object> variableChanges = new HashMap<String, Object>();
+ private Map<String, Object> variableChanges = new HashMap<>();
public LegacyChangeVariablesInvocation(String connectorId,
String variableName, Object value) {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/SharedState.java b/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
index 6506d0a7ca..6b9c1045c5 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
@@ -59,7 +59,7 @@ public class SharedState implements Serializable {
* com.vaadin.server.Resource)
* @see com.vaadin.client.ui.AbstractConnector#getResourceUrl(String)
*/
- public Map<String, URLReference> resources = new HashMap<String, URLReference>();
+ public Map<String, URLReference> resources = new HashMap<>();
public boolean enabled = true;
/**
diff --git a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
index 15a89a6699..5abf858f42 100644
--- a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
+++ b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
@@ -22,5 +22,5 @@ import java.util.Set;
import com.vaadin.shared.communication.SharedState;
public class JavaScriptManagerState extends SharedState {
- public Set<String> names = new HashSet<String>();
+ public Set<String> names = new HashSet<>();
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java b/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
index 54ec61f93a..d7cddf566a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
@@ -36,7 +36,7 @@ public class AbstractMediaState extends AbstractComponentState {
@NoLayout
public boolean muted;
- public List<URLReference> sources = new ArrayList<URLReference>();
+ public List<URLReference> sources = new ArrayList<>();
- public List<String> sourceTypes = new ArrayList<String>();
+ public List<String> sourceTypes = new ArrayList<>();
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
index 25cee8a587..f1a4ea9be3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
@@ -30,6 +30,6 @@ public class BrowserWindowOpenerState extends AbstractComponentState {
public String uriFragment;
- public Map<String, String> parameters = new HashMap<String, String>();
+ public Map<String, String> parameters = new HashMap<>();
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java b/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
index e18060e3bc..a38b828471 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
@@ -78,7 +78,7 @@ public final class ComponentStateUtil implements Serializable {
public static final void addRegisteredEventListener(SharedState state,
String eventListenerId) {
if (state.registeredEventListeners == null) {
- state.registeredEventListeners = new HashSet<String>();
+ state.registeredEventListeners = new HashSet<>();
}
state.registeredEventListeners.add(eventListenerId);
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java b/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
index 0cfecee087..cb65592516 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
@@ -27,8 +27,8 @@ import com.vaadin.shared.JavaScriptConnectorState;
public class JavaScriptComponentState extends AbstractComponentState
implements JavaScriptConnectorState {
- private Set<String> callbackNames = new HashSet<String>();
- private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
+ private Set<String> callbackNames = new HashSet<>();
+ private Map<String, Set<String>> rpcInterfaces = new HashMap<>();
@Override
public Set<String> getCallbackNames() {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
index a30482b4e7..f304ccad12 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
@@ -26,5 +26,5 @@ public class AbsoluteLayoutState extends AbstractLayoutState {
}
// Maps each component to a position
- public Map<String, String> connectorToCssPosition = new HashMap<String, String>();
+ public Map<String, String> connectorToCssPosition = new HashMap<>();
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
index 21c97a93f9..eefc280649 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
@@ -25,5 +25,5 @@ public class CssLayoutState extends AbstractLayoutState {
{
primaryStyleName = "v-csslayout";
}
- public Map<Connector, String> childCss = new HashMap<Connector, String>();
+ public Map<Connector, String> childCss = new HashMap<>();
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
index 982393b21b..184346b9b7 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
@@ -25,7 +25,7 @@ public class CustomLayoutState extends AbstractLayoutState {
{
primaryStyleName = "v-customlayout";
}
- public Map<Connector, String> childLocations = new HashMap<Connector, String>();
+ public Map<Connector, String> childLocations = new HashMap<>();
public String templateContents;
public String templateName;
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
index 344953d591..93dbb7ab83 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
@@ -56,7 +56,7 @@ public enum Resolution {
*/
public static Iterable<Resolution> getResolutionsHigherOrEqualTo(
Resolution r) {
- List<Resolution> resolutions = new ArrayList<Resolution>();
+ List<Resolution> resolutions = new ArrayList<>();
Resolution[] values = Resolution.values();
for (int i = r.ordinal(); i < values.length; i++) {
resolutions.add(values[i]);
@@ -74,7 +74,7 @@ public enum Resolution {
* @return An iterable for the resolutions lower than r
*/
public static List<Resolution> getResolutionsLowerThan(Resolution r) {
- List<Resolution> resolutions = new ArrayList<Resolution>();
+ List<Resolution> resolutions = new ArrayList<>();
Resolution[] values = Resolution.values();
for (int i = r.ordinal() - 1; i >= 0; i--) {
resolutions.add(values[i]);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
index add8eb8938..15e17b5ab8 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
@@ -102,7 +102,7 @@ public class GridState extends TabIndexState {
/**
* Column order in grid.
*/
- public List<String> columnOrder = new ArrayList<String>();
+ public List<String> columnOrder = new ArrayList<>();
/** The number of frozen columns. */
@DelegateToWidget
diff --git a/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
index 000e396e12..c38c76852a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
@@ -36,9 +36,9 @@ public class GridLayoutState extends AbstractLayoutState {
public int columns = 0;
public int marginsBitmask = 0;
// Set of indexes of implicitly Ratios rows and columns
- public Set<Integer> explicitRowRatios = new HashSet<Integer>();;
- public Set<Integer> explicitColRatios = new HashSet<Integer>();
- public Map<Connector, ChildComponentData> childData = new HashMap<Connector, GridLayoutState.ChildComponentData>();
+ public Set<Integer> explicitRowRatios = new HashSet<>();;
+ public Set<Integer> explicitColRatios = new HashSet<>();
+ public Map<Connector, ChildComponentData> childData = new HashMap<>();
public boolean hideEmptyRowsAndColumns = false;
public float[] rowExpand;
public float[] colExpand;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
index a5d2d3a89c..fb8d4b9301 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.AlignmentInfo;
public class AbstractOrderedLayoutState extends AbstractLayoutState {
public boolean spacing = false;
- public HashMap<Connector, ChildComponentData> childData = new HashMap<Connector, ChildComponentData>();
+ public HashMap<Connector, ChildComponentData> childData = new HashMap<>();
public int marginsBitmask = 0;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
index de39a63438..f1b01fc076 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
@@ -36,7 +36,7 @@ public class TabsheetState extends AbstractComponentState {
@NoLayout
public int tabIndex;
- public List<TabState> tabs = new ArrayList<TabState>();
+ public List<TabState> tabs = new ArrayList<>();
/** true to show the tab bar, false to only show the contained component */
public boolean tabsVisible = true;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java b/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
index cc43ddb938..82054e1d30 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
@@ -32,7 +32,7 @@ public class UIState extends TabIndexState {
// Informing users of assistive devices, that the content of this container
// is announced automatically and does not need to be navigated into
public String overlayContainerLabel = "This content is announced automatically and does not need to be navigated into.";
- public Map<String, NotificationTypeConfiguration> notificationConfigurations = new HashMap<String, NotificationTypeConfiguration>();
+ public Map<String, NotificationTypeConfiguration> notificationConfigurations = new HashMap<>();
{
notificationConfigurations.put("error",
new NotificationTypeConfiguration("Error: ",
@@ -117,7 +117,7 @@ public class UIState extends TabIndexState {
public boolean alwaysUseXhrForServerRequests = false;
public PushMode mode = PushMode.DISABLED;
public String pushUrl = null;
- public Map<String, String> parameters = new HashMap<String, String>();
+ public Map<String, String> parameters = new HashMap<>();
{
parameters.put(TRANSPORT_PARAM,
Transport.WEBSOCKET.getIdentifier());
@@ -137,7 +137,7 @@ public class UIState extends TabIndexState {
}
public static class LocaleServiceState implements Serializable {
- public List<LocaleData> localeData = new ArrayList<LocaleData>();
+ public List<LocaleData> localeData = new ArrayList<>();
}
public static class LocaleData implements Serializable {