Skip to content

[FIX] 닉네임 중복로직 해결#338

Merged
lingard1234 merged 2 commits intodevfrom
fix/337-dupnick
Feb 8, 2026
Merged

[FIX] 닉네임 중복로직 해결#338
lingard1234 merged 2 commits intodevfrom
fix/337-dupnick

Conversation

@lingard1234
Copy link
Copy Markdown
Contributor

Summary

updateMyInfo에서 nicknameValidator참조

Changes

UserService 수정

Type of Change

  • Bug fix (기존 기능에 영향을 주지 않는 버그 수정)
  • New feature (기존 기능에 영향을 주지 않는 새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 수정)
  • Refactoring (기능 변경 없는 코드 개선)
  • Documentation (문서 수정)
  • Chore (빌드, 설정 등 기타 변경)
  • Release (develop → main 배포)

Related Issues

Fixes #337

참고 사항

@lingard1234 lingard1234 self-assigned this Feb 8, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @lingard1234, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자 정보 업데이트 시 닉네임 유효성 검사 로직을 개선하는 것을 목표로 합니다. 기존에 UserService 내부에 직접 구현되어 있던 닉네임 검사 로직을 전용 NicknameValidator로 위임하여 코드의 응집도를 높이고 유지보수성을 향상시켰습니다. 이는 닉네임 관련 유효성 검사의 일관성을 보장하고 중복 코드를 줄이는 데 기여합니다.

Highlights

  • 닉네임 유효성 검사 로직 개선: UserService 내 updateMyInfo 메서드에서 닉네임 중복 확인, 형식 검사, 길이 검사 등 기존의 인라인 유효성 검사 로직이 NicknameValidator의 validateForUpdate 메서드를 참조하도록 변경되었습니다.
Changelog
  • src/main/java/com/example/RealMatch/user/application/service/UserService.java
    • updateMyInfo 메서드에서 닉네임 중복, 형식, 길이 검사 로직을 제거하고 nicknameValidator.validateForUpdate 호출로 대체했습니다.
Activity
  • 버그 수정으로 분류되었습니다.
  • 이슈 #337을 해결합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively refactors nickname validation into a dedicated NicknameValidator to enhance code reusability and maintainability. However, a critical validation bypass has been identified: while the validator trims nicknames for pattern matching, the service saves the original untrimmed value, allowing nicknames with leading or trailing spaces to violate character constraints. Additionally, I've noted a potential NullPointerException risk in NicknameValidator's null handling. It's recommended to address both the validation bypass by trimming the nickname before validation and update, and to improve null safety within the validator.

@lingard1234 lingard1234 merged commit cd81149 into dev Feb 8, 2026
1 check passed
@lingard1234 lingard1234 deleted the fix/337-dupnick branch February 8, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 닉네임 중복로직 변경

1 participant