From 27107227ca3ac9806387659111f87db7f0b3348c Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 30 Nov 2016 15:44:10 +0200 Subject: Fix ListDataProvider and SortOrder javadoc Change-Id: I99895bd13ecbc34bc85409fcde02a65e9f9a2f13 --- .../main/java/com/vaadin/server/data/ListDataProvider.java | 13 ++++++++++--- server/src/main/java/com/vaadin/server/data/SortOrder.java | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'server/src') diff --git a/server/src/main/java/com/vaadin/server/data/ListDataProvider.java b/server/src/main/java/com/vaadin/server/data/ListDataProvider.java index b295f3375d..0f9e033bbb 100644 --- a/server/src/main/java/com/vaadin/server/data/ListDataProvider.java +++ b/server/src/main/java/com/vaadin/server/data/ListDataProvider.java @@ -40,8 +40,11 @@ public class ListDataProvider private final Collection backend; /** - * Constructs a new ListDataProvider. This method makes a protective copy of - * the contents of the Collection. + * Constructs a new ListDataProvider. + *

+ * No protective copy is made of the list, and changes in the provided + * backing Collection will be visible via this data provider. The caller + * should copy the list if necessary. * * @param items * the initial data, not null @@ -56,6 +59,10 @@ public class ListDataProvider * Chaining constructor for making modified {@link ListDataProvider}s. This * Constructor is used internally for making sorted and filtered variants of * a base data provider with actual data. + *

+ * No protective copy is made of the list, and changes in the provided + * backing Collection will be visible via this data provider. The caller + * should copy the list if necessary. * * @param items * the backend data from the original list data provider @@ -123,7 +130,7 @@ public class ListDataProvider * {@code sortingBy(Comparator.comparing(sortOrder))}. * * @param sortOrder - * function to sort by + * function to sort by, not {@code null} * @param * the type of the Comparable sort key * @return new data provider with modified sorting diff --git a/server/src/main/java/com/vaadin/server/data/SortOrder.java b/server/src/main/java/com/vaadin/server/data/SortOrder.java index 03c846790d..d5ce197ccf 100644 --- a/server/src/main/java/com/vaadin/server/data/SortOrder.java +++ b/server/src/main/java/com/vaadin/server/data/SortOrder.java @@ -23,6 +23,9 @@ import com.vaadin.shared.data.sort.SortDirection; * Sorting information for one field. * * @see Query + * @param + * the type of the sorting information, usually a String (field id) + * or a {@link java.util.Comparator}. */ public class SortOrder implements Serializable { -- cgit v1.2.3