Skip to content

Commit

Permalink
reafactor: secure random 전환
Browse files Browse the repository at this point in the history
  • Loading branch information
le2sky committed Jan 20, 2025
1 parent b315aec commit d585512
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package maeilmail.bulksend.policy;

import java.security.SecureRandom;
import java.time.LocalDate;
import java.util.List;
import java.util.Random;
Expand All @@ -18,7 +19,7 @@ class RandomChoicePolicy implements ChoiceQuestionPolicy {

@Override
public QuestionSummary choice(Subscribe subscribe, LocalDate today) {
Random rand = new Random();
Random rand = new SecureRandom();
List<QuestionSummary> questions = questionQueryService.queryAllByCategory(subscribe.getCategory().name());
int index = rand.nextInt(questions.size());

Expand Down

0 comments on commit d585512

Please sign in to comment.