From 355b25a4b446990552a3642c4a32966da74c96b0 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Tue, 7 May 2019 14:49:14 +0300 Subject: [PATCH] Fixed - RedisTemplate.radius and RedisConnection.geoRadius throw IllegalArgumentException during response decoding. #2093 --- .../org/redisson/spring/data/connection/GeoResultsDecoder.java | 2 +- .../org/redisson/spring/data/connection/GeoResultsDecoder.java | 2 +- .../org/redisson/spring/data/connection/GeoResultsDecoder.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java b/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java index e8b9f0580..9f49b22b8 100644 --- a/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java +++ b/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java @@ -64,7 +64,7 @@ public class GeoResultsDecoder implements MultiDecoder>(location, new Distance((Double)vals.get(1), metric))); } else { GeoLocation location = new GeoLocation((byte[])vals.get(0), (Point)vals.get(1)); - result.add(new GeoResult>(location, null)); + result.add(new GeoResult>(location, new Distance(0))); } } else { GeoLocation location = new GeoLocation((byte[])object, null); diff --git a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java index e8b9f0580..9f49b22b8 100644 --- a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java +++ b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java @@ -64,7 +64,7 @@ public class GeoResultsDecoder implements MultiDecoder>(location, new Distance((Double)vals.get(1), metric))); } else { GeoLocation location = new GeoLocation((byte[])vals.get(0), (Point)vals.get(1)); - result.add(new GeoResult>(location, null)); + result.add(new GeoResult>(location, new Distance(0))); } } else { GeoLocation location = new GeoLocation((byte[])object, null); diff --git a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java index e8b9f0580..9f49b22b8 100644 --- a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java +++ b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/GeoResultsDecoder.java @@ -64,7 +64,7 @@ public class GeoResultsDecoder implements MultiDecoder>(location, new Distance((Double)vals.get(1), metric))); } else { GeoLocation location = new GeoLocation((byte[])vals.get(0), (Point)vals.get(1)); - result.add(new GeoResult>(location, null)); + result.add(new GeoResult>(location, new Distance(0))); } } else { GeoLocation location = new GeoLocation((byte[])object, null);