From 0df32553862063464d607ecda0e22c50be018168 Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Wed, 28 Feb 2024 14:22:45 +0200 Subject: [PATCH] AKR(Backend) review fix --- .../fi/oph/akr/service/ClerkTranslatorService.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/akr/src/main/java/fi/oph/akr/service/ClerkTranslatorService.java b/backend/akr/src/main/java/fi/oph/akr/service/ClerkTranslatorService.java index b93555e75..b4be4167a 100644 --- a/backend/akr/src/main/java/fi/oph/akr/service/ClerkTranslatorService.java +++ b/backend/akr/src/main/java/fi/oph/akr/service/ClerkTranslatorService.java @@ -358,12 +358,10 @@ private void copyDtoFieldsToTranslator(final TranslatorDTOCommonFields dto, fina .filter(ClerkTranslatorAddressDTO::selected) .findFirst(); - selectedAddress.ifPresent(clerkTranslatorAddressDTO -> - translator.setSelectedSource(clerkTranslatorAddressDTO.source().toString()) - ); - selectedAddress.ifPresent(clerkTranslatorAddressDTO -> - translator.setSelectedType(clerkTranslatorAddressDTO.type().toString()) - ); + selectedAddress.ifPresent(clerkTranslatorAddressDTO -> { + translator.setSelectedSource(clerkTranslatorAddressDTO.source().toString()); + translator.setSelectedType(clerkTranslatorAddressDTO.type().toString()); + }); } @CacheEvict(cacheNames = CacheConfig.CACHE_NAME_PUBLIC_TRANSLATORS, allEntries = true)