Skip to content

Commit 89b9552

Browse files
committed
chore(CheerTagNames): 메서드 네이밍 수정 및 누락된 키워드 추가
1 parent 4639152 commit 89b9552

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/eatda/domain/cheer/CheerTagNames.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class CheerTagNames {
99

1010
private static final int MAX_CHEER_TAGS_PER_TYPE = 2;
1111

12-
private List<CheerTagName> cheerTagNames;
12+
private final List<CheerTagName> cheerTagNames;
1313

1414
public CheerTagNames(List<CheerTagName> cheerTagNames) {
1515
validate(cheerTagNames);
@@ -20,7 +20,7 @@ private void validate(List<CheerTagName> cheerTagNames) {
2020
if (isDuplicated(cheerTagNames)) {
2121
throw new BusinessException(BusinessErrorCode.CHEER_TAGS_DUPLICATED);
2222
}
23-
if (countMaxCountByType(cheerTagNames) > MAX_CHEER_TAGS_PER_TYPE) {
23+
if (maxCountByType(cheerTagNames) > MAX_CHEER_TAGS_PER_TYPE) {
2424
throw new BusinessException(BusinessErrorCode.EXCEED_CHEER_TAGS_PER_TYPE);
2525
}
2626
}
@@ -32,7 +32,7 @@ private boolean isDuplicated(List<CheerTagName> cheerTagNames) {
3232
return distinctCount != cheerTagNames.size();
3333
}
3434

35-
private long countMaxCountByType(List<CheerTagName> cheerTagNames) {
35+
private long maxCountByType(List<CheerTagName> cheerTagNames) {
3636
return cheerTagNames.stream()
3737
.collect(Collectors.groupingBy(CheerTagName::getType, Collectors.counting()))
3838
.values()

0 commit comments

Comments
 (0)