diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2017-02-24 17:06:58 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-07 12:36:54 +0200 |
commit | 0cfb20938f2b15767ebbd367ad8312642b947c8c (patch) | |
tree | 4fe0aab62b4551d630a90e5d74eb3659c1cef948 /compatibility-client/src/main/java/com | |
parent | 812034829a9b2765b3b196b1cbba3e7ddfe4672d (diff) | |
download | vaadin-framework-0cfb20938f2b15767ebbd367ad8312642b947c8c.tar.gz vaadin-framework-0cfb20938f2b15767ebbd367ad8312642b947c8c.zip |
Revert diamond operator changes
Diffstat (limited to 'compatibility-client/src/main/java/com')
9 files changed, 55 insertions, 54 deletions
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<Column<?, JsonObject>> errorColumns; if (errorColumnsIds != null) { - errorColumns = new ArrayList<>(); + errorColumns = new ArrayList<Column<?, JsonObject>>(); for (String colId : errorColumnsIds) { errorColumns.add(columnIdToColumn.get(colId)); } @@ -435,7 +435,7 @@ public class GridConnector extends AbstractHasComponentsConnector public void onColumnReorder(ColumnReorderEvent<JsonObject> event) { if (!columnsUpdatedFromState) { List<Column<?, JsonObject>> columns = getWidget().getColumns(); - final List<String> newColumnOrder = new ArrayList<>(); + final List<String> newColumnOrder = new ArrayList<String>(); for (Column<?, JsonObject> 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<String, ComponentConnector> idToDetailsMap = new HashMap<>(); - private final Map<String, Integer> idToRowIndex = new HashMap<>(); + private final Map<String, ComponentConnector> idToDetailsMap = new HashMap<String, ComponentConnector>(); + private final Map<String, Integer> idToRowIndex = new HashMap<String, Integer>(); @Override public Widget getDetails(int rowIndex) { @@ -544,7 +544,7 @@ public class GridConnector extends AbstractHasComponentsConnector } public void updateConnectorHierarchy(List<ServerConnector> children) { - Set<String> connectorIds = new HashSet<>(); + Set<String> connectorIds = new HashSet<String>(); for (ServerConnector child : children) { if (child instanceof ComponentConnector) { connectorIds.add(child.getConnectorId()); @@ -553,7 +553,7 @@ public class GridConnector extends AbstractHasComponentsConnector } } - Set<String> removedDetails = new HashSet<>(); + Set<String> removedDetails = new HashSet<String>(); for (Entry<String, ComponentConnector> 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<String, CustomGridColumn> columnIdToColumn = new HashMap<>(); + private Map<String, CustomGridColumn> columnIdToColumn = new HashMap<String, CustomGridColumn>(); - private List<String> columnOrder = new ArrayList<>(); + private List<String> columnOrder = new ArrayList<String>(); /** * {@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<Column<?, JsonObject>, String> columnToErrorMessage = new HashMap<>(); + private final Map<Column<?, JsonObject>, String> columnToErrorMessage = new HashMap<Column<?, JsonObject>, 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<String> columnsInState = new HashSet<>(); + Set<String> columnsInState = new HashSet<String>(); for (GridColumnState columnState : getState().columns) { columnsInState.add(columnState.id); } @@ -1131,7 +1131,7 @@ public class GridConnector extends AbstractHasComponentsConnector } private void onSortStateChange() { - List<SortOrder> sortOrder = new ArrayList<>(); + List<SortOrder> sortOrder = new ArrayList<SortOrder>(); 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<String> errors = new ArrayList<>(); + List<String> errors = new ArrayList<String>(); for (Grid.Column<?, JsonObject> 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<JsonObject> rows = new ArrayList<>( + ArrayList<JsonObject> rows = new ArrayList<JsonObject>( 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<CalendarEvent> allDayLong = new ArrayList<>(); - List<CalendarEvent> belowDayLong = new ArrayList<>(); + List<CalendarEvent> allDayLong = new ArrayList<CalendarEvent>(); + List<CalendarEvent> belowDayLong = new ArrayList<CalendarEvent>(); 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<SimpleDayCell> dayCells = new ArrayList<>(); - List<SimpleDayCell> timeCells = new ArrayList<>(); + List<SimpleDayCell> dayCells = new ArrayList<SimpleDayCell>(); + List<SimpleDayCell> timeCells = new ArrayList<SimpleDayCell>(); 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 * <p> * For internal use only. May be removed or replaced in the future. */ - public final List<FilterSelectSuggestion> currentSuggestions = new ArrayList<>(); + public final List<FilterSelectSuggestion> currentSuggestions = new ArrayList<FilterSelectSuggestion>(); /** 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<Integer> navigationKeyCodes = new HashSet<>(); + private static Set<Integer> navigationKeyCodes = new HashSet<Integer>(); 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<CheckBox, String>(); + optionsEnabled = new HashMap<CheckBox, Boolean>(); wasMultiselect = isMultiselect(); } @@ -113,12 +113,12 @@ public class VOptionGroup extends VOptionGroupBase * rebuilt (losing focus) if number of elements or their order is * changed. */ - HashMap<String, CheckBox> keysToOptions = new HashMap<>(); + HashMap<String, CheckBox> keysToOptions = new HashMap<String, CheckBox>(); for (Map.Entry<CheckBox, String> entry : optionsToKeys.entrySet()) { keysToOptions.put(entry.getValue(), entry.getKey()); } - ArrayList<Widget> existingwidgets = new ArrayList<>(); - ArrayList<Widget> newwidgets = new ArrayList<>(); + ArrayList<Widget> existingwidgets = new ArrayList<Widget>(); + ArrayList<Widget> newwidgets = new ArrayList<Widget>(); // 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<String, String> actionMap = new HashMap<>(); - private HashMap<Object, String> tooltips = new HashMap<>(); + private final HashMap<String, String> actionMap = new HashMap<String, String>(); + private HashMap<Object, String> tooltips = new HashMap<Object, String>(); 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<Action> actions = new ArrayList<>(); - List<String> ids = new ArrayList<>(); + List<Action> actions = new ArrayList<Action>(); + List<String> ids = new ArrayList<String>(); 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<String> actionKeys = new ArrayList<>(); + private List<String> actionKeys = new ArrayList<String>(); private void updateActionMap(List<CalendarState.Action> actions) { actionMap.clear(); @@ -653,7 +653,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector */ @Override public Action[] getActions() { - List<Action> actions = new ArrayList<>(); + List<Action> actions = new ArrayList<Action>(); 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<CalendarEvent> calendarEventListOf( List<CalendarState.Event> events, boolean format24h) { - List<CalendarEvent> list = new ArrayList<>(events.size()); + List<CalendarEvent> list = new ArrayList<CalendarEvent>(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<CalendarDay> calendarDayListOf(List<CalendarState.Day> days) { - List<CalendarDay> list = new ArrayList<>(days.size()); + List<CalendarDay> list = new ArrayList<CalendarDay>(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<DateCellSlot> slots = new ArrayList<>(); + private final List<DateCellSlot> slots = new ArrayList<DateCellSlot>(); 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<HandlerRegistration>(); // 2 slots / hour firstHour = weekgrid.getFirstHour(); @@ -278,11 +278,11 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, } public void recalculateEventWidths() { - List<DateCellGroup> groups = new ArrayList<>(); + List<DateCellGroup> groups = new ArrayList<DateCellGroup>(); int count = getWidgetCount(); - List<Integer> handled = new ArrayList<>(); + List<Integer> handled = new ArrayList<Integer>(); // 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<Integer> order = new ArrayList<>(); - Map<Integer, Integer> columns = new HashMap<>(); + List<Integer> order = new ArrayList<Integer>(); + Map<Integer, Integer> columns = new HashMap<Integer, Integer>(); 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<CalendarEvent> events = new ArrayList<>(); + List<CalendarEvent> events = new ArrayList<CalendarEvent>(); // 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<FilterSelectSuggestion> newSuggestions = new ArrayList<>(); + List<FilterSelectSuggestion> newSuggestions = new ArrayList<FilterSelectSuggestion>(); 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<T> implements DataSource<T> { /** * Handler for listening to changes in the underlying list. */ - private Set<DataChangeHandler> changeHandlers = new LinkedHashSet<>(); + private Set<DataChangeHandler> changeHandlers = new LinkedHashSet<DataChangeHandler>(); /** * Constructs a new list data source. @@ -344,7 +344,7 @@ public class ListDataSource<T> implements DataSource<T> { if (datasource == null) { throw new IllegalArgumentException("datasource cannot be null"); } - ds = new ArrayList<>(datasource); + ds = new ArrayList<T>(datasource); wrapper = new ListWrapper(); } @@ -358,9 +358,9 @@ public class ListDataSource<T> implements DataSource<T> { */ public ListDataSource(T... rows) { if (rows == null) { - ds = new ArrayList<>(); + ds = new ArrayList<T>(); } else { - ds = new ArrayList<>(Arrays.asList(rows)); + ds = new ArrayList<T>(Arrays.asList(rows)); } wrapper = new ListWrapper(); } @@ -463,7 +463,8 @@ public class ListDataSource<T> implements DataSource<T> { } private Stream<DataChangeHandler> getHandlers() { - Set<DataChangeHandler> copy = new LinkedHashSet<>(changeHandlers); + Set<DataChangeHandler> copy = new LinkedHashSet<DataChangeHandler>( + changeHandlers); return copy.stream(); } |