From cef5b51d3ff0792ab0a8a8423549dbff79e3027b Mon Sep 17 00:00:00 2001
From: Denis Anisimov
Date: Thu, 22 Sep 2016 15:28:36 +0300
Subject: Mark all server compatibility classes deprecated (#144).
Change-Id: Iba0a35d5ea9a97b0020f506f610630471c59748b
---
.../src/main/java/com/vaadin/v7/data/Buffered.java | 2 +
.../com/vaadin/v7/data/BufferedValidatable.java | 1 +
.../main/java/com/vaadin/v7/data/Collapsible.java | 1 +
.../main/java/com/vaadin/v7/data/Container.java | 18 +++
.../java/com/vaadin/v7/data/ContainerHelpers.java | 3 +-
.../src/main/java/com/vaadin/v7/data/Item.java | 6 +
.../src/main/java/com/vaadin/v7/data/Property.java | 11 ++
.../main/java/com/vaadin/v7/data/Validatable.java | 1 +
.../main/java/com/vaadin/v7/data/Validator.java | 3 +
.../vaadin/v7/data/fieldgroup/BeanFieldGroup.java | 7 +-
.../com/vaadin/v7/data/fieldgroup/Caption.java | 1 +
.../fieldgroup/DefaultFieldGroupFieldFactory.java | 1 +
.../com/vaadin/v7/data/fieldgroup/FieldGroup.java | 25 +++--
.../v7/data/fieldgroup/FieldGroupFieldFactory.java | 1 +
.../com/vaadin/v7/data/fieldgroup/PropertyId.java | 1 +
.../vaadin/v7/data/util/AbstractBeanContainer.java | 9 +-
.../com/vaadin/v7/data/util/AbstractContainer.java | 3 +
.../v7/data/util/AbstractInMemoryContainer.java | 9 +-
.../com/vaadin/v7/data/util/AbstractProperty.java | 6 +-
.../com/vaadin/v7/data/util/BeanContainer.java | 1 +
.../java/com/vaadin/v7/data/util/BeanItem.java | 9 +-
.../com/vaadin/v7/data/util/BeanItemContainer.java | 1 +
.../v7/data/util/ContainerHierarchicalWrapper.java | 23 ++--
.../v7/data/util/ContainerOrderedWrapper.java | 11 +-
.../com/vaadin/v7/data/util/DefaultItemSorter.java | 6 +-
.../vaadin/v7/data/util/FilesystemContainer.java | 7 +-
.../v7/data/util/GeneratedPropertyContainer.java | 27 +++--
.../vaadin/v7/data/util/HierarchicalContainer.java | 23 ++--
.../util/HierarchicalContainerOrderedWrapper.java | 1 +
.../com/vaadin/v7/data/util/IndexedContainer.java | 33 +++---
.../java/com/vaadin/v7/data/util/ItemSorter.java | 1 +
.../main/java/com/vaadin/v7/data/util/ListSet.java | 13 ++-
.../com/vaadin/v7/data/util/MethodProperty.java | 2 +
.../v7/data/util/MethodPropertyDescriptor.java | 1 +
.../vaadin/v7/data/util/NestedMethodProperty.java | 3 +-
.../v7/data/util/NestedPropertyDescriptor.java | 5 +-
.../com/vaadin/v7/data/util/ObjectProperty.java | 1 +
.../v7/data/util/PropertyValueGenerator.java | 1 +
.../com/vaadin/v7/data/util/PropertysetItem.java | 7 +-
.../com/vaadin/v7/data/util/TextFileProperty.java | 1 +
.../v7/data/util/TransactionalPropertyWrapper.java | 1 +
.../v7/data/util/VaadinPropertyDescriptor.java | 1 +
.../converter/AbstractStringToNumberConverter.java | 1 +
.../vaadin/v7/data/util/converter/Converter.java | 1 +
.../v7/data/util/converter/ConverterUtil.java | 1 +
.../data/util/converter/DateToLongConverter.java | 1 +
.../util/converter/DateToSqlDateConverter.java | 1 +
.../util/converter/DefaultConverterFactory.java | 3 +-
.../v7/data/util/converter/ReverseConverter.java | 1 +
.../converter/StringToBigDecimalConverter.java | 1 +
.../converter/StringToBigIntegerConverter.java | 1 +
.../util/converter/StringToBooleanConverter.java | 1 +
.../data/util/converter/StringToByteConverter.java | 1 +
.../converter/StringToCollectionConverter.java | 3 +
.../data/util/converter/StringToDateConverter.java | 1 +
.../util/converter/StringToDoubleConverter.java | 1 +
.../data/util/converter/StringToEnumConverter.java | 1 +
.../util/converter/StringToFloatConverter.java | 1 +
.../util/converter/StringToIntegerConverter.java | 1 +
.../data/util/converter/StringToLongConverter.java | 1 +
.../util/converter/StringToShortConverter.java | 1 +
.../data/util/filter/AbstractJunctionFilter.java | 1 +
.../java/com/vaadin/v7/data/util/filter/And.java | 1 +
.../com/vaadin/v7/data/util/filter/Between.java | 1 +
.../com/vaadin/v7/data/util/filter/Compare.java | 7 ++
.../com/vaadin/v7/data/util/filter/IsNull.java | 1 +
.../java/com/vaadin/v7/data/util/filter/Like.java | 1 +
.../java/com/vaadin/v7/data/util/filter/Not.java | 1 +
.../java/com/vaadin/v7/data/util/filter/Or.java | 1 +
.../v7/data/util/filter/SimpleStringFilter.java | 1 +
.../util/filter/UnsupportedFilterException.java | 1 +
.../data/util/sqlcontainer/CacheFlushNotifier.java | 7 +-
.../vaadin/v7/data/util/sqlcontainer/CacheMap.java | 1 +
.../v7/data/util/sqlcontainer/ColumnProperty.java | 2 +
.../util/sqlcontainer/OptimisticLockException.java | 1 +
.../v7/data/util/sqlcontainer/ReadOnlyRowId.java | 1 +
.../v7/data/util/sqlcontainer/Reference.java | 1 +
.../vaadin/v7/data/util/sqlcontainer/RowId.java | 1 +
.../vaadin/v7/data/util/sqlcontainer/RowItem.java | 3 +-
.../v7/data/util/sqlcontainer/SQLContainer.java | 44 ++++----
.../vaadin/v7/data/util/sqlcontainer/SQLUtil.java | 1 +
.../v7/data/util/sqlcontainer/TemporaryRowId.java | 1 +
.../connection/J2EEConnectionPool.java | 1 +
.../connection/JDBCConnectionPool.java | 1 +
.../connection/SimpleJDBCConnectionPool.java | 5 +-
.../query/AbstractTransactionalQuery.java | 1 +
.../util/sqlcontainer/query/FreeformQuery.java | 3 +-
.../sqlcontainer/query/FreeformQueryDelegate.java | 1 +
.../query/FreeformStatementDelegate.java | 1 +
.../v7/data/util/sqlcontainer/query/OrderBy.java | 1 +
.../util/sqlcontainer/query/QueryDelegate.java | 4 +
.../data/util/sqlcontainer/query/TableQuery.java | 16 +--
.../query/generator/DefaultSQLGenerator.java | 5 +-
.../query/generator/MSSQLGenerator.java | 1 +
.../query/generator/OracleGenerator.java | 1 +
.../sqlcontainer/query/generator/SQLGenerator.java | 1 +
.../query/generator/StatementHelper.java | 5 +-
.../query/generator/filter/AndTranslator.java | 1 +
.../query/generator/filter/BetweenTranslator.java | 1 +
.../query/generator/filter/CompareTranslator.java | 1 +
.../query/generator/filter/FilterTranslator.java | 1 +
.../query/generator/filter/IsNullTranslator.java | 1 +
.../query/generator/filter/LikeTranslator.java | 1 +
.../query/generator/filter/NotTranslator.java | 1 +
.../query/generator/filter/OrTranslator.java | 1 +
.../query/generator/filter/QueryBuilder.java | 3 +-
.../generator/filter/SimpleStringTranslator.java | 1 +
.../query/generator/filter/StringDecorator.java | 1 +
.../v7/data/validator/AbstractStringValidator.java | 1 +
.../v7/data/validator/AbstractValidator.java | 1 +
.../vaadin/v7/data/validator/BeanValidator.java | 2 +
.../data/validator/BigDecimalRangeValidator.java | 1 +
.../data/validator/BigIntegerRangeValidator.java | 1 +
.../v7/data/validator/ByteRangeValidator.java | 1 +
.../v7/data/validator/CompositeValidator.java | 6 +-
.../v7/data/validator/DateRangeValidator.java | 1 +
.../v7/data/validator/DoubleRangeValidator.java | 1 +
.../vaadin/v7/data/validator/DoubleValidator.java | 2 +-
.../vaadin/v7/data/validator/EmailValidator.java | 1 +
.../v7/data/validator/FloatRangeValidator.java | 1 +
.../v7/data/validator/IntegerRangeValidator.java | 1 +
.../v7/data/validator/LongRangeValidator.java | 1 +
.../vaadin/v7/data/validator/NullValidator.java | 1 +
.../vaadin/v7/data/validator/RangeValidator.java | 1 +
.../vaadin/v7/data/validator/RegexpValidator.java | 1 +
.../v7/data/validator/ShortRangeValidator.java | 1 +
.../v7/data/validator/StringLengthValidator.java | 1 +
.../com/vaadin/v7/event/DataBoundTransferable.java | 1 +
.../main/java/com/vaadin/v7/event/FieldEvents.java | 4 +
.../java/com/vaadin/v7/event/ItemClickEvent.java | 3 +
.../server/communication/data/DataGenerator.java | 1 +
.../data/RpcDataProviderExtension.java | 22 ++--
.../main/java/com/vaadin/v7/ui/AbstractField.java | 4 +-
.../main/java/com/vaadin/v7/ui/AbstractSelect.java | 47 +++++---
.../java/com/vaadin/v7/ui/AbstractTextField.java | 2 +
.../src/main/java/com/vaadin/v7/ui/Calendar.java | 23 ++--
.../src/main/java/com/vaadin/v7/ui/CheckBox.java | 1 +
.../src/main/java/com/vaadin/v7/ui/ComboBox.java | 8 +-
.../main/java/com/vaadin/v7/ui/CustomField.java | 1 +
.../src/main/java/com/vaadin/v7/ui/DateField.java | 2 +
.../java/com/vaadin/v7/ui/DefaultFieldFactory.java | 1 +
.../src/main/java/com/vaadin/v7/ui/Grid.java | 46 ++++++++
.../java/com/vaadin/v7/ui/InlineDateField.java | 1 +
.../src/main/java/com/vaadin/v7/ui/Label.java | 2 +
.../src/main/java/com/vaadin/v7/ui/ListSelect.java | 1 +
.../main/java/com/vaadin/v7/ui/NativeSelect.java | 1 +
.../main/java/com/vaadin/v7/ui/OptionGroup.java | 3 +-
.../main/java/com/vaadin/v7/ui/PopupDateField.java | 1 +
.../main/java/com/vaadin/v7/ui/ProgressBar.java | 1 +
.../main/java/com/vaadin/v7/ui/RichTextArea.java | 1 +
.../src/main/java/com/vaadin/v7/ui/Slider.java | 1 +
.../src/main/java/com/vaadin/v7/ui/Table.java | 108 +++++++++++-------
.../java/com/vaadin/v7/ui/TableFieldFactory.java | 1 +
.../src/main/java/com/vaadin/v7/ui/TextArea.java | 1 +
.../src/main/java/com/vaadin/v7/ui/Tree.java | 49 +++++---
.../src/main/java/com/vaadin/v7/ui/TreeTable.java | 11 +-
.../main/java/com/vaadin/v7/ui/TwinColSelect.java | 1 +
.../calendar/CalendarComponentEvent.java | 1 +
.../calendar/CalendarComponentEvents.java | 22 ++++
.../ui/components/calendar/CalendarDateRange.java | 1 +
.../components/calendar/CalendarTargetDetails.java | 1 +
.../calendar/ContainerEventProvider.java | 7 +-
.../ui/components/calendar/event/BasicEvent.java | 3 +-
.../calendar/event/BasicEventProvider.java | 7 +-
.../event/CalendarEditableEventProvider.java | 1 +
.../components/calendar/event/CalendarEvent.java | 4 +
.../calendar/event/CalendarEventProvider.java | 4 +
.../calendar/event/EditableCalendarEvent.java | 1 +
.../calendar/handler/BasicBackwardHandler.java | 1 +
.../calendar/handler/BasicDateClickHandler.java | 1 +
.../calendar/handler/BasicEventMoveHandler.java | 1 +
.../calendar/handler/BasicEventResizeHandler.java | 1 +
.../calendar/handler/BasicForwardHandler.java | 1 +
.../calendar/handler/BasicWeekClickHandler.java | 1 +
.../ui/renderers/AbstractJavaScriptRenderer.java | 1 +
.../com/vaadin/v7/ui/renderers/ButtonRenderer.java | 1 +
.../vaadin/v7/ui/renderers/ClickableRenderer.java | 3 +
.../com/vaadin/v7/ui/renderers/DateRenderer.java | 1 +
.../com/vaadin/v7/ui/renderers/HtmlRenderer.java | 1 +
.../com/vaadin/v7/ui/renderers/ImageRenderer.java | 1 +
.../com/vaadin/v7/ui/renderers/NumberRenderer.java | 1 +
.../v7/ui/renderers/ProgressBarRenderer.java | 1 +
.../java/com/vaadin/v7/ui/renderers/Renderer.java | 1 +
.../com/vaadin/v7/ui/renderers/TextRenderer.java | 1 +
.../com/vaadin/tests/server/DeprecatedTest.java | 124 +++++++++++++++++++++
185 files changed, 763 insertions(+), 256 deletions(-)
create mode 100644 compatibility-server/src/test/java/com/vaadin/tests/server/DeprecatedTest.java
(limited to 'compatibility-server/src')
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java
index 025a43fbba..2bd55555b3 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java
@@ -46,6 +46,7 @@ import com.vaadin.v7.data.Validator.InvalidValueException;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
public interface Buffered extends Serializable {
/**
@@ -115,6 +116,7 @@ public interface Buffered extends Serializable {
* @since 3.0
*/
@SuppressWarnings("serial")
+ @Deprecated
public class SourceException extends RuntimeException
implements Serializable, ErrorMessageProducer {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java b/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java
index ea0b3c0ebd..bbae982d1a 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java
@@ -28,6 +28,7 @@ import java.io.Serializable;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
public interface BufferedValidatable
extends Buffered, Validatable, Serializable {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java
index a5d63c5a50..d48e8344c9 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java
@@ -37,6 +37,7 @@ import com.vaadin.v7.data.Container.Ordered;
*
*
*/
+@Deprecated
public interface Collapsible extends Hierarchical, Ordered {
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java
index 81a78378d7..5a73d360e4 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java
@@ -80,6 +80,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException;
* @author Vaadin Ltd
* @since 3.0
*/
+@Deprecated
public interface Container extends Serializable {
/**
@@ -301,6 +302,7 @@ public interface Container extends Serializable {
* {@link Sortable} for more information.
*
*/
+ @Deprecated
public interface Ordered extends Container {
/**
@@ -424,6 +426,7 @@ public interface Container extends Serializable {
* change the internal order of items in the container.
*
*/
+ @Deprecated
public interface Sortable extends Ordered {
/**
@@ -468,6 +471,7 @@ public interface Container extends Serializable {
* position based on sorting.
*
*/
+ @Deprecated
public interface Indexed extends Ordered {
/**
@@ -588,6 +592,7 @@ public interface Container extends Serializable {
*
* @since 7.4
*/
+ @Deprecated
public interface ItemAddEvent extends ItemSetChangeEvent {
/**
@@ -618,6 +623,7 @@ public interface Container extends Serializable {
*
* @since 7.4
*/
+ @Deprecated
public interface ItemRemoveEvent extends ItemSetChangeEvent {
/**
* Gets the item id of the first removed item.
@@ -655,6 +661,7 @@ public interface Container extends Serializable {
* unable to have children.
*
*/
+ @Deprecated
public interface Hierarchical extends Container {
/**
@@ -849,6 +856,7 @@ public interface Container extends Serializable {
*
* @since 5.0 (renamed from Filterable to SimpleFilterable in 6.6)
*/
+ @Deprecated
public interface SimpleFilterable extends Container, Serializable {
/**
@@ -913,6 +921,7 @@ public interface Container extends Serializable {
*
* @since 6.6
*/
+ @Deprecated
public interface Filter extends Serializable {
/**
@@ -985,6 +994,7 @@ public interface Container extends Serializable {
*
* @since 6.6
*/
+ @Deprecated
public interface Filterable extends Container, Serializable {
/**
* Adds a filter for the container.
@@ -1026,6 +1036,7 @@ public interface Container extends Serializable {
* Interface implemented by viewer classes capable of using a Container as a
* data source.
*/
+ @Deprecated
public interface Viewer extends Serializable {
/**
@@ -1057,6 +1068,7 @@ public interface Container extends Serializable {
* internally.
*
*/
+ @Deprecated
public interface Editor extends Container.Viewer, Serializable {
}
@@ -1069,6 +1081,7 @@ public interface Container extends Serializable {
*
* A simple property value change is not an item set change.
*/
+ @Deprecated
public interface ItemSetChangeEvent extends Serializable {
/**
@@ -1085,6 +1098,7 @@ public interface Container extends Serializable {
* An item set change refers to addition, removal or reordering of items in
* the container. A simple property value change is not an item set change.
*/
+ @Deprecated
public interface ItemSetChangeListener extends Serializable {
/**
@@ -1115,6 +1129,7 @@ public interface Container extends Serializable {
* be able to implement an interface.
*
*/
+ @Deprecated
public interface ItemSetChangeNotifier extends Serializable {
/**
@@ -1161,6 +1176,7 @@ public interface Container extends Serializable {
* items in the container and their property values are not property set
* changes.
*/
+ @Deprecated
public interface PropertySetChangeEvent extends Serializable {
/**
@@ -1180,6 +1196,7 @@ public interface Container extends Serializable {
* concerning the set of items in the container and their property values
* are not property set changes.
*/
+ @Deprecated
public interface PropertySetChangeListener extends Serializable {
/**
@@ -1217,6 +1234,7 @@ public interface Container extends Serializable {
* be able to implement an interface.
*
*/
+ @Deprecated
public interface PropertySetChangeNotifier extends Serializable {
/**
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 c782f33133..1f324c86d7 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
@@ -28,6 +28,7 @@ import com.vaadin.v7.data.Container.Indexed;
*
* @since 7.0
*/
+@Deprecated
public class ContainerHelpers implements Serializable {
/**
@@ -83,7 +84,7 @@ public class ContainerHelpers implements Serializable {
endIndex = container.size();
}
- ArrayList rangeOfIds = new ArrayList();
+ ArrayList rangeOfIds = new ArrayList<>();
for (int i = startIndex; i < endIndex; i++) {
Object idByIndex = container.getIdByIndex(i);
if (idByIndex == null) {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java
index d90cdca3f7..b8c0b0c347 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java
@@ -29,6 +29,7 @@ import java.util.Collection;
* @author Vaadin Ltd
* @since 3.0
*/
+@Deprecated
public interface Item extends Serializable {
/**
@@ -89,6 +90,7 @@ public interface Item extends Serializable {
* Interface implemented by viewer classes capable of using an Item as a
* data source.
*/
+ @Deprecated
public interface Viewer extends Serializable {
/**
@@ -116,6 +118,7 @@ public interface Item extends Serializable {
* restrict the class from editing the contents of an internally.
*
*/
+ @Deprecated
public interface Editor extends Item.Viewer, Serializable {
}
@@ -130,6 +133,7 @@ public interface Item extends Serializable {
* this event.
*
*/
+ @Deprecated
public interface PropertySetChangeEvent extends Serializable {
/**
@@ -144,6 +148,7 @@ public interface Item extends Serializable {
* The listener interface for receiving PropertySetChangeEvent
* objects.
*/
+ @Deprecated
public interface PropertySetChangeListener extends Serializable {
/**
@@ -169,6 +174,7 @@ public interface Item extends Serializable {
* be able to implement an interface.
*
*/
+ @Deprecated
public interface PropertySetChangeNotifier extends Serializable {
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java
index 21129a64f9..d99f1dd844 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java
@@ -48,6 +48,7 @@ import java.io.Serializable;
* @author Vaadin Ltd
* @since 3.0
*/
+@Deprecated
public interface Property extends Serializable {
/**
@@ -125,6 +126,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd
* @since 7.0
*/
+ @Deprecated
public interface Transactional extends Property {
/**
@@ -178,6 +180,7 @@ public interface Property extends Serializable {
* @since 3.0
*/
@SuppressWarnings("serial")
+ @Deprecated
public class ReadOnlyException extends RuntimeException {
/**
@@ -206,6 +209,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface Viewer extends Serializable {
/**
@@ -238,6 +242,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface Editor extends Property.Viewer, Serializable {
}
@@ -251,6 +256,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ValueChangeEvent extends Serializable {
/**
@@ -268,6 +274,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ValueChangeListener extends Serializable {
/**
@@ -296,6 +303,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ValueChangeNotifier extends Serializable {
/**
@@ -340,6 +348,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ReadOnlyStatusChangeEvent extends Serializable {
/**
@@ -357,6 +366,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ReadOnlyStatusChangeListener extends Serializable {
/**
@@ -387,6 +397,7 @@ public interface Property extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public interface ReadOnlyStatusChangeNotifier extends Serializable {
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java
index 5c75d594ba..6da32d852a 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java
@@ -30,6 +30,7 @@ import java.util.Collection;
* @since 3.0
* @see com.vaadin.v7.data.Validator
*/
+@Deprecated
public interface Validatable extends Serializable {
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java
index a6ad0331ed..9d7e6032fc 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java
@@ -53,6 +53,7 @@ import com.vaadin.server.VaadinServlet;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
public interface Validator extends Serializable {
/**
@@ -79,6 +80,7 @@ public interface Validator extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
@SuppressWarnings("serial")
public class InvalidValueException extends RuntimeException
implements ErrorMessageProducer {
@@ -188,6 +190,7 @@ public interface Validator extends Serializable {
* @since 5.3.0
*/
@SuppressWarnings("serial")
+ @Deprecated
public class EmptyValueException extends Validator.InvalidValueException {
public EmptyValueException(String message) {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java
index 839d90344c..f5d70fbee0 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java
@@ -26,6 +26,7 @@ import com.vaadin.v7.data.util.BeanItem;
import com.vaadin.v7.data.validator.BeanValidator;
import com.vaadin.v7.ui.Field;
+@Deprecated
public class BeanFieldGroup extends FieldGroup {
private final Class beanType;
@@ -35,7 +36,7 @@ public class BeanFieldGroup extends FieldGroup {
public BeanFieldGroup(Class beanType) {
this.beanType = beanType;
- this.defaultValidators = new HashMap, BeanValidator>();
+ this.defaultValidators = new HashMap<>();
}
@Override
@@ -116,7 +117,7 @@ public class BeanFieldGroup extends FieldGroup {
if (bean == null) {
setItemDataSource((Item) null);
} else {
- setItemDataSource(new BeanItem(bean, beanType));
+ setItemDataSource(new BeanItem<>(bean, beanType));
}
}
@@ -259,7 +260,7 @@ public class BeanFieldGroup extends FieldGroup {
private static BeanFieldGroup createAndBindFields(T bean,
Object objectWithMemberFields, boolean buffered) {
@SuppressWarnings("unchecked")
- BeanFieldGroup beanFieldGroup = new BeanFieldGroup(
+ BeanFieldGroup beanFieldGroup = new BeanFieldGroup<>(
(Class) bean.getClass());
beanFieldGroup.setItemDataSource(bean);
beanFieldGroup.setBuffered(buffered);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java
index 0042cd8113..a2512de33b 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java
@@ -22,6 +22,7 @@ import java.lang.annotation.Target;
@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
+@Deprecated
public @interface Caption {
String value();
}
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 f488a03747..0fd03c21ad 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
@@ -43,6 +43,7 @@ import com.vaadin.v7.ui.TextField;
*
* @author Vaadin Ltd
*/
+@Deprecated
public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
private static final DefaultFieldGroupFieldFactory INSTANCE = new DefaultFieldGroupFieldFactory();
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 924ded1654..50ad9a843a 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
@@ -51,6 +51,7 @@ import com.vaadin.v7.ui.Field;
* @author Vaadin Ltd
* @since 7.0
*/
+@Deprecated
public class FieldGroup implements Serializable {
private Item itemDataSource;
@@ -59,9 +60,9 @@ public class FieldGroup implements Serializable {
private boolean enabled = true;
private boolean readOnly = false;
- private HashMap> propertyIdToField = new HashMap>();
- private LinkedHashMap, Object> fieldToPropertyId = new LinkedHashMap, Object>();
- private List commitHandlers = new ArrayList();
+ private HashMap> propertyIdToField = new HashMap<>();
+ private LinkedHashMap, Object> fieldToPropertyId = new LinkedHashMap<>();
+ private List commitHandlers = new ArrayList<>();
/**
* The field factory used by builder methods.
@@ -281,7 +282,7 @@ public class FieldGroup implements Serializable {
*/
protected Property.Transactional wrapInTransactionalProperty(
Property itemProperty) {
- return new TransactionalPropertyWrapper(itemProperty);
+ return new TransactionalPropertyWrapper<>(itemProperty);
}
private void throwIfFieldIsNull(Field> field, Object propertyId) {
@@ -440,9 +441,9 @@ public class FieldGroup implements Serializable {
*/
public Collection getUnboundPropertyIds() {
if (getItemDataSource() == null) {
- return new ArrayList();
+ return new ArrayList<>();
}
- List unboundPropertyIds = new ArrayList();
+ List unboundPropertyIds = new ArrayList<>();
unboundPropertyIds.addAll(getItemDataSource().getItemPropertyIds());
unboundPropertyIds.removeAll(propertyIdToField.keySet());
return unboundPropertyIds;
@@ -495,7 +496,7 @@ public class FieldGroup implements Serializable {
* commits succeeded
*/
private Map, InvalidValueException> commitFields() {
- Map, InvalidValueException> invalidValueExceptions = new HashMap, InvalidValueException>();
+ Map, InvalidValueException> invalidValueExceptions = new HashMap<>();
for (Field> f : fieldToPropertyId.keySet()) {
try {
@@ -514,6 +515,7 @@ public class FieldGroup implements Serializable {
*
* @since 7.4
*/
+ @Deprecated
public static class FieldGroupInvalidValueException
extends InvalidValueException {
private Map, InvalidValueException> invalidValueExceptions;
@@ -691,6 +693,7 @@ public class FieldGroup implements Serializable {
* of the commit and cause the commit to be aborted by throwing a
* {@link CommitException}.
*/
+ @Deprecated
public interface CommitHandler extends Serializable {
/**
* Called before changes are committed to the field and the item is
@@ -723,6 +726,7 @@ public class FieldGroup implements Serializable {
* FIXME javadoc
*
*/
+ @Deprecated
public static class CommitEvent implements Serializable {
private FieldGroup fieldBinder;
@@ -1047,6 +1051,7 @@ public class FieldGroup implements Serializable {
* fields did not pass validation
*
*/
+ @Deprecated
public static class CommitException extends Exception {
private FieldGroup fieldGroup;
@@ -1086,7 +1091,7 @@ public class FieldGroup implements Serializable {
return ((FieldGroupInvalidValueException) getCause())
.getInvalidFields();
}
- return new HashMap, InvalidValueException>();
+ return new HashMap<>();
}
/**
@@ -1101,6 +1106,7 @@ public class FieldGroup implements Serializable {
}
+ @Deprecated
public static class BindException extends RuntimeException {
public BindException(String message) {
@@ -1113,6 +1119,7 @@ public class FieldGroup implements Serializable {
}
+ @Deprecated
public static class SearchException extends RuntimeException {
public SearchException(String message) {
@@ -1226,7 +1233,7 @@ public class FieldGroup implements Serializable {
*/
protected static List getFieldsInDeclareOrder(
Class searchClass) {
- ArrayList memberFieldInOrder = new ArrayList();
+ ArrayList memberFieldInOrder = new ArrayList<>();
while (searchClass != null) {
for (java.lang.reflect.Field memberField : searchClass
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java
index c6b1d18962..cf9c4d8fcc 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java
@@ -26,6 +26,7 @@ import com.vaadin.v7.ui.Field;
* @author Vaadin Ltd.
* @since 7.0
*/
+@Deprecated
public interface FieldGroupFieldFactory extends Serializable {
/**
* Creates a field based on the data type that we want to edit
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java
index 3f9bbcdb20..f9b22074f0 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java
@@ -57,6 +57,7 @@ import com.vaadin.v7.ui.Field;
*/
@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
+@Deprecated
public @interface PropertyId {
String value();
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java
index ce984572c2..86197c5279 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java
@@ -60,6 +60,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException;
*
* @since 6.5
*/
+@Deprecated
public abstract class AbstractBeanContainer
extends AbstractInMemoryContainer>
implements Filterable, SimpleFilterable, Sortable, ValueChangeListener,
@@ -78,6 +79,7 @@ public abstract class AbstractBeanContainer
*
* @since 6.5
*/
+ @Deprecated
public static interface BeanIdResolver
extends Serializable {
/**
@@ -95,6 +97,7 @@ public abstract class AbstractBeanContainer
* The bean must have a getter for the property, and the getter must return
* an object of type IDTYPE.
*/
+ @Deprecated
protected class PropertyBasedBeanIdResolver
implements BeanIdResolver {
@@ -141,7 +144,7 @@ public abstract class AbstractBeanContainer
* Maps all item ids in the container (including filtered) to their
* corresponding BeanItem.
*/
- private final Map> itemIdToItem = new HashMap>();
+ private final Map> itemIdToItem = new HashMap<>();
/**
* The type of the beans in the container.
@@ -193,7 +196,7 @@ public abstract class AbstractBeanContainer
* @return created {@link BeanItem} or null if bean is null
*/
protected BeanItem createBeanItem(BEANTYPE bean) {
- return bean == null ? null : new BeanItem(bean, model);
+ return bean == null ? null : new BeanItem<>(bean, model);
}
/**
@@ -889,7 +892,7 @@ public abstract class AbstractBeanContainer
.getPropertyDescriptors((Class) propertyType);
for (String subPropertyId : pds.keySet()) {
String qualifiedPropertyId = propertyId + "." + subPropertyId;
- NestedPropertyDescriptor pd = new NestedPropertyDescriptor(
+ NestedPropertyDescriptor pd = new NestedPropertyDescriptor<>(
qualifiedPropertyId, (Class) type);
model.put(qualifiedPropertyId, pd);
model.remove(propertyId);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java
index f57da653a5..8bfd536a8d 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java
@@ -37,6 +37,7 @@ import com.vaadin.v7.data.Container;
*
* @since 6.6
*/
+@Deprecated
public abstract class AbstractContainer implements Container {
/**
@@ -57,6 +58,7 @@ public abstract class AbstractContainer implements Container {
* concerned by the change, but subclasses can provide additional
* information about the changes.
*/
+ @Deprecated
protected static class BasePropertySetChangeEvent extends EventObject
implements Container.PropertySetChangeEvent, Serializable {
@@ -78,6 +80,7 @@ public abstract class AbstractContainer implements Container {
* performed, but subclasses can add provide additional information about
* the changes.
*/
+ @Deprecated
protected static class BaseItemSetChangeEvent extends EventObject
implements Container.ItemSetChangeEvent, Serializable {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java
index 78c908f78a..2adb3c9617 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java
@@ -93,6 +93,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException;
*
* @since 6.6
*/
+@Deprecated
public abstract class AbstractInMemoryContainer
extends AbstractContainer
implements ItemSetChangeNotifier, Container.Indexed {
@@ -120,7 +121,7 @@ public abstract class AbstractInMemoryContainer filters = new HashSet();
+ private Set filters = new HashSet<>();
/**
* The item sorter which is used for sorting the container.
@@ -190,6 +191,7 @@ public abstract class AbstractInMemoryContainer removedFilters = new LinkedList();
+ List removedFilters = new LinkedList<>();
for (Iterator iterator = getFilters().iterator(); iterator
.hasNext();) {
Filter f = iterator.next();
@@ -760,7 +763,7 @@ public abstract class AbstractInMemoryContainer getSortablePropertyIds() {
- LinkedList sortables = new LinkedList();
+ LinkedList sortables = new LinkedList<>();
for (Object propertyId : getContainerPropertyIds()) {
Class> propertyType = getType(propertyId);
if (Comparable.class.isAssignableFrom(propertyType)
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
index 33d22777ad..998c1efc73 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
@@ -30,6 +30,7 @@ import com.vaadin.v7.data.Property;
*
* @since 6.6
*/
+@Deprecated
public abstract class AbstractProperty implements Property,
Property.ValueChangeNotifier, Property.ReadOnlyStatusChangeNotifier {
@@ -75,6 +76,7 @@ public abstract class AbstractProperty implements Property,
* An Event
object specifying the Property whose read-only
* status has been changed.
*/
+ @Deprecated
protected static class ReadOnlyStatusChangeEvent
extends java.util.EventObject
implements Property.ReadOnlyStatusChangeEvent {
@@ -111,7 +113,7 @@ public abstract class AbstractProperty implements Property,
public void addReadOnlyStatusChangeListener(
Property.ReadOnlyStatusChangeListener listener) {
if (readOnlyStatusChangeListeners == null) {
- readOnlyStatusChangeListeners = new LinkedList();
+ readOnlyStatusChangeListeners = new LinkedList<>();
}
readOnlyStatusChangeListeners.add(listener);
}
@@ -197,7 +199,7 @@ public abstract class AbstractProperty implements Property,
@Override
public void addValueChangeListener(ValueChangeListener listener) {
if (valueChangeListeners == null) {
- valueChangeListeners = new LinkedList();
+ valueChangeListeners = new LinkedList<>();
}
valueChangeListeners.add(listener);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java
index 0b08264fc5..5b7bdc199a 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java
@@ -68,6 +68,7 @@ import java.util.Collection;
*
* @since 6.5
*/
+@Deprecated
public class BeanContainer
extends AbstractBeanContainer {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java
index 78ec807fd1..8bba865ffc 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java
@@ -35,6 +35,7 @@ import com.vaadin.data.util.BeanUtil;
* @since 3.0
*/
@SuppressWarnings("serial")
+@Deprecated
public class BeanItem extends PropertysetItem {
/**
@@ -185,7 +186,7 @@ public class BeanItem extends PropertysetItem {
*/
static LinkedHashMap> getPropertyDescriptors(
final Class beanClass) {
- final LinkedHashMap> pdMap = new LinkedHashMap>();
+ final LinkedHashMap> pdMap = new LinkedHashMap<>();
// Try to introspect, if it fails, we just have an empty Item
try {
@@ -198,7 +199,7 @@ public class BeanItem extends PropertysetItem {
final Method getMethod = pd.getReadMethod();
if ((getMethod != null)
&& getMethod.getDeclaringClass() != Object.class) {
- VaadinPropertyDescriptor vaadinPropertyDescriptor = new MethodPropertyDescriptor(
+ VaadinPropertyDescriptor vaadinPropertyDescriptor = new MethodPropertyDescriptor<>(
pd.getName(), pd.getPropertyType(),
pd.getReadMethod(), pd.getWriteMethod());
pdMap.put(pd.getName(), vaadinPropertyDescriptor);
@@ -222,7 +223,7 @@ public class BeanItem extends PropertysetItem {
* not specified
*/
public void expandProperty(String propertyId, String... subPropertyIds) {
- Set subPropertySet = new HashSet(
+ Set subPropertySet = new HashSet<>(
Arrays.asList(subPropertyIds));
if (0 == subPropertyIds.length) {
@@ -251,7 +252,7 @@ public class BeanItem extends PropertysetItem {
*/
public void addNestedProperty(String nestedPropertyId) {
addItemProperty(nestedPropertyId,
- new NestedMethodProperty(getBean(), nestedPropertyId));
+ new NestedMethodProperty<>(getBean(), nestedPropertyId));
}
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java
index de8d6d1cf0..b5e2f6edda 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java
@@ -51,6 +51,7 @@ import java.util.Collection;
*
* @since 5.4
*/
+@Deprecated
@SuppressWarnings("serial")
public class BeanItemContainer
extends AbstractBeanContainer {
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 308a1e9fd2..8ea613b662 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
@@ -47,6 +47,7 @@ import com.vaadin.v7.data.Property;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
@SuppressWarnings("serial")
public class ContainerHierarchicalWrapper implements Container.Hierarchical,
Container.ItemSetChangeNotifier, Container.PropertySetChangeNotifier {
@@ -118,10 +119,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
// Create initial order if needed
if (!hierarchical) {
- noChildrenAllowed = new HashSet();
- parent = new Hashtable();
- children = new Hashtable>();
- roots = new LinkedHashSet(container.getItemIds());
+ noChildrenAllowed = new HashSet<>();
+ parent = new Hashtable<>();
+ children = new Hashtable<>();
+ roots = new LinkedHashSet<>(container.getItemIds());
}
updateHierarchicalWrapper();
@@ -141,10 +142,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
// Recreate hierarchy and data structures if missing
if (noChildrenAllowed == null || parent == null || children == null
|| roots == null) {
- noChildrenAllowed = new HashSet();
- parent = new Hashtable();
- children = new Hashtable>();
- roots = new LinkedHashSet(container.getItemIds());
+ noChildrenAllowed = new HashSet<>();
+ parent = new Hashtable<>();
+ children = new Hashtable<>();
+ roots = new LinkedHashSet<>(container.getItemIds());
}
// Check that the hierarchy is up-to-date
@@ -157,7 +158,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
itemIds);
// Calculate the set of all items in the hierarchy
- final HashSet s = new HashSet();
+ final HashSet s = new HashSet<>();
s.addAll(parent.keySet());
s.addAll(children.keySet());
s.addAll(roots);
@@ -182,7 +183,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
Object[] array = roots.toArray();
Arrays.sort(array, basedOnOrderFromWrappedContainer);
- roots = new LinkedHashSet();
+ roots = new LinkedHashSet<>();
for (int i = 0; i < array.length; i++) {
roots.add(array[i]);
}
@@ -475,7 +476,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
parent.put(itemId, newParentId);
LinkedList pcl = children.get(newParentId);
if (pcl == null) {
- pcl = new LinkedList();
+ pcl = new LinkedList<>();
children.put(newParentId, pcl);
}
pcl.add(itemId);
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 9ac8038f03..00e580f9c5 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
@@ -43,6 +43,7 @@ import com.vaadin.v7.data.Property;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
@SuppressWarnings("serial")
public class ContainerOrderedWrapper implements Container.Ordered,
Container.ItemSetChangeNotifier, Container.PropertySetChangeNotifier {
@@ -215,12 +216,12 @@ public class ContainerOrderedWrapper implements Container.Ordered,
if (next == null || first == null || last == null || prev == null) {
first = null;
last = null;
- next = new Hashtable();
- prev = new Hashtable();
+ next = new Hashtable<>();
+ prev = new Hashtable<>();
}
// Filter out all the missing items
- final LinkedList> l = new LinkedList(next.keySet());
+ final LinkedList> l = new LinkedList<>(next.keySet());
for (final Iterator> i = l.iterator(); i.hasNext();) {
final Object id = i.next();
if (!container.containsId(id)) {
@@ -469,9 +470,9 @@ public class ContainerOrderedWrapper implements Container.Ordered,
if (ordered) {
return ((Container.Ordered) container).getItemIds();
} else if (first == null) {
- return new ArrayList();
+ return new ArrayList<>();
} else {
- List itemIds = new ArrayList();
+ List itemIds = new ArrayList<>();
itemIds.add(first);
Object current = first;
while (next.containsKey(current)) {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java
index 446c2b50ce..7f1fe574c8 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java
@@ -38,6 +38,7 @@ import com.vaadin.v7.data.Property;
* provided a default comparator is used.
*
*/
+@Deprecated
public class DefaultItemSorter implements ItemSorter {
private java.lang.Object[] sortPropertyIds;
@@ -165,8 +166,8 @@ public class DefaultItemSorter implements ItemSorter {
this.container = container;
// Removes any non-sortable property ids
- final List ids = new ArrayList();
- final List orders = new ArrayList();
+ final List ids = new ArrayList<>();
+ final List orders = new ArrayList<>();
final Collection> sortable = container
.getSortableContainerPropertyIds();
for (int i = 0; i < propertyId.length; i++) {
@@ -191,6 +192,7 @@ public class DefaultItemSorter implements ItemSorter {
* compares can be cast to Comparable.
*
*/
+ @Deprecated
public static class DefaultPropertyValueComparator
implements Comparator, Serializable {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
index 7800a6ff50..f0a2fff8af 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
@@ -42,6 +42,7 @@ import com.vaadin.v7.data.Property;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
@SuppressWarnings("serial")
public class FilesystemContainer implements Container.Hierarchical {
@@ -80,7 +81,7 @@ public class FilesystemContainer implements Container.Hierarchical {
static {
- FILE_PROPERTIES = new ArrayList();
+ FILE_PROPERTIES = new ArrayList<>();
FILE_PROPERTIES.add(PROPERTY_NAME);
FILE_PROPERTIES.add(PROPERTY_ICON);
FILE_PROPERTIES.add(PROPERTY_SIZE);
@@ -440,7 +441,7 @@ public class FilesystemContainer implements Container.Hierarchical {
public Collection getItemIds() {
if (recursive) {
- final Collection col = new ArrayList();
+ final Collection col = new ArrayList<>();
for (int i = 0; i < roots.length; i++) {
addItemIds(col, roots[i]);
}
@@ -614,6 +615,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public class FileItem implements Item {
/**
@@ -769,6 +771,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public class FileExtensionFilter implements FilenameFilter, Serializable {
private final String filter;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java
index cfa061db02..f27b651b50 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java
@@ -59,6 +59,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException;
* @since 7.4
* @author Vaadin Ltd
*/
+@Deprecated
public class GeneratedPropertyContainer extends AbstractContainer
implements Container.Indexed, Container.Sortable, Container.Filterable,
Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier {
@@ -70,11 +71,12 @@ public class GeneratedPropertyContainer extends AbstractContainer
private Filterable filterableContainer = null;
/* Removed properties which are hidden but not actually removed */
- private final Set removedProperties = new HashSet();
+ private final Set removedProperties = new HashSet<>();
/**
* Property implementation for generated properties
*/
+ @Deprecated
protected static class GeneratedProperty implements Property {
private Item item;
@@ -126,6 +128,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
* belongs to the wrapped container. To reach that Item use
* {@link #getWrappedItem()}
*/
+ @Deprecated
public class GeneratedPropertyItem implements Item {
private Item wrappedItem;
@@ -147,7 +150,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
@Override
public Collection> getItemPropertyIds() {
- Set wrappedProperties = new LinkedHashSet(
+ Set wrappedProperties = new LinkedHashSet<>(
wrappedItem.getItemPropertyIds());
wrappedProperties.removeAll(removedProperties);
wrappedProperties.addAll(propertyGenerators.keySet());
@@ -217,6 +220,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
* event is fired from wrapped container and needs to be reconstructed to
* act like it actually came from this container.
*/
+ @Deprecated
protected abstract class GeneratedItemAddOrRemoveEvent
implements Serializable {
@@ -248,6 +252,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
}
};
+ @Deprecated
protected class GeneratedItemRemoveEvent
extends GeneratedItemAddOrRemoveEvent implements ItemRemoveEvent {
@@ -262,6 +267,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
}
}
+ @Deprecated
protected class GeneratedItemAddEvent extends GeneratedItemAddOrRemoveEvent
implements ItemAddEvent {
@@ -283,16 +289,17 @@ public class GeneratedPropertyContainer extends AbstractContainer
* @param container
* underlying indexed container
*/
+ @Deprecated
public GeneratedPropertyContainer(Container.Indexed container) {
wrappedContainer = container;
- propertyGenerators = new HashMap>();
+ propertyGenerators = new HashMap<>();
if (wrappedContainer instanceof Sortable) {
sortableContainer = (Sortable) wrappedContainer;
}
if (wrappedContainer instanceof Filterable) {
- activeFilters = new HashMap>();
+ activeFilters = new HashMap<>();
filterableContainer = (Filterable) wrappedContainer;
} else {
activeFilters = null;
@@ -376,7 +383,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
private Property createProperty(final Item item,
final Object propertyId, final Object itemId,
final PropertyValueGenerator generator) {
- return new GeneratedProperty(item, propertyId, itemId, generator);
+ return new GeneratedProperty<>(item, propertyId, itemId, generator);
}
/* Listener functionality */
@@ -433,7 +440,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
"Wrapped container is not filterable");
}
- List addedFilters = new ArrayList();
+ List addedFilters = new ArrayList<>();
for (Entry, PropertyValueGenerator>> entry : propertyGenerators
.entrySet()) {
Object property = entry.getKey();
@@ -504,8 +511,8 @@ public class GeneratedPropertyContainer extends AbstractContainer
return;
}
- List actualSortProperties = new ArrayList();
- List actualSortDirections = new ArrayList();
+ List actualSortProperties = new ArrayList<>();
+ List actualSortDirections = new ArrayList<>();
for (int i = 0; i < propertyId.length; ++i) {
Object property = propertyId[i];
@@ -548,7 +555,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
return Collections.emptySet();
}
- Set sortablePropertySet = new HashSet(
+ Set sortablePropertySet = new HashSet<>(
sortableContainer.getSortableContainerPropertyIds());
for (Entry, PropertyValueGenerator>> entry : propertyGenerators
.entrySet()) {
@@ -625,7 +632,7 @@ public class GeneratedPropertyContainer extends AbstractContainer
*/
@Override
public Collection> getContainerPropertyIds() {
- Set wrappedProperties = new LinkedHashSet(
+ Set wrappedProperties = new LinkedHashSet<>(
wrappedContainer.getContainerPropertyIds());
wrappedProperties.removeAll(removedProperties);
wrappedProperties.addAll(propertyGenerators.keySet());
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 04940918de..694e256c4d 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
@@ -36,6 +36,7 @@ import com.vaadin.v7.data.Item;
* @author Vaadin Ltd.
* @since 3.0
*/
+@Deprecated
@SuppressWarnings("serial")
public class HierarchicalContainer extends IndexedContainer
implements Container.Hierarchical {
@@ -43,12 +44,12 @@ public class HierarchicalContainer extends IndexedContainer
/**
* Set of IDs of those contained Items that can't have children.
*/
- private final HashSet noChildrenAllowed = new HashSet();
+ private final HashSet noChildrenAllowed = new HashSet<>();
/**
* Mapping from Item ID to parent Item ID.
*/
- private final HashMap parent = new HashMap();
+ private final HashMap parent = new HashMap<>();
/**
* Mapping from Item ID to parent Item ID for items included in the filtered
@@ -59,7 +60,7 @@ public class HierarchicalContainer extends IndexedContainer
/**
* Mapping from Item ID to a list of child IDs.
*/
- private final HashMap> children = new HashMap>();
+ private final HashMap> children = new HashMap<>();
/**
* Mapping from Item ID to a list of child IDs when filtered
@@ -69,7 +70,7 @@ public class HierarchicalContainer extends IndexedContainer
/**
* List that contains all root elements of the container.
*/
- private final LinkedList roots = new LinkedList();
+ private final LinkedList roots = new LinkedList<>();
/**
* List that contains all filtered root elements of the container.
@@ -324,7 +325,7 @@ public class HierarchicalContainer extends IndexedContainer
if (pcl == null) {
// Create an empty list for holding children if one were not
// previously created
- pcl = new LinkedList();
+ pcl = new LinkedList<>();
children.put(newParentId, pcl);
}
pcl.add(itemId);
@@ -712,14 +713,14 @@ public class HierarchicalContainer extends IndexedContainer
}
// Reset data structures
- filteredRoots = new LinkedList();
- filteredChildren = new HashMap>();
- filteredParent = new HashMap();
+ filteredRoots = new LinkedList<>();
+ filteredChildren = new HashMap<>();
+ filteredParent = new HashMap<>();
if (includeParentsWhenFiltering) {
// Filter so that parents for items that match the filter are also
// included
- HashSet includedItems = new HashSet();
+ HashSet includedItems = new HashSet<>();
for (Object rootId : roots) {
if (filterIncludingParents(rootId, includedItems)) {
filteredRoots.add(rootId);
@@ -741,7 +742,7 @@ public class HierarchicalContainer extends IndexedContainer
// match
super.doFilterContainer(hasFilters);
- LinkedHashSet filteredItemIds = new LinkedHashSet(
+ LinkedHashSet filteredItemIds = new LinkedHashSet<>(
getItemIds());
for (Object itemId : filteredItemIds) {
@@ -773,7 +774,7 @@ public class HierarchicalContainer extends IndexedContainer
LinkedList parentToChildrenList = filteredChildren
.get(parentItemId);
if (parentToChildrenList == null) {
- parentToChildrenList = new LinkedList();
+ parentToChildrenList = new LinkedList<>();
filteredChildren.put(parentItemId, parentToChildrenList);
}
filteredParent.put(childItemId, parentItemId);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java
index f25842aec9..f9afce4714 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java
@@ -26,6 +26,7 @@ import com.vaadin.v7.data.Container.Hierarchical;
*
* @see ContainerOrderedWrapper
*/
+@Deprecated
@SuppressWarnings({ "serial" })
public class HierarchicalContainerOrderedWrapper extends ContainerOrderedWrapper
implements Hierarchical {
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 cbec3a2327..57004d0d91 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
@@ -56,6 +56,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException;
* @since 3.0
*/
+@Deprecated
@SuppressWarnings("serial")
// item type is really IndexedContainerItem, but using Item not to show it in
// public API
@@ -70,23 +71,23 @@ public class IndexedContainer
/**
* Linked list of ordered Property IDs.
*/
- private ArrayList propertyIds = new ArrayList();
+ private ArrayList propertyIds = new ArrayList<>();
/**
* Property ID to type mapping.
*/
- private Hashtable> types = new Hashtable>();
+ private Hashtable> types = new Hashtable<>();
/**
* Hash of Items, where each Item is implemented as a mapping from Property
* ID to Property value.
*/
- private Hashtable> items = new Hashtable>();
+ private Hashtable> items = new Hashtable<>();
/**
* Set of properties that are read-only.
*/
- private HashSet> readOnlyProperties = new HashSet>();
+ private HashSet> readOnlyProperties = new HashSet<>();
/**
* List of all Property value change event listeners listening all the
@@ -208,7 +209,7 @@ public class IndexedContainer
}
// store for next rows
if (defaultPropertyValues == null) {
- defaultPropertyValues = new HashMap();
+ defaultPropertyValues = new HashMap<>();
}
defaultPropertyValues.put(propertyId, defaultValue);
}
@@ -433,7 +434,7 @@ public class IndexedContainer
@Override
protected void registerNewItem(int index, Object newItemId, Item item) {
- Hashtable t = new Hashtable();
+ Hashtable t = new Hashtable<>();
items.put(newItemId, t);
addDefaultValues(t);
}
@@ -447,6 +448,7 @@ public class IndexedContainer
* @author Vaadin Ltd.
* @since 3.0
*/
+ @Deprecated
public static class ItemSetChangeEvent extends BaseItemSetChangeEvent {
private final int addedItemIndex;
@@ -536,7 +538,7 @@ public class IndexedContainer
@Override
public void addValueChangeListener(Property.ValueChangeListener listener) {
if (propertyValueChangeListeners == null) {
- propertyValueChangeListeners = new LinkedList();
+ propertyValueChangeListeners = new LinkedList<>();
}
propertyValueChangeListeners.add(listener);
}
@@ -653,19 +655,19 @@ public class IndexedContainer
Object itemId, Property.ValueChangeListener listener) {
if (listener != null) {
if (singlePropertyValueChangeListeners == null) {
- singlePropertyValueChangeListeners = new Hashtable>>();
+ singlePropertyValueChangeListeners = new Hashtable<>();
}
Map> propertySetToListenerListMap = singlePropertyValueChangeListeners
.get(propertyId);
if (propertySetToListenerListMap == null) {
- propertySetToListenerListMap = new Hashtable>();
+ propertySetToListenerListMap = new Hashtable<>();
singlePropertyValueChangeListeners.put(propertyId,
propertySetToListenerListMap);
}
List listenerList = propertySetToListenerListMap
.get(itemId);
if (listenerList == null) {
- listenerList = new LinkedList();
+ listenerList = new LinkedList<>();
propertySetToListenerListMap.put(itemId, listenerList);
}
listenerList.add(listener);
@@ -717,6 +719,7 @@ public class IndexedContainer
*
* @since 3.0
*/
+ @Deprecated
class IndexedContainerItem implements Item {
/**
@@ -1098,15 +1101,11 @@ public class IndexedContainer
? (ListSet) ((ListSet) getAllItemIds()).clone()
: null);
nc.setItemSetChangeListeners(getItemSetChangeListeners() != null
- ? new LinkedList(
- getItemSetChangeListeners())
- : null);
+ ? new LinkedList<>(getItemSetChangeListeners()) : null);
nc.propertyIds = propertyIds != null
? (ArrayList) propertyIds.clone() : null;
nc.setPropertySetChangeListeners(getPropertySetChangeListeners() != null
- ? new LinkedList(
- getPropertySetChangeListeners())
- : null);
+ ? new LinkedList<>(getPropertySetChangeListeners()) : null);
nc.propertyValueChangeListeners = propertyValueChangeListeners != null
? (LinkedList) propertyValueChangeListeners
.clone()
@@ -1132,7 +1131,7 @@ public class IndexedContainer
if (items == null) {
nc.items = null;
} else {
- nc.items = new Hashtable>();
+ nc.items = new Hashtable<>();
for (final Iterator> i = items.keySet().iterator(); i
.hasNext();) {
final Object id = i.next();
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java
index 9ca21ca137..8c541473e4 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java
@@ -26,6 +26,7 @@ import com.vaadin.v7.data.Container.Sortable;
* The ItemSorter
interface can be used in Sortable
* implementations to provide a custom sorting method.
*/
+@Deprecated
public interface ItemSorter
extends Comparator, Cloneable, Serializable {
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 2fd182238d..7dbb40f1a0 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
@@ -32,6 +32,7 @@ import java.util.Iterator;
*
* This class is subject to change and should not be used outside Vaadin core.
*/
+@Deprecated
public class ListSet extends ArrayList {
private HashSet itemSet = null;
@@ -39,22 +40,22 @@ public class ListSet extends ArrayList {
* Contains a map from an element to the number of duplicates it has. Used
* to temporarily allow duplicates in the list.
*/
- private HashMap duplicates = new HashMap();
+ private HashMap duplicates = new HashMap<>();
public ListSet() {
super();
- itemSet = new HashSet();
+ itemSet = new HashSet<>();
}
public ListSet(Collection extends E> c) {
super(c);
- itemSet = new HashSet(c.size());
+ itemSet = new HashSet<>(c.size());
itemSet.addAll(c);
}
public ListSet(int initialCapacity) {
super(initialCapacity);
- itemSet = new HashSet(initialCapacity);
+ itemSet = new HashSet<>(initialCapacity);
}
// Delegate contains operations to the set
@@ -184,7 +185,7 @@ public class ListSet extends ArrayList {
@Override
protected void removeRange(int fromIndex, int toIndex) {
- HashSet toRemove = new HashSet();
+ HashSet toRemove = new HashSet<>();
for (int idx = fromIndex; idx < toIndex; idx++) {
toRemove.add(get(idx));
}
@@ -269,7 +270,7 @@ public class ListSet