From 95f70f425a6e379db63b9a824b97e94a3c08824d Mon Sep 17 00:00:00 2001 From: anastasia shulga Date: Tue, 16 Apr 2019 08:21:36 +0000 Subject: [PATCH] Update2 TagService.java --- .../ru/ulstu/tags/service/TagService.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/ru/ulstu/tags/service/TagService.java b/src/main/java/ru/ulstu/tags/service/TagService.java index e68c683..8541aad 100644 --- a/src/main/java/ru/ulstu/tags/service/TagService.java +++ b/src/main/java/ru/ulstu/tags/service/TagService.java @@ -23,16 +23,16 @@ public class TagService { return tags .stream() .map(tag -> { - if(tag.getId() != null){ - return getExistById(tag); - }else { - Tag existTag = isExistByName(tag.getTagName()); - if(existTag != null){ - return existTag; - }else{ - return create(tag); - } - } + if (tag.getId() != null) { + return getExistById(tag); + } else { + Tag existTag = isExistByName(tag.getTagName()); + if (existTag != null) { + return existTag; + } else { + return create(tag); + } + } }).collect(Collectors.toList()); }