File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/eatda/domain/cheer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments