From 0cfb20938f2b15767ebbd367ad8312642b947c8c Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 24 Feb 2017 17:06:58 +0200 Subject: Revert diamond operator changes --- .../vaadin/v7/client/connectors/GridConnector.java | 24 +++++++++++----------- .../client/connectors/RpcDataSourceConnector.java | 2 +- .../java/com/vaadin/v7/client/ui/VCalendar.java | 22 ++++++++++---------- .../com/vaadin/v7/client/ui/VFilterSelect.java | 8 ++++---- .../java/com/vaadin/v7/client/ui/VOptionGroup.java | 10 ++++----- .../v7/client/ui/calendar/CalendarConnector.java | 16 +++++++-------- .../v7/client/ui/calendar/schedule/DateCell.java | 14 ++++++------- .../v7/client/ui/combobox/ComboBoxConnector.java | 2 +- .../widget/grid/datasources/ListDataSource.java | 11 +++++----- 9 files changed, 55 insertions(+), 54 deletions(-) (limited to 'compatibility-client/src/main/java/com') diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java index f34bafe641..c59ec0afe4 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java @@ -389,7 +389,7 @@ public class GridConnector extends AbstractHasComponentsConnector } else { Collection> errorColumns; if (errorColumnsIds != null) { - errorColumns = new ArrayList<>(); + errorColumns = new ArrayList>(); for (String colId : errorColumnsIds) { errorColumns.add(columnIdToColumn.get(colId)); } @@ -435,7 +435,7 @@ public class GridConnector extends AbstractHasComponentsConnector public void onColumnReorder(ColumnReorderEvent event) { if (!columnsUpdatedFromState) { List> columns = getWidget().getColumns(); - final List newColumnOrder = new ArrayList<>(); + final List newColumnOrder = new ArrayList(); for (Column column : columns) { if (column instanceof CustomGridColumn) { newColumnOrder.add(((CustomGridColumn) column).id); @@ -494,8 +494,8 @@ public class GridConnector extends AbstractHasComponentsConnector private class CustomDetailsGenerator implements HeightAwareDetailsGenerator { - private final Map idToDetailsMap = new HashMap<>(); - private final Map idToRowIndex = new HashMap<>(); + private final Map idToDetailsMap = new HashMap(); + private final Map idToRowIndex = new HashMap(); @Override public Widget getDetails(int rowIndex) { @@ -544,7 +544,7 @@ public class GridConnector extends AbstractHasComponentsConnector } public void updateConnectorHierarchy(List children) { - Set connectorIds = new HashSet<>(); + Set connectorIds = new HashSet(); for (ServerConnector child : children) { if (child instanceof ComponentConnector) { connectorIds.add(child.getConnectorId()); @@ -553,7 +553,7 @@ public class GridConnector extends AbstractHasComponentsConnector } } - Set removedDetails = new HashSet<>(); + Set removedDetails = new HashSet(); for (Entry entry : idToDetailsMap .entrySet()) { ComponentConnector connector = entry.getValue(); @@ -626,9 +626,9 @@ public class GridConnector extends AbstractHasComponentsConnector /** * Maps a generated column id to a grid column instance */ - private Map columnIdToColumn = new HashMap<>(); + private Map columnIdToColumn = new HashMap(); - private List columnOrder = new ArrayList<>(); + private List columnOrder = new ArrayList(); /** * {@link #columnsUpdatedFromState} is set to true when @@ -642,7 +642,7 @@ public class GridConnector extends AbstractHasComponentsConnector private RpcDataSource dataSource; /* Used to track Grid editor columns with validation errors */ - private final Map, String> columnToErrorMessage = new HashMap<>(); + private final Map, String> columnToErrorMessage = new HashMap, String>(); private ItemClickHandler itemClickHandler = new ItemClickHandler(); @@ -1106,7 +1106,7 @@ public class GridConnector extends AbstractHasComponentsConnector private void purgeRemovedColumns() { // Get columns still registered in the state - Set columnsInState = new HashSet<>(); + Set columnsInState = new HashSet(); for (GridColumnState columnState : getState().columns) { columnsInState.add(columnState.id); } @@ -1131,7 +1131,7 @@ public class GridConnector extends AbstractHasComponentsConnector } private void onSortStateChange() { - List sortOrder = new ArrayList<>(); + List sortOrder = new ArrayList(); String[] sortColumns = getState().sortColumns; SortDirection[] sortDirs = getState().sortDirs; @@ -1288,7 +1288,7 @@ public class GridConnector extends AbstractHasComponentsConnector * @return displayed error string */ private String getColumnErrors() { - List errors = new ArrayList<>(); + List errors = new ArrayList(); for (Grid.Column c : getWidget().getColumns()) { if (!(c instanceof CustomGridColumn)) { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java index f800300440..98b329f13d 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java @@ -73,7 +73,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector { registerRpc(DataProviderRpc.class, new DataProviderRpc() { @Override public void setRowData(int firstRow, JsonArray rowArray) { - ArrayList rows = new ArrayList<>( + ArrayList rows = new ArrayList( rowArray.length()); for (int i = 0; i < rowArray.length(); i++) { JsonObject rowObject = rowArray.getObject(i); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java index 57bde573c6..77e5cbeab1 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java @@ -368,15 +368,15 @@ public class VCalendar extends Composite implements VHasDropHandler { e.onselectstart = function() { return false; } - + e.ondragstart = function() { return false; } }-*/; private void updateEventsToWeekGrid(CalendarEvent[] events) { - List allDayLong = new ArrayList<>(); - List belowDayLong = new ArrayList<>(); + List allDayLong = new ArrayList(); + List belowDayLong = new ArrayList(); for (CalendarEvent e : events) { if (e.isAllDay()) { @@ -421,8 +421,8 @@ public class VCalendar extends Composite implements VHasDropHandler { boolean eventAdded = false; boolean inProgress = false; // Event adding has started boolean eventMoving = false; - List dayCells = new ArrayList<>(); - List timeCells = new ArrayList<>(); + List dayCells = new ArrayList(); + List timeCells = new ArrayList(); for (int row = 0; row < monthGrid.getRowCount(); row++) { if (eventAdded) { break; @@ -570,7 +570,7 @@ public class VCalendar extends Composite implements VHasDropHandler { /** * Sort the events by current sort order - * + * * @param events * The events to sort * @return An array where the events has been sorted @@ -599,7 +599,7 @@ public class VCalendar extends Composite implements VHasDropHandler { /** * Sort the event by how long they are - * + * * @param events * The events to sort * @return An array where the events has been sorted @@ -968,11 +968,11 @@ public class VCalendar extends Composite implements VHasDropHandler { /** * Returns the default comparator which can compare calendar events by * duration. - * + * * @deprecated this returns just one default comparator, but there are * number of comparators that are used to sort events depending * on order. - * + * * @return */ @Deprecated @@ -1611,7 +1611,7 @@ public class VCalendar extends Composite implements VHasDropHandler { /** * Set sort strategy for events. - * + * * @param order * sort order */ @@ -1625,7 +1625,7 @@ public class VCalendar extends Composite implements VHasDropHandler { /** * Return currently active sort order. - * + * * @return current sort order */ public EventSortOrder getSortOrder() { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java index 29e4aa006f..aa47481e6a 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java @@ -243,12 +243,12 @@ public class VFilterSelect extends Composite return $entry(function(e) { var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX; var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY; - + // IE8 has only delta y if (isNaN(deltaY)) { deltaY = -0.5*e.wheelDelta; } - + @com.vaadin.v7.client.ui.VFilterSelect.JsniUtil::moveScrollFromEvent(*)(widget, deltaX, deltaY, e, e.deltaMode); }); }-*/; @@ -1473,7 +1473,7 @@ public class VFilterSelect extends Composite *

* For internal use only. May be removed or replaced in the future. */ - public final List currentSuggestions = new ArrayList<>(); + public final List currentSuggestions = new ArrayList(); /** For internal use only. May be removed or replaced in the future. */ public boolean immediate; @@ -1957,7 +1957,7 @@ public class VFilterSelect extends Composite Unit.PX); } - private static Set navigationKeyCodes = new HashSet<>(); + private static Set navigationKeyCodes = new HashSet(); static { navigationKeyCodes.add(KeyCodes.KEY_DOWN); navigationKeyCodes.add(KeyCodes.KEY_UP); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java index d4e1869a90..b67edfe93c 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java @@ -95,8 +95,8 @@ public class VOptionGroup extends VOptionGroupBase public VOptionGroup() { super(CLASSNAME); panel = (Panel) optionsContainer; - optionsToKeys = new HashMap<>(); - optionsEnabled = new HashMap<>(); + optionsToKeys = new HashMap(); + optionsEnabled = new HashMap(); wasMultiselect = isMultiselect(); } @@ -113,12 +113,12 @@ public class VOptionGroup extends VOptionGroupBase * rebuilt (losing focus) if number of elements or their order is * changed. */ - HashMap keysToOptions = new HashMap<>(); + HashMap keysToOptions = new HashMap(); for (Map.Entry entry : optionsToKeys.entrySet()) { keysToOptions.put(entry.getValue(), entry.getKey()); } - ArrayList existingwidgets = new ArrayList<>(); - ArrayList newwidgets = new ArrayList<>(); + ArrayList existingwidgets = new ArrayList(); + ArrayList newwidgets = new ArrayList(); // Get current order of elements for (Widget wid : panel) { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java index 456c9f392b..9d3e8726a6 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java @@ -90,8 +90,8 @@ public class CalendarConnector extends AbstractLegacyComponentConnector private CalendarServerRpc rpc = RpcProxy.create(CalendarServerRpc.class, this); - private final HashMap actionMap = new HashMap<>(); - private HashMap tooltips = new HashMap<>(); + private final HashMap actionMap = new HashMap(); + private HashMap tooltips = new HashMap(); private static final String DROPHANDLER_ACCEPT_CRITERIA_PAINT_TAG = "-ac"; @@ -498,8 +498,8 @@ public class CalendarConnector extends AbstractLegacyComponentConnector } private Action[] getActionsBetween(Date start, Date end) { - List actions = new ArrayList<>(); - List ids = new ArrayList<>(); + List actions = new ArrayList(); + List ids = new ArrayList(); for (int i = 0; i < actionKeys.size(); i++) { String actionKey = actionKeys.get(i); @@ -554,7 +554,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector return actions.toArray(new Action[actions.size()]); } - private List actionKeys = new ArrayList<>(); + private List actionKeys = new ArrayList(); private void updateActionMap(List actions) { actionMap.clear(); @@ -653,7 +653,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector */ @Override public Action[] getActions() { - List actions = new ArrayList<>(); + List actions = new ArrayList(); for (int i = 0; i < actionKeys.size(); i++) { final String actionKey = actionKeys.get(i); final VCalendarAction a = new VCalendarAction(this, rpc, actionKey); @@ -684,7 +684,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector private List calendarEventListOf( List events, boolean format24h) { - List list = new ArrayList<>(events.size()); + List list = new ArrayList(events.size()); for (CalendarState.Event event : events) { final String dateFrom = event.dateFrom; final String dateTo = event.dateTo; @@ -709,7 +709,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector } private List calendarDayListOf(List days) { - List list = new ArrayList<>(days.size()); + List list = new ArrayList(days.size()); for (CalendarState.Day day : days) { CalendarDay d = new CalendarDay(day.date, day.localizedDateFormat, day.dayOfWeek, day.week, day.yearOfWeek); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java index d914de8ff5..69fcaa194c 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java @@ -56,7 +56,7 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, private boolean disabled = false; private int height; private final Element[] slotElements; - private final List slots = new ArrayList<>(); + private final List slots = new ArrayList(); private int[] slotElementHeights; private int startingSlotHeight; private Date today; @@ -104,7 +104,7 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, addStyleName("v-calendar-day-times"); - handlers = new LinkedList<>(); + handlers = new LinkedList(); // 2 slots / hour firstHour = weekgrid.getFirstHour(); @@ -278,11 +278,11 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, } public void recalculateEventWidths() { - List groups = new ArrayList<>(); + List groups = new ArrayList(); int count = getWidgetCount(); - List handled = new ArrayList<>(); + List handled = new ArrayList(); // Iterate through all events and group them. Events that overlaps // with each other, are added to the same group. @@ -345,8 +345,8 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, for (DateCellGroup g : groups) { int col = 0; int colCount = 0; - List order = new ArrayList<>(); - Map columns = new HashMap<>(); + List order = new ArrayList(); + Map columns = new HashMap(); for (Integer eventIndex : g.getItems()) { DateCellDayEvent d = (DateCellDayEvent) getWidget(eventIndex); d.setMoveWidth(width); @@ -534,7 +534,7 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, public void addEvent(DateCellDayEvent dayEvent) { Element main = getElement(); int index = 0; - List events = new ArrayList<>(); + List events = new ArrayList(); // events are the only widgets in this panel // slots are just elements diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/combobox/ComboBoxConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/combobox/ComboBoxConnector.java index 212a1aa8d1..c50b4f977c 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/combobox/ComboBoxConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/combobox/ComboBoxConnector.java @@ -124,7 +124,7 @@ public class ComboBoxConnector extends AbstractFieldConnector getWidget().totalMatches = 0; } - List newSuggestions = new ArrayList<>(); + List newSuggestions = new ArrayList(); for (final Iterator i = options.getChildIterator(); i.hasNext();) { final UIDL optionUidl = (UIDL) i.next(); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/datasources/ListDataSource.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/datasources/ListDataSource.java index d80cdad3c9..a65c4be1f6 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/datasources/ListDataSource.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/datasources/ListDataSource.java @@ -326,7 +326,7 @@ public class ListDataSource implements DataSource { /** * Handler for listening to changes in the underlying list. */ - private Set changeHandlers = new LinkedHashSet<>(); + private Set changeHandlers = new LinkedHashSet(); /** * Constructs a new list data source. @@ -344,7 +344,7 @@ public class ListDataSource implements DataSource { if (datasource == null) { throw new IllegalArgumentException("datasource cannot be null"); } - ds = new ArrayList<>(datasource); + ds = new ArrayList(datasource); wrapper = new ListWrapper(); } @@ -358,9 +358,9 @@ public class ListDataSource implements DataSource { */ public ListDataSource(T... rows) { if (rows == null) { - ds = new ArrayList<>(); + ds = new ArrayList(); } else { - ds = new ArrayList<>(Arrays.asList(rows)); + ds = new ArrayList(Arrays.asList(rows)); } wrapper = new ListWrapper(); } @@ -463,7 +463,8 @@ public class ListDataSource implements DataSource { } private Stream getHandlers() { - Set copy = new LinkedHashSet<>(changeHandlers); + Set copy = new LinkedHashSet( + changeHandlers); return copy.stream(); } -- cgit v1.2.3