Skip to content

Commit 5cbee3c

Browse files
helei01_gzamp911de
helei01_gza
authored andcommitted
Eagerly return null values in AbstractOperations.deserializeGeoResults(…) to avoid null dereference.
Closes #2279 Original pull request: #2280.
1 parent 620ba46 commit 5cbee3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/springframework/data/redis/core/AbstractOperations.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ <HV> HV deserializeHashValue(byte[] value) {
364364
*/
365365
GeoResults<GeoLocation<V>> deserializeGeoResults(GeoResults<GeoLocation<byte[]>> source) {
366366

367+
if (source == null) {
368+
return null;
369+
}
370+
367371
if (valueSerializer() == null) {
368372
return (GeoResults<GeoLocation<V>>) (Object) source;
369373
}

0 commit comments

Comments
 (0)