Skip to content

Commit 9df07ff

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 b5d9982 commit 9df07ff

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
@@ -389,6 +389,10 @@ <HV> HV deserializeHashValue(byte[] value) {
389389
*/
390390
GeoResults<GeoLocation<V>> deserializeGeoResults(GeoResults<GeoLocation<byte[]>> source) {
391391

392+
if (source == null) {
393+
return null;
394+
}
395+
392396
if (valueSerializer() == null) {
393397
return (GeoResults<GeoLocation<V>>) (Object) source;
394398
}

0 commit comments

Comments
 (0)