From c06e7e4374a741e73ed9173a91a72b59e6eab861 Mon Sep 17 00:00:00 2001 From: anthony-frage-ouest-france <156292537+anthony-frage-ouest-france@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:17:49 +0100 Subject: [PATCH] fix/22-fix-infinite-add-header fix infinite add in header (#24) --- .../fr/ouestfrance/querydsl/postgrest/PostgrestRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/querydsl-postgrest/src/main/java/fr/ouestfrance/querydsl/postgrest/PostgrestRepository.java b/querydsl-postgrest/src/main/java/fr/ouestfrance/querydsl/postgrest/PostgrestRepository.java index 6939865..a71c584 100644 --- a/querydsl-postgrest/src/main/java/fr/ouestfrance/querydsl/postgrest/PostgrestRepository.java +++ b/querydsl-postgrest/src/main/java/fr/ouestfrance/querydsl/postgrest/PostgrestRepository.java @@ -190,7 +190,7 @@ public T getOne(Object criteria) { private Map> headerMap(Header.Method method) { Map> map = new LinkedHashMap<>(); Optional.ofNullable(headersMap.get(method)) - .ifPresent(map::putAll); + .ifPresent(headerMap -> headerMap.forEach((key, value) -> map.computeIfAbsent(key, x -> new ArrayList<>()).addAll(value))); return map; } }