diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-28 10:39:17 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-28 11:39:17 +0300 |
commit | 7065740d6d02954c3483e2f24db36ad1af45c62e (patch) | |
tree | db3a0f0cabb8cc3ce4a4d2636aff9bf1716fcd8b /compatibility-server/src/main | |
parent | 1827ccb5ed99c9b2deeea38e239527420711f5d1 (diff) | |
download | vaadin-framework-7065740d6d02954c3483e2f24db36ad1af45c62e.tar.gz vaadin-framework-7065740d6d02954c3483e2f24db36ad1af45c62e.zip |
Use interface instead of implementation (#10073)
Diffstat (limited to 'compatibility-server/src/main')
15 files changed, 92 insertions, 83 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java b/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java index 1b80737546..51e1444b24 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java @@ -29,7 +29,8 @@ import com.vaadin.v7.data.Container.Indexed; * * @since 7.0 * - * @deprecated As of 8.0, no direct replacement available, see {@link DataProvider} + * @deprecated As of 8.0, no direct replacement available, see + * {@link DataProvider} */ @Deprecated public class ContainerHelpers implements Serializable { @@ -87,16 +88,16 @@ public class ContainerHelpers implements Serializable { endIndex = container.size(); } - ArrayList<Object> rangeOfIds = new ArrayList<Object>(); + List<Object> rangeOfIds = new ArrayList<Object>(); for (int i = startIndex; i < endIndex; i++) { Object idByIndex = container.getIdByIndex(i); if (idByIndex == null) { - throw new RuntimeException( - "Unable to get item id for index: " + i - + " from container using Container.Indexed#getIdByIndex() " - + "even though container.size() > endIndex. " - + "Returned item id was null. " - + "Check your container implementation!"); + throw new RuntimeException("Unable to get item id for index: " + + i + + " from container using Container.Indexed#getIdByIndex() " + + "even though container.size() > endIndex. " + + "Returned item id was null. " + + "Check your container implementation!"); } rangeOfIds.add(idByIndex); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java index 154014707a..ff4779ee8e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java @@ -40,10 +40,10 @@ import com.vaadin.v7.ui.Field; * FieldGroup provides an easy way of binding fields to data and handling * commits of these fields. * <p> - * The functionality of FieldGroup is similar to {@link com.vaadin.v7.ui.Form Form} but - * {@link FieldGroup} does not handle layouts in any way. The typical use case - * is to create a layout outside the FieldGroup and then use FieldGroup to bind - * the fields to a data source. + * The functionality of FieldGroup is similar to {@link com.vaadin.v7.ui.Form + * Form} but {@link FieldGroup} does not handle layouts in any way. The typical + * use case is to create a layout outside the FieldGroup and then use FieldGroup + * to bind the fields to a data source. * </p> * <p> * {@link FieldGroup} is not a UI component so it cannot be added to a layout. @@ -65,7 +65,7 @@ public class FieldGroup implements Serializable { private boolean enabled = true; private boolean readOnly = false; - private HashMap<Object, Field<?>> propertyIdToField = new HashMap<Object, Field<?>>(); + private Map<Object, Field<?>> propertyIdToField = new HashMap<Object, Field<?>>(); private LinkedHashMap<Field<?>, Object> fieldToPropertyId = new LinkedHashMap<Field<?>, Object>(); private List<CommitHandler> commitHandlers = new ArrayList<CommitHandler>(); @@ -1258,7 +1258,7 @@ public class FieldGroup implements Serializable { */ protected static List<java.lang.reflect.Field> getFieldsInDeclareOrder( Class searchClass) { - ArrayList<java.lang.reflect.Field> memberFieldInOrder = new ArrayList<java.lang.reflect.Field>(); + List<java.lang.reflect.Field> memberFieldInOrder = new ArrayList<java.lang.reflect.Field>(); while (searchClass != null) { for (java.lang.reflect.Field memberField : searchClass @@ -1284,4 +1284,4 @@ public class FieldGroup implements Serializable { } -}
\ No newline at end of file +} diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java index 5ad3cee4c7..a4e9d74c53 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java @@ -26,6 +26,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.LinkedList; +import java.util.Map; import com.vaadin.v7.data.Container; import com.vaadin.v7.data.Item; @@ -63,10 +64,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, private HashSet<Object> noChildrenAllowed = null; /** Mapping from Item ID to parent Item ID */ - private Hashtable<Object, Object> parent = null; + private Map<Object, Object> parent = null; /** Mapping from Item ID to a list of child IDs */ - private Hashtable<Object, LinkedList<Object>> children = null; + private Map<Object, LinkedList<Object>> children = null; /** List that contains all root elements of the container. */ private LinkedHashSet<Object> roots = null; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java index 69f51fc884..f7da00acd9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java @@ -22,6 +22,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Map; import com.vaadin.data.provider.DataProvider; import com.vaadin.v7.data.Container; @@ -60,13 +61,13 @@ public class ContainerOrderedWrapper implements Container.Ordered, * Ordering information, i.e. the mapping from Item ID to the next item ID. * The last item id should not be present */ - private Hashtable<Object, Object> next; + private Map<Object, Object> next; /** * Reverse ordering information for convenience and performance reasons. The * first item id should not be present */ - private Hashtable<Object, Object> prev; + private Map<Object, Object> prev; /** * ID of the first Item in the container. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java index a0943bc7ce..aa504409db 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.LinkedList; +import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -53,23 +54,23 @@ public class HierarchicalContainer extends IndexedContainer /** * Mapping from Item ID to parent Item ID. */ - private final HashMap<Object, Object> parent = new HashMap<Object, Object>(); + private final Map<Object, Object> parent = new HashMap<Object, Object>(); /** * Mapping from Item ID to parent Item ID for items included in the filtered * container. */ - private HashMap<Object, Object> filteredParent = null; + private Map<Object, Object> filteredParent = null; /** * Mapping from Item ID to a list of child IDs. */ - private final HashMap<Object, LinkedList<Object>> children = new HashMap<Object, LinkedList<Object>>(); + private final Map<Object, LinkedList<Object>> children = new HashMap<Object, LinkedList<Object>>(); /** * Mapping from Item ID to a list of child IDs when filtered */ - private HashMap<Object, LinkedList<Object>> filteredChildren = null; + private Map<Object, LinkedList<Object>> filteredChildren = null; /** * List that contains all root elements of the container. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java index f91cb783fe..bd74a132b0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java @@ -28,6 +28,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import com.vaadin.data.provider.ListDataProvider; import com.vaadin.v7.data.Container; @@ -74,29 +75,29 @@ public class IndexedContainer /** * Linked list of ordered Property IDs. */ - private ArrayList<Object> propertyIds = new ArrayList<Object>(); + private List<Object> propertyIds = new ArrayList<Object>(); /** * Property ID to type mapping. */ - private Hashtable<Object, Class<?>> types = new Hashtable<Object, Class<?>>(); + private Map<Object, Class<?>> types = new Hashtable<Object, Class<?>>(); /** * Hash of Items, where each Item is implemented as a mapping from Property * ID to Property value. */ - private Hashtable<Object, Map<Object, Object>> items = new Hashtable<Object, Map<Object, Object>>(); + private Map<Object, Map<Object, Object>> items = new Hashtable<Object, Map<Object, Object>>(); /** * Set of properties that are read-only. */ - private HashSet<Property<?>> readOnlyProperties = new HashSet<Property<?>>(); + private Set<Property<?>> readOnlyProperties = new HashSet<Property<?>>(); /** * List of all Property value change event listeners listening all the * properties. */ - private LinkedList<Property.ValueChangeListener> propertyValueChangeListeners = null; + private List<Property.ValueChangeListener> propertyValueChangeListeners = null; /** * Data structure containing all listeners interested in changes to single @@ -104,9 +105,9 @@ public class IndexedContainer * hashtable that maps Item IDs to a linked list of listeners listening * Property identified by given Property ID and Item ID. */ - private Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>> singlePropertyValueChangeListeners = null; + private Map<Object, Map<Object, List<Property.ValueChangeListener>>> singlePropertyValueChangeListeners; - private HashMap<Object, Object> defaultPropertyValues; + private Map<Object, Object> defaultPropertyValues; private int nextGeneratedItemId = 1; @@ -266,7 +267,7 @@ public class IndexedContainer * @param t * data table of added item */ - private void addDefaultValues(Hashtable<Object, Object> t) { + private void addDefaultValues(Map<Object, Object> t) { if (defaultPropertyValues != null) { for (Object key : defaultPropertyValues.keySet()) { t.put(key, defaultPropertyValues.get(key)); @@ -389,7 +390,7 @@ public class IndexedContainer @Override protected void registerNewItem(int index, Object newItemId, Item item) { - Hashtable<Object, Object> t = new Hashtable<Object, Object>(); + Map<Object, Object> t = new Hashtable<Object, Object>(); items.put(newItemId, t); addDefaultValues(t); } @@ -983,39 +984,39 @@ public class IndexedContainer final IndexedContainer nc = new IndexedContainer(); // Clone the shallow properties - nc.setAllItemIds(getAllItemIds() != null - ? (ListSet<Object>) ((ListSet<Object>) getAllItemIds()).clone() - : null); + nc.setAllItemIds( + getAllItemIds() != null ? new ListSet<Object>(getAllItemIds()) + : null); nc.setItemSetChangeListeners(getItemSetChangeListeners() != null ? new LinkedList<Container.ItemSetChangeListener>( getItemSetChangeListeners()) : null); nc.propertyIds = propertyIds != null - ? (ArrayList<Object>) propertyIds.clone() : null; + ? new ArrayList<Object>(propertyIds) + : null; nc.setPropertySetChangeListeners(getPropertySetChangeListeners() != null ? new LinkedList<Container.PropertySetChangeListener>( getPropertySetChangeListeners()) : null); nc.propertyValueChangeListeners = propertyValueChangeListeners != null - ? (LinkedList<Property.ValueChangeListener>) propertyValueChangeListeners - .clone() + ? new LinkedList<Property.ValueChangeListener>( + propertyValueChangeListeners) : null; nc.readOnlyProperties = readOnlyProperties != null - ? (HashSet<Property<?>>) readOnlyProperties.clone() : null; + ? new HashSet<Property<?>>(readOnlyProperties) + : null; nc.singlePropertyValueChangeListeners = singlePropertyValueChangeListeners != null - ? (Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>) singlePropertyValueChangeListeners - .clone() + ? new Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>( + singlePropertyValueChangeListeners) : null; - nc.types = types != null ? (Hashtable<Object, Class<?>>) types.clone() + nc.types = types != null ? new Hashtable<Object, Class<?>>(types) : null; - nc.setFilters( - (HashSet<Filter>) ((HashSet<Filter>) getFilters()).clone()); + nc.setFilters(new HashSet<Filter>(getFilters())); nc.setFilteredItemIds(getFilteredItemIds() == null ? null - : (ListSet<Object>) ((ListSet<Object>) getFilteredItemIds()) - .clone()); + : new ListSet<Object>(getFilteredItemIds())); // Clone property-values if (items == null) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java index 7b7a4b7782..4c40c8c81a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java @@ -21,6 +21,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.Map; /** * ListSet is an internal Vaadin class which implements a combination of a List @@ -42,7 +43,7 @@ public class ListSet<E> extends ArrayList<E> { * Contains a map from an element to the number of duplicates it has. Used * to temporarily allow duplicates in the list. */ - private HashMap<E, Integer> duplicates = new HashMap<E, Integer>(); + private Map<E, Integer> duplicates = new HashMap<E, Integer>(); public ListSet() { super(); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java index d5ad5f4aef..81eb4eb00d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java @@ -22,6 +22,7 @@ import java.util.EventObject; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; +import java.util.List; import java.util.Map; import com.vaadin.data.Binder; @@ -54,17 +55,17 @@ public class PropertysetItem /** * Mapping from property id to property. */ - private HashMap<Object, Property<?>> map = new HashMap<Object, Property<?>>(); + private Map<Object, Property<?>> map = new HashMap<Object, Property<?>>(); /** * List of all property ids to maintain the order. */ - private LinkedList<Object> list = new LinkedList<Object>(); + private List<Object> list = new LinkedList<Object>(); /** * List of property set modification listeners. */ - private LinkedList<Item.PropertySetChangeListener> propertySetChangeListeners = null; + private List<Item.PropertySetChangeListener> propertySetChangeListeners = null; /* Item methods */ @@ -307,12 +308,12 @@ public class PropertysetItem final PropertysetItem npsi = new PropertysetItem(); - npsi.list = list != null ? (LinkedList<Object>) list.clone() : null; + npsi.list = list != null ? new LinkedList<Object>(list) : null; npsi.propertySetChangeListeners = propertySetChangeListeners != null - ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners - .clone() + ? new LinkedList<PropertySetChangeListener>( + propertySetChangeListeners) : null; - npsi.map = (HashMap<Object, Property<?>>) map.clone(); + npsi.map = new HashMap<Object, Property<?>>(map); return npsi; } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java index 070b15fc5c..5ff356cbfe 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java @@ -313,7 +313,7 @@ public class SQLContainer implements Container, Container.Filterable, @Override public Collection<?> getItemIds() { updateCount(); - ArrayList<RowId> ids = new ArrayList<RowId>(); + List<RowId> ids = new ArrayList<RowId>(); ResultSet rs = null; try { // Load ALL rows :( @@ -542,7 +542,7 @@ public class SQLContainer implements Container, Container.Filterable, * {@inheritDoc} */ public void removeContainerFilters(Object propertyId) { - ArrayList<Filter> toRemove = new ArrayList<Filter>(); + List<Filter> toRemove = new ArrayList<Filter>(); for (Filter f : filters) { if (f.appliesToProperty(propertyId)) { toRemove.add(f); @@ -1322,7 +1322,7 @@ public class SQLContainer implements Container, Container.Filterable, } private List<RowItem> getFilteredAddedItems() { - ArrayList<RowItem> filtered = new ArrayList<RowItem>(addedItems); + List<RowItem> filtered = new ArrayList<RowItem>(addedItems); if (filters != null && !filters.isEmpty()) { for (RowItem item : addedItems) { if (!itemPassesFilters(item)) { @@ -1684,8 +1684,7 @@ public class SQLContainer implements Container, Container.Filterable, return refdCont.getItem(getReferencedItemId(itemId, refdCont)); } - private void writeObject(ObjectOutputStream out) - throws IOException { + private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java index b415c5ac51..3cfd95e489 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java @@ -559,9 +559,11 @@ public class TableQuery extends AbstractTransactionalQuery null); if (!tables.next()) { String catalog = (catalogName != null) - ? catalogName.toUpperCase() : null; + ? catalogName.toUpperCase() + : null; String schema = (schemaName != null) - ? schemaName.toUpperCase() : null; + ? schemaName.toUpperCase() + : null; tables = dbmd.getTables(catalog, schema, tableName.toUpperCase(), null); if (!tables.next()) { @@ -680,7 +682,7 @@ public class TableQuery extends AbstractTransactionalQuery @Override public boolean containsRowWithKey(Object... keys) throws SQLException { - ArrayList<Filter> filtersAndKeys = new ArrayList<Filter>(); + List<Filter> filtersAndKeys = new ArrayList<Filter>(); if (filters != null) { filtersAndKeys.addAll(filters); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java index eada1aa02b..894936e1cd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java @@ -29,7 +29,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import com.vaadin.ui.AbstractListing; import org.jsoup.nodes.Element; import com.vaadin.event.Transferable; @@ -46,6 +45,7 @@ import com.vaadin.server.Resource; import com.vaadin.server.VaadinSession; import com.vaadin.shared.ui.dd.VerticalDropLocation; import com.vaadin.ui.AbstractComponent; +import com.vaadin.ui.AbstractListing; import com.vaadin.ui.Component; import com.vaadin.ui.LegacyComponent; import com.vaadin.ui.declarative.DesignAttributeHandler; @@ -245,12 +245,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements /** * Item icons. */ - private final HashMap<Object, Resource> itemIcons = new HashMap<Object, Resource>(); + private final Map<Object, Resource> itemIcons = new HashMap<Object, Resource>(); /** * Item captions. */ - private final HashMap<Object, String> itemCaptions = new HashMap<Object, String>(); + private final Map<Object, String> itemCaptions = new HashMap<Object, String>(); /** * Item caption mode. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java index b88ee7f5df..63a6118c58 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java @@ -114,12 +114,12 @@ public class Form extends AbstractField<Object> /** * Mapping from propertyName to corresponding field. */ - private final HashMap<Object, Field<?>> fields = new HashMap<Object, Field<?>>(); + private final Map<Object, Field<?>> fields = new HashMap<Object, Field<?>>(); /** * Form may act as an Item, its own properties are stored here. */ - private final HashMap<Object, Property<?>> ownProperties = new HashMap<Object, Property<?>>(); + private final Map<Object, Property<?>> ownProperties = new HashMap<Object, Property<?>>(); /** * Field factory for this form. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java index 82dc65774c..c99757ee04 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java @@ -410,37 +410,37 @@ public class Table extends AbstractSelect implements Action.Container, /** * Holds headers for visible columns (by propertyId). */ - private final HashMap<Object, String> columnHeaders = new HashMap<Object, String>(); + private final Map<Object, String> columnHeaders = new HashMap<Object, String>(); /** * Holds footers for visible columns (by propertyId). */ - private final HashMap<Object, String> columnFooters = new HashMap<Object, String>(); + private final Map<Object, String> columnFooters = new HashMap<Object, String>(); /** * Holds icons for visible columns (by propertyId). */ - private final HashMap<Object, Resource> columnIcons = new HashMap<Object, Resource>(); + private final Map<Object, Resource> columnIcons = new HashMap<Object, Resource>(); /** * Holds alignments for visible columns (by propertyId). */ - private HashMap<Object, Align> columnAlignments = new HashMap<Object, Align>(); + private Map<Object, Align> columnAlignments = new HashMap<Object, Align>(); /** * Holds column widths in pixels for visible columns (by propertyId). */ - private final HashMap<Object, Integer> columnWidths = new HashMap<Object, Integer>(); + private final Map<Object, Integer> columnWidths = new HashMap<Object, Integer>(); /** * Holds column expand rations for visible columns (by propertyId). */ - private final HashMap<Object, Float> columnExpandRatios = new HashMap<Object, Float>(); + private final Map<Object, Float> columnExpandRatios = new HashMap<Object, Float>(); /** * Holds column generators */ - private final HashMap<Object, ColumnGenerator> columnGenerators = new LinkedHashMap<Object, ColumnGenerator>(); + private final Map<Object, ColumnGenerator> columnGenerators = new LinkedHashMap<Object, ColumnGenerator>(); /** * Holds value of property pageLength. 0 disables paging. @@ -597,7 +597,7 @@ public class Table extends AbstractSelect implements Action.Container, private boolean painted = false; - private HashMap<Object, Converter<String, Object>> propertyValueConverters = new HashMap<Object, Converter<String, Object>>(); + private Map<Object, Converter<String, Object>> propertyValueConverters = new HashMap<Object, Converter<String, Object>>(); /** * Set to true if the client-side should be informed that the key mapper has @@ -895,7 +895,7 @@ public class Table extends AbstractSelect implements Action.Container, } // Resets the alignments - final HashMap<Object, Align> newCA = new HashMap<Object, Align>(); + final Map<Object, Align> newCA = new HashMap<Object, Align>(); int i = 0; for (final Iterator<Object> it = visibleColumns.iterator(); it.hasNext() && i < columnAlignments.length; i++) { @@ -3725,7 +3725,7 @@ public class Table extends AbstractSelect implements Action.Container, private void paintVisibleColumnOrder(PaintTarget target) { // Visible column order - final ArrayList<String> visibleColOrder = new ArrayList<String>(); + final List<String> visibleColOrder = new ArrayList<String>(); for (Object columnId : visibleColumns) { if (!isColumnCollapsed(columnId)) { visibleColOrder.add(columnIdMap.key(columnId)); @@ -3737,7 +3737,7 @@ public class Table extends AbstractSelect implements Action.Container, private Set<Action> findAndPaintBodyActions(PaintTarget target) { Set<Action> actionSet = new LinkedHashSet<Action>(); if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final List<String> keys = new ArrayList<String>(); for (Handler ah : actionHandlers) { // Getting actions for the null item, which in this case means // the body item @@ -3955,7 +3955,7 @@ public class Table extends AbstractSelect implements Action.Container, // Actions if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final List<String> keys = new ArrayList<String>(); for (Handler ah : actionHandlers) { final Action[] aa = ah.getActions(itemId, this); if (aa != null) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java index cba3dd45da..6b3a4497c8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java @@ -25,6 +25,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.Stack; @@ -122,7 +123,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, /** * Item icons alt texts. */ - private final HashMap<Object, String> itemIconAlts = new HashMap<Object, String>(); + private final Map<Object, String> itemIconAlts = new HashMap<Object, String>(); /** * Set of expanded nodes. @@ -691,7 +692,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * by right clicking on the Tree body */ if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final List<String> keys = new ArrayList<String>(); for (Handler ah : actionHandlers) { // Getting action for the null item, which in this case @@ -778,7 +779,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, // Actions if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final List<String> keys = new ArrayList<String>(); final Iterator<Action.Handler> ahi = actionHandlers .iterator(); while (ahi.hasNext()) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java index 99383c165c..e84a8384f8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java @@ -59,7 +59,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, */ @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { - ArrayList<CalendarEvent> activeEvents = new ArrayList<CalendarEvent>(); + List<CalendarEvent> activeEvents = new ArrayList<CalendarEvent>(); for (CalendarEvent ev : eventList) { long from = startDate.getTime(); |