summaryrefslogtreecommitdiffstats
path: root/compatibility-server
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-07-08 12:04:58 +0300
committerGitHub <noreply@github.com>2021-07-08 12:04:58 +0300
commit3afe45849edc79f0e7b371a7fd3ef209292dce79 (patch)
tree2934d3ca30286b3480d7c6b4c5d5bfc99aa196db /compatibility-server
parent347d36dcbccb07f1dd46f17ea5be6fceecc755cb (diff)
downloadvaadin-framework-3afe45849edc79f0e7b371a7fd3ef209292dce79.tar.gz
vaadin-framework-3afe45849edc79f0e7b371a7fd3ef209292dce79.zip
Code cleanup (#12333)
- removed unused private methods - removed unused private variables - removed unnecessary initializations - removed unnecessary substring(0) - removed inner assignments - renamed private methods that started with upper case - renamed static final variables to use upper case - converted to use non-deprecated options - suppressed unavoidable warnings - divided long Strings to multiple lines - added missing types - added missing JavaDoc parameters - formatting - updated comments & JavaDocs
Diffstat (limited to 'compatibility-server')
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java24
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java28
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java12
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java33
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java47
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java5
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java9
7 files changed, 88 insertions, 70 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
index 7debdbc549..904fd22c56 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
@@ -44,8 +44,9 @@ import com.vaadin.v7.ui.TextField;
* instance.
*
* @author Vaadin Ltd
- * @deprecated As of 8.0, no direct replacement available. {@link Binder#forMemberField(HasValue)} and
- * {@link Binder#bindInstanceFields(Object)} should be used instead.
+ * @deprecated As of 8.0, no direct replacement available.
+ * {@link Binder#forMemberField(HasValue)} and
+ * {@link Binder#bindInstanceFields(Object)} should be used instead.
*/
@Deprecated
public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
@@ -68,12 +69,13 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return INSTANCE;
}
+ @SuppressWarnings("rawtypes")
@Override
public <T extends Field> T createField(Class<?> type, Class<T> fieldType) {
if (Enum.class.isAssignableFrom(type)) {
return createEnumField(type, fieldType);
} else if (Date.class.isAssignableFrom(type)) {
- return createDateField(type, fieldType);
+ return createDateField(fieldType);
} else if (Boolean.class.isAssignableFrom(type)
|| boolean.class.isAssignableFrom(type)) {
return createBooleanField(fieldType);
@@ -94,7 +96,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return rta;
}
- private <T extends Field> T createEnumField(Class<?> type,
+ @SuppressWarnings({ "unchecked" })
+ private <T extends Field<?>> T createEnumField(Class<?> type,
Class<T> fieldType) {
// Determine first if we should (or can) create a select for the enum
Class<AbstractSelect> selectClass = null;
@@ -106,7 +109,7 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
if (selectClass != null) {
AbstractSelect s = createCompatibleSelect(selectClass);
- populateWithEnumData(s, (Class<? extends Enum>) type);
+ populateWithEnumData(s, (Class<? extends Enum<?>>) type);
return (T) s;
} else if (AbstractTextField.class.isAssignableFrom(fieldType)) {
return (T) createAbstractTextField(
@@ -116,9 +119,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return null;
}
- @SuppressWarnings("unchecked")
- private <T extends Field> T createDateField(Class<?> type,
- Class<T> fieldType) {
+ @SuppressWarnings({ "unchecked" })
+ private <T extends Field<?>> T createDateField(Class<T> fieldType) {
AbstractField<?> field;
if (InlineDateField.class.isAssignableFrom(fieldType)) {
@@ -177,10 +179,12 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
* the type of the field
* @return true if any AbstractSelect can be assigned to the field
*/
+ @SuppressWarnings("rawtypes")
protected boolean anySelect(Class<? extends Field> fieldType) {
return anyField(fieldType) || fieldType == AbstractSelect.class;
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
protected <T extends Field> T createBooleanField(Class<T> fieldType) {
if (fieldType.isAssignableFrom(CheckBox.class)) {
CheckBox cb = new CheckBox(null);
@@ -194,6 +198,7 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return null;
}
+ @SuppressWarnings("unchecked")
protected <T extends AbstractTextField> T createAbstractTextField(
Class<T> fieldType) {
if (fieldType == AbstractTextField.class) {
@@ -222,6 +227,7 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
* @return A field capable of editing the data or null if no field could be
* created
*/
+ @SuppressWarnings("rawtypes")
protected <T extends Field> T createDefaultField(Class<?> type,
Class<T> fieldType) {
if (fieldType.isAssignableFrom(TextField.class)) {
@@ -239,6 +245,7 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
* @param enumClass
* The Enum class to use
*/
+ @SuppressWarnings({ "rawtypes", "unchecked" })
protected void populateWithEnumData(AbstractSelect select,
Class<? extends Enum> enumClass) {
select.removeAllItems();
@@ -247,7 +254,6 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
}
select.addContainerProperty(CAPTION_PROPERTY_ID, String.class, "");
select.setItemCaptionPropertyId(CAPTION_PROPERTY_ID);
- @SuppressWarnings("unchecked")
EnumSet<?> enumSet = EnumSet.allOf(enumClass);
for (Object r : enumSet) {
Item newItem = select.addItem(r);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java
index e48082adb2..1b6c7c76aa 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java
@@ -52,10 +52,10 @@ import elemental.json.JsonObject;
/**
* Provides Vaadin server-side container data source to a
- * {@link com.vaadin.v7.client.connectors.GridConnector GridConnector}. This is currently
- * implemented as an Extension hardcoded to support a specific connector type.
- * This will be changed once framework support for something more flexible has
- * been implemented.
+ * {@link com.vaadin.v7.client.connectors.GridConnector GridConnector}. This is
+ * currently implemented as an Extension hardcoded to support a specific
+ * connector type. This will be changed once framework support for something
+ * more flexible has been implemented.
*
* @since 7.4
* @author Vaadin Ltd
@@ -152,10 +152,10 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* A class to listen to changes in property values in the Container added
- * with {@link Grid#setContainerDatasource(com.vaadin.v7.data.Container.Indexed)
- * Grid#setContainerDatasource(Container.Indexed)},
- * and notifies the data source to update the client-side representation
- * of the modified item.
+ * with
+ * {@link Grid#setContainerDatasource(com.vaadin.v7.data.Container.Indexed)
+ * Grid#setContainerDatasource(Container.Indexed)}, and notifies the data
+ * source to update the client-side representation of the modified item.
* <p>
* One instance of this class can (and should) be reused for all the
* properties in an item, since this class will inform that the entire row
@@ -166,8 +166,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
* value changes, an instance of this class needs to be attached to each and
* every Item's Property in the container.
*
- * @see Grid#addValueChangeListener(com.vaadin.v7.data.Container, Object, Object)
- * Grid#addValueChangeListener(Container, Object, Object)
+ * @see Grid#addValueChangeListener(com.vaadin.v7.data.Container, Object,
+ * Object) Grid#addValueChangeListener(Container, Object, Object)
* @see Grid#valueChangeListeners
*/
private class GridValueChangeListener implements ValueChangeListener {
@@ -389,15 +389,14 @@ public class RpcDataProviderExtension extends AbstractExtension {
Item item = container.getItem(itemId);
- rows.set(i, getRowData(getGrid().getColumns(), itemId, item));
+ rows.set(i, getRowData(itemId, item));
}
rpc.setRowData(firstRowToPush, rows);
activeItemHandler.addActiveItems(itemIds);
}
- private JsonObject getRowData(Collection<Column> columns, Object itemId,
- Item item) {
+ private JsonObject getRowData(Object itemId, Item item) {
final JsonObject rowObject = Json.createObject();
for (DataGenerator dg : dataGenerators) {
@@ -530,14 +529,13 @@ public class RpcDataProviderExtension extends AbstractExtension {
}
Collection<Object> activeItemIds = activeItemHandler.getActiveItemIds();
- List<Column> columns = getGrid().getColumns();
JsonArray rowData = Json.createArray();
int i = 0;
for (Object itemId : itemIds) {
if (activeItemIds.contains(itemId)) {
Item item = container.getItem(itemId);
if (item != null) {
- JsonObject row = getRowData(columns, itemId, item);
+ JsonObject row = getRowData(itemId, item);
rowData.set(i++, row);
}
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
index b23b092ed9..8e3c49037e 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
@@ -464,8 +464,7 @@ public class ComboBox extends AbstractSelect
assert filteredSize >= 0;
currentPage = adjustCurrentPage(currentPage, needNullSelectOption,
indexToEnsureInView, filteredSize);
- int first = getFirstItemIndexOnCurrentPage(needNullSelectOption,
- filteredSize);
+ int first = getFirstItemIndexOnCurrentPage(needNullSelectOption);
int last = getLastItemIndexOnCurrentPage(needNullSelectOption,
filteredSize, first);
@@ -562,8 +561,7 @@ public class ComboBox extends AbstractSelect
int size = options.size();
currentPage = adjustCurrentPage(currentPage, needNullSelectOption,
indexToEnsureInView, size);
- int first = getFirstItemIndexOnCurrentPage(needNullSelectOption,
- size);
+ int first = getFirstItemIndexOnCurrentPage(needNullSelectOption);
int last = getLastItemIndexOnCurrentPage(needNullSelectOption, size,
first);
return options.subList(first, last + 1);
@@ -581,14 +579,10 @@ public class ComboBox extends AbstractSelect
* true if a null option should be shown before any other options
* (takes up the first slot on the first page, not counted in
* index)
- * @param size
- * number of items after filtering (not including the null item,
- * if any)
* @return first item to show on the UI (index to the filtered list of
* options, not taking the null item into consideration if any)
*/
- private int getFirstItemIndexOnCurrentPage(boolean needNullSelectOption,
- int size) {
+ private int getFirstItemIndexOnCurrentPage(boolean needNullSelectOption) {
// Not all options are visible, find out which ones are on the
// current "page".
int first = currentPage * pageLength;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
index 491b440e5e..964d0f3cd8 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
@@ -212,7 +212,8 @@ public class Grid extends AbstractComponent
* @since 7.5.0
*/
@Deprecated
- public interface ColumnVisibilityChangeListener extends SerializableEventListener {
+ public interface ColumnVisibilityChangeListener
+ extends SerializableEventListener {
/**
* Called when a column has become hidden or unhidden.
*
@@ -567,6 +568,7 @@ public class Grid extends AbstractComponent
}
}
+ @SuppressWarnings("rawtypes")
@Override
protected <T extends Field> T build(String caption, Class<?> dataType,
Class<T> fieldType) throws BindException {
@@ -630,6 +632,7 @@ public class Grid extends AbstractComponent
return INSTANCE;
}
+ @SuppressWarnings("rawtypes")
@Override
public <T extends Field> T createField(Class<?> type,
Class<T> fieldType) {
@@ -649,6 +652,7 @@ public class Grid extends AbstractComponent
return super.createCompatibleSelect(fieldType);
}
+ @SuppressWarnings("rawtypes")
@Override
protected void populateWithEnumData(AbstractSelect select,
Class<? extends Enum> enumClass) {
@@ -2364,7 +2368,8 @@ public class Grid extends AbstractComponent
Renderer<?> renderer = column.getRenderer();
Item item = cell.getItem();
- Property itemProperty = item.getItemProperty(cell.getPropertyId());
+ Property<?> itemProperty = item
+ .getItemProperty(cell.getPropertyId());
Object modelValue = itemProperty == null ? null
: itemProperty.getValue();
@@ -2505,6 +2510,7 @@ public class Grid extends AbstractComponent
* The cells to merge. Must be from the same row.
* @return The remaining visible cell after the merge
*/
+ @SuppressWarnings("unchecked")
public CELLTYPE join(CELLTYPE... cells) {
if (cells.length < 2) {
throw new IllegalArgumentException(
@@ -3776,6 +3782,7 @@ public class Grid extends AbstractComponent
return converter;
}
+ @SuppressWarnings("unchecked")
private <T> boolean internalSetRenderer(Renderer<T> renderer) {
Converter<? extends T, ?> converter;
@@ -4410,6 +4417,7 @@ public class Grid extends AbstractComponent
* the locale to use in conversion
* @return an encoded value ready to be sent to the client
*/
+ @SuppressWarnings("unchecked")
public static <T> JsonValue encodeValue(Object modelValue,
Renderer<T> renderer, Converter<?, ?> converter,
Locale locale) {
@@ -4437,7 +4445,6 @@ public class Grid extends AbstractComponent
} else {
assert presentationType
.isAssignableFrom(converter.getPresentationType());
- @SuppressWarnings("unchecked")
Converter<T, Object> safeConverter = (Converter<T, Object>) converter;
presentationValue = safeConverter.convertToPresentation(
modelValue, safeConverter.getPresentationType(),
@@ -4688,13 +4695,6 @@ public class Grid extends AbstractComponent
*/
private SelectionModel selectionModel;
- /**
- * Used to know whether selection change events originate from the server or
- * the client so the selection change handler knows whether the changes
- * should be sent to the client.
- */
- private boolean applyingSelectionFromClient;
-
private final Header header = new Header(this);
private final Footer footer = new Footer(this);
@@ -6739,7 +6739,8 @@ public class Grid extends AbstractComponent
* @since 7.6
*/
- public void setCellDescriptionGenerator(CellDescriptionGenerator generator) {
+ public void setCellDescriptionGenerator(
+ CellDescriptionGenerator generator) {
setCellDescriptionGenerator(generator, ContentMode.PREFORMATTED);
}
@@ -6760,12 +6761,13 @@ public class Grid extends AbstractComponent
* @since 8.3.2
*/
public void setCellDescriptionGenerator(CellDescriptionGenerator generator,
- ContentMode contentMode) {
+ ContentMode contentMode) {
if (contentMode == null) {
throw new IllegalArgumentException("Content mode cannot be null");
}
cellDescriptionGenerator = generator;
- getState().hasDescriptions = (generator != null || rowDescriptionGenerator != null);
+ getState().hasDescriptions = (generator != null
+ || rowDescriptionGenerator != null);
getState().cellTooltipContentMode = contentMode;
datasourceExtension.refreshCache();
}
@@ -6811,7 +6813,7 @@ public class Grid extends AbstractComponent
* @since 7.6
*/
public void setRowDescriptionGenerator(RowDescriptionGenerator generator) {
- setRowDescriptionGenerator(generator, ContentMode.PREFORMATTED );
+ setRowDescriptionGenerator(generator, ContentMode.PREFORMATTED);
}
/**
@@ -6832,7 +6834,7 @@ public class Grid extends AbstractComponent
* @since 8.3.2
*/
public void setRowDescriptionGenerator(RowDescriptionGenerator generator,
- ContentMode contentMode) {
+ ContentMode contentMode) {
if (contentMode == null) {
throw new IllegalArgumentException("Content mode cannot be null");
}
@@ -6934,6 +6936,7 @@ public class Grid extends AbstractComponent
* @throws UnsupportedOperationException
* if the container does not support adding new items
*/
+ @SuppressWarnings("unchecked")
public Object addRow(Object... values) {
if (values == null) {
throw new IllegalArgumentException("Values cannot be 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 10b3288a93..29bd34ce33 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
@@ -211,6 +211,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Creates a new empty tree with caption.
*
* @param caption
+ * the caption of the component
*/
public Tree(String caption) {
this(caption, new HierarchicalContainer());
@@ -220,7 +221,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Creates a new tree with caption and connect it to a Container.
*
* @param caption
+ * the caption of the component
* @param dataSource
+ * the container
*/
public Tree(String caption, Container dataSource) {
super(caption, dataSource);
@@ -370,6 +373,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* succeeds only if all expandable items are expanded.
*
* @param startItemId
+ * ID of the initial item
* @return True if the expand operation succeeded
*/
public boolean expandItemsRecursively(Object startItemId) {
@@ -423,6 +427,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* succeeds only if all expandable items are collapsed.
*
* @param startItemId
+ * ID of the initial item
* @return True if the collapse operation succeeded
*/
public boolean collapseItemsRecursively(Object startItemId) {
@@ -670,8 +675,6 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
// rendered selectedKeys
LinkedList<String> selectedKeys = new LinkedList<String>();
- final LinkedList<String> expandedKeys = new LinkedList<String>();
-
// Iterates through hierarchical tree using a stack of iterators
final Stack<Iterator<?>> iteratorStack = new Stack<Iterator<?>>();
Collection<?> ids;
@@ -769,7 +772,6 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
if (areChildrenAllowed(itemId) && isExpanded(itemId)) {
target.addAttribute("expanded", true);
- expandedKeys.add(key);
}
// Add caption change listener
@@ -1027,11 +1029,12 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
private final Object expandedItemId;
/**
- * New instance of options change event.
+ * New instance of expanding event.
*
* @param source
- * the Source of the event.
+ * the source component of the event.
* @param expandedItemId
+ * ID of the item that was expanded
*/
public ExpandEvent(Component source, Object expandedItemId) {
super(source);
@@ -1039,9 +1042,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
/**
- * Node where the event occurred.
+ * ID of the item that was expanded.
*
- * @return the Source of the event.
+ * @return the item id.
*/
public Object getItemId() {
return expandedItemId;
@@ -1082,6 +1085,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* @deprecated As of 7.0, replaced by
* {@link #addExpandListener(ExpandListener)}
+ *
+ * @param listener
+ * the Listener to be added.
*/
@Deprecated
public void addListener(ExpandListener listener) {
@@ -1102,6 +1108,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* @deprecated As of 7.0, replaced by
* {@link #removeExpandListener(ExpandListener)}
+ *
+ * @param listener
+ * the Listener to be removed.
*/
@Deprecated
public void removeListener(ExpandListener listener) {
@@ -1137,6 +1146,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param source
* the Source of the event.
* @param collapsedItemId
+ * ID of the item that was collapsed
*/
public CollapseEvent(Component source, Object collapsedItemId) {
super(source);
@@ -1144,7 +1154,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
/**
- * Gets tge Collapsed Item id.
+ * Gets the ID of the item that was collapsed.
*
* @return the collapsed item id.
*/
@@ -1188,6 +1198,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* @deprecated As of 7.0, replaced by
* {@link #addCollapseListener(CollapseListener)}
+ *
+ * @param listener
+ * the Listener to be added.
*/
@Deprecated
public void addListener(CollapseListener listener) {
@@ -1208,6 +1221,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* @deprecated As of 7.0, replaced by
* {@link #removeCollapseListener(CollapseListener)}
+ *
+ * @param listener
+ * the Listener to be removed.
*/
@Deprecated
public void removeListener(CollapseListener listener) {
@@ -1476,9 +1492,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* If the method returns null, the current target is on a root node or
* on other undefined area over the tree component.
* <p>
- * The default Tree implementation marks the targetted tree node with
- * CSS classnames v-tree-node-dragfolder and
- * v-tree-node-caption-dragfolder (for the caption element).
+ * The default Tree implementation marks the targeted tree node with CSS
+ * classnames v-tree-node-dragfolder and v-tree-node-caption-dragfolder
+ * (for the caption element).
+ *
+ * @return the ID of the item that can receive the targeted drop
*/
public Object getItemIdInto() {
@@ -1553,10 +1571,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
/**
- * Sets the drag mode that controls how Tree behaves as a {@link DragSource}
- * .
+ * Sets the drag mode that controls how Tree behaves as a
+ * {@link DragSource}.
*
* @param dragMode
+ * the drag mode to set
*/
public void setDragMode(TreeDragMode dragMode) {
this.dragMode = dragMode;
@@ -1831,6 +1850,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Get the item description generator which generates tooltips for tree
* items.
+ *
+ * @return the item description generator
*/
public ItemDescriptionGenerator getItemDescriptionGenerator() {
return itemDescriptionGenerator;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java
index 3f4e0b8336..c3facce012 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java
@@ -36,8 +36,6 @@ public class CalendarDateRange implements Serializable {
private Date end;
- private final transient TimeZone tz;
-
/**
* Constructor.
*
@@ -45,12 +43,13 @@ public class CalendarDateRange implements Serializable {
* The start date and time of the date range
* @param end
* The end date and time of the date range
+ * @param tz
+ * Time zone. Unused.
*/
public CalendarDateRange(Date start, Date end, TimeZone tz) {
super();
this.start = start;
this.end = end;
- this.tz = tz;
}
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
index 4301c0b1de..7cb6462bdc 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
@@ -16,7 +16,6 @@
package com.vaadin.v7.ui.components.colorpicker;
import java.lang.reflect.Method;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -161,6 +160,9 @@ public class ColorPickerPopup extends Window
/**
* Instantiates a new color picker popup.
+ *
+ * @param initialColor
+ * initially selected color
*/
public ColorPickerPopup(Color initialColor) {
this();
@@ -209,11 +211,6 @@ public class ColorPickerPopup extends Window
history.setWidth("97%");
history.setHeight("22px");
- // Create the default colors
- List<Color> defaultColors = new ArrayList<Color>();
- defaultColors.add(Color.BLACK);
- defaultColors.add(Color.WHITE);
-
// Create the history
VerticalLayout innerContainer = new VerticalLayout();
innerContainer.setWidth("100%");