diff options
author | John Ahlroos <john@vaadin.com> | 2014-08-07 11:11:03 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2014-08-07 11:11:03 +0300 |
commit | a9fc5d5be75c8ca33231909d1a44f471b5dcaaf9 (patch) | |
tree | e117a7f1d103616c48c89836ce88ccd3ed3a9e88 /shared | |
parent | 98be1201b422886092a3d363b8cf40235766f2f1 (diff) | |
download | vaadin-framework-a9fc5d5be75c8ca33231909d1a44f471b5dcaaf9.tar.gz vaadin-framework-a9fc5d5be75c8ca33231909d1a44f471b5dcaaf9.zip |
Fixes removing all rows causing javascript error #13334
Change-Id: If3850d2248c6731bf3ee55d73c4cba2999ff9882
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/Range.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/Range.java b/shared/src/com/vaadin/shared/ui/grid/Range.java index a1d4d86103..38b2ff2a60 100644 --- a/shared/src/com/vaadin/shared/ui/grid/Range.java +++ b/shared/src/com/vaadin/shared/ui/grid/Range.java @@ -369,6 +369,12 @@ public final class Range implements Serializable { * if the two ranges aren't connected */ public Range combineWith(Range other) throws IllegalArgumentException { + if (other.isEmpty()) { + return this; + } else if (isEmpty()) { + return other; + } + if (getStart() > other.getEnd() || other.getStart() > getEnd()) { throw new IllegalArgumentException("There is a gap between " + this + " and " + other); |