From daa4310412a9e5f9ab722f77e441f71bebe50153 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Mon, 11 Dec 2023 09:12:28 +0300 Subject: [PATCH] Fixed - RMap.getAll() method throws IndexOutOfBoundsException #5490 --- .../org/redisson/connection/decoder/MapGetAllDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redisson/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java b/redisson/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java index d12c4e470..41dc7d431 100644 --- a/redisson/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java +++ b/redisson/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java @@ -47,10 +47,10 @@ public class MapGetAllDecoder implements MultiDecoder> { @Override public Map decode(List parts, State state) { if (parts.isEmpty()) { - return new HashMap(); + return new HashMap<>(); } - Map result = new LinkedHashMap(parts.size()); - for (int index = 0; index < args.size()-shiftIndex; index++) { + Map result = new LinkedHashMap<>(parts.size()); + for (int index = 0; index < parts.size()-shiftIndex; index++) { Object value = parts.get(index); if (!allowNulls && value == null) { continue;