From 65bd4f145fb0476972723787291c6ce668dd879f Mon Sep 17 00:00:00 2001 From: Hanvp Date: Sat, 3 Feb 2024 16:29:00 +0900 Subject: [PATCH] =?UTF-8?q?:recycle:=20Refactor/296=20thread=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=20=EC=B2=B4=ED=81=AC=20=EC=9C=84=ED=95=9C=20log=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80(parallelStream)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/zipdabang/server/converter/RecipeConverter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/zipdabang/server/converter/RecipeConverter.java b/src/main/java/zipdabang/server/converter/RecipeConverter.java index 001b270..9d26c40 100644 --- a/src/main/java/zipdabang/server/converter/RecipeConverter.java +++ b/src/main/java/zipdabang/server/converter/RecipeConverter.java @@ -747,7 +747,7 @@ public static TestRecipe toTestRecipe(RecipeRequestDto.CreateRecipeDto request, } public static List toTestRecipeCategory(List categoryIds, TestRecipe recipe) { - return categoryIds.stream() + return categoryIds.stream().parallel() .map(recipeCategoryId -> toTestRecipeCategoryMappingDto(recipeCategoryId, recipe)) .collect(Collectors.toList()); } @@ -761,7 +761,7 @@ private static TestRecipeCategoryMapping toTestRecipeCategoryMappingDto(Long cat } public static List toTestStep(RecipeRequestDto.CreateRecipeDto request, TestRecipe recipe, List stepImages) { - return request.getSteps().stream() + return request.getSteps().stream().parallel() .map(step-> { if (step.getDescription() == null) throw new RecipeException(CommonStatus.NULL_RECIPE_ERROR); @@ -804,7 +804,7 @@ private static TestStep toTestStepDto(RecipeRequestDto.StepDto step, TestRecipe } public static List toTestIngredient(RecipeRequestDto.CreateRecipeDto request, TestRecipe recipe) { - return request.getIngredients().stream() + return request.getIngredients().stream().parallel() .map(ingredient -> toTestIngredientDto(ingredient, recipe)) .collect(Collectors.toList()); }