sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [sis] branch geoapi-4.0 updated: Filter : fix sort by comparator on Iterable types
Date Wed, 14 Aug 2019 08:49:57 GMT
This is an automated email from the ASF dual-hosted git repository.

jsorel pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new e94684c  Filter : fix sort by comparator on Iterable types
e94684c is described below

commit e94684c8a49a7b6e10bf5a90ddea3729b58c4f47
Author: jsorel <johann.sorel@geomatys.com>
AuthorDate: Wed Aug 14 10:46:33 2019 +0200

    Filter : fix sort by comparator on Iterable types
---
 .../java/org/apache/sis/internal/storage/query/SortByComparator.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SortByComparator.java
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SortByComparator.java
index 463d013..101c87b 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SortByComparator.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SortByComparator.java
@@ -78,8 +78,8 @@ final class SortByComparator implements Comparator<Feature> {
             if (f2 == null) return -1;
             for (int i=0; i<properties.length; i++) {
                 final Expression property = properties[i];
-                Comparable<?> o1 = (Comparable<?>) property.evaluate(f1);
-                Comparable<?> o2 = (Comparable<?>) property.evaluate(f2);
+                Object o1 = property.evaluate(f1);
+                Object o2 = property.evaluate(f2);
                 if (o1 != o2) {
                     if (o1 == null) return +1;
                     if (o2 == null) return -1;


Mime
View raw message