Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix/#177-npe-error] 게시물 업로드 과정에서 NPE 수정 #191

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
public class ValidDuplicateListValidator implements ConstraintValidator<ValidDuplicateList, List<String>> {
@Override
public boolean isValid(final List<String> stringList, final ConstraintValidatorContext constraintValidatorContext) {
if (stringList == null) return true;
final long uniqueCount = stringList.stream().distinct().count();
return uniqueCount == stringList.size();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public boolean validateTaggedMember() {
}

public List<String> getAllTaggedMember() {
List<String> temp = new ArrayList<>(taggedMemberHandleList);
List<String> temp = taggedMemberHandleList != null ?
new ArrayList<>(taggedMemberHandleList) : new ArrayList<>();
if (pinnedHandle != null) {
temp.add(pinnedHandle);
}
Expand All @@ -70,6 +71,7 @@ public List<String> getAllTaggedMember() {
public void validateMemberNotTagged(
final Member member
) {
if (taggedMemberHandleList == null) return;
if (taggedMemberHandleList.contains(member.getHandle())) {
throw new GeneralException(TAG_INVALID_MEMBER);
}
Expand Down
Loading