Skip to content

Commit

Permalink
refactor: switch 불필요한 구문 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Jul 19, 2024
1 parent ceaa483 commit 0136dae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public Long toRoleLevel() {
case USER -> 1L;
case ADMIN -> 2L;
case SUPER -> 3L;
default -> 0L;
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

Expand Down Expand Up @@ -89,11 +90,8 @@ public void sendBatchEmail(List<EmailTask> emailTasks) throws MessagingException
}

private void setImageInTemplate(MimeMessageHelper messageHelper, EmailTemplateType templateType) throws MessagingException {
switch (templateType) {
case NORMAL -> {
messageHelper.addInline("image-1", new ClassPathResource("images/image-1.png"));
break;
}
if (Objects.requireNonNull(templateType) == EmailTemplateType.NORMAL) {
messageHelper.addInline("image-1", new ClassPathResource("images/image-1.png"));
}
}
}

0 comments on commit 0136dae

Please sign in to comment.