diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-01-15 18:39:11 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-01-15 18:39:11 +0000 |
commit | 38d932279fd73eaa6e1dde33136709faaae2155f (patch) | |
tree | c946c4077f0807dee782849ec1fda2dd5dd7434b /src/com/vaadin/data/util | |
parent | 2342d517d8d53a51ef47db82b3558d2b850b027e (diff) | |
download | vaadin-framework-38d932279fd73eaa6e1dde33136709faaae2155f.tar.gz vaadin-framework-38d932279fd73eaa6e1dde33136709faaae2155f.zip |
Merged 6.2.2 fixes from /versions/6.2
svn changeset:10761/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/data/util')
-rw-r--r-- | src/com/vaadin/data/util/DefaultItemSorter.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/DefaultItemSorter.java b/src/com/vaadin/data/util/DefaultItemSorter.java index 5cec2dc461..aefdbf1cc9 100644 --- a/src/com/vaadin/data/util/DefaultItemSorter.java +++ b/src/com/vaadin/data/util/DefaultItemSorter.java @@ -62,6 +62,20 @@ public class DefaultItemSorter implements ItemSorter { Item item1 = container.getItem(o1); Item item2 = container.getItem(o2); + /* + * Items can be null if the container is filtered. Null is considered + * "less" than not-null. + */ + if (item1 == null) { + if (item2 == null) { + return 0; + } else { + return 1; + } + } else if (item2 == null) { + return -1; + } + for (int i = 0; i < sortPropertyIds.length; i++) { int result = compareProperty(sortPropertyIds[i], sortDirections[i], |