From 58d4ecbd068e1379b9c2201cffdb04962e79e38e Mon Sep 17 00:00:00 2001 From: gaborflorian <114913193+gaborflorian@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:08:18 +0200 Subject: [PATCH] JNG-5676 Replace keySet to entrySet (#66) * replace keyset to entryset * remove treeset --- src/main/java/hu/blackbelt/judo/dao/api/PayloadImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/hu/blackbelt/judo/dao/api/PayloadImpl.java b/src/main/java/hu/blackbelt/judo/dao/api/PayloadImpl.java index 54a2b23..a79956e 100644 --- a/src/main/java/hu/blackbelt/judo/dao/api/PayloadImpl.java +++ b/src/main/java/hu/blackbelt/judo/dao/api/PayloadImpl.java @@ -43,8 +43,9 @@ public PayloadImpl(Map map) { } } this.internal = new TreeMap<>(); - for (String key : new TreeSet<>(map.keySet())) { - Object value = map.get(key); + for (Map.Entry entry : map.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); if (value instanceof List) { this.internal.put(key, ((List>) value).stream().map( e -> asPayload(e)).collect(Collectors.toList()));