Skip to content

Conversation

@chominju02
Copy link
Contributor

@chominju02 chominju02 commented Jul 27, 2025

✨ 구현한 기능

📢 논의하고 싶은 내용

🎸 기타

Summary by CodeRabbit

  • New Features

    • Enhanced user authorization and access control for exam applications and tickets.
    • Added support for soft deletion of applications and related entities.
    • Improved error messages for user access and exam ticket availability.
  • Improvements

    • Refined discount calculations and exam application deletion logic.
    • Updated database initialization with new data and simplified logic.
    • Added logging for key operations and discount calculations.
  • Bug Fixes

    • Corrected exam ticket availability checks and improved error handling for invalid input.
  • Other Changes

    • Updated method and field names for consistency.
    • Removed unused classes and cleaned up commented code.
    • Adjusted database and logging configurations.

@chominju02 chominju02 self-assigned this Jul 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces user-level access control, soft deletion, and enhanced validation across application, exam application, and payment domains. It adds user IDs to key entities, refines repository queries for ownership and deletion status, and adjusts controller/service signatures to enforce user context. Database initialization, error codes, and entity inheritance are also refactored for improved consistency and maintainability.

Changes

Cohort / File(s) Change Summary
Application Layer: Context, Service, DTOs, Processors, Validator - Removed payment status filtering in ApplicationContext.
- Updated validator method names to camelCase.
- Added userId to RegisterApplicationCommand and its factory method.
- Adjusted RegisterApplicationStepProcessor to propagate userId.
- Fixed method calls and command construction in ApplicationService.
- Added logging in GetApplicationsStepProcessor.
Exam Application Domain: Entity, Repository, Projections, Service, Controller, DTO - Added userId to ExamApplicationJpaEntity, constructor, and factory.
- Updated repository queries to filter by userId and deleted.
- Added soft delete methods.
- Added examDate to ExamTicketInfoProjection.
- Enhanced ExamApplicationService with user validation, soft deletion, and ticket date checks.
- Updated controller to require userId and handle errors.
- Modified UpdateSubjectRequest to use Subject.getSubject().
Payment Domain: Entity, Repository, Mapper, Service, DTO - Added applicationId to PaymentJpaEntity, constructor, and factory.
- Updated PaymentMapper and ConfirmTossPaymentResponse to propagate applicationId.
- Removed obsolete repository method.
- Updated PaymentService to pass applicationId in entity creation.
Exam Domain: Repository - Reactivated findByArea.
- Added findExamInfo projection query.
- Updated imports.
Exam Subject Domain: Entity, Repository - ExamSubjectJpaEntity now extends BaseDeleteEntity.
- Added getSubjectName().
- Repository methods now use soft/hard delete with native queries and payment status checks.
Soft Delete & Entity Inheritance: Base Entities, File Entities, Banner - Introduced BaseDeleteEntity and updated inheritance for File and ExamSubjectJpaEntity.
- Added deleted field to BaseTimeEntity.
- Added @SoftDelete to ApplicationJpaEntity and BannerJpaEntity.
- BannerJpaEntity now extends FileWithTime.
- Introduced new FileWithTime mapped superclass.
Application Domain: Repository - Custom query for findAllByUserId to join payments and filter by deleted.
- Added deleteWithExamTicketById for soft deletion.
Exam Ticket Image Entity - Removed @SoftDelete annotation.
Refund Domain: Entity - Annotated refundStatus with @Enumerated(EnumType.STRING).
Error Handling - Added new error codes for user access, exam ticket availability, and application ID type.
Database Initialization - Refactored and simplified logic, updated test data, and improved structure and naming.
Configuration - Changed Hibernate ddl-auto to create-drop.
- Set root logging level.
- Disabled Flyway in test config.
Exam Presentation Layer: DTOs - Added commented-out conversion methods in ExamResponse.
- Deleted LunchInfo record.
Application Presentation Layer: DTOs - Deleted empty ExamWithSubjects class.
Auth Controller - Replaced temporaryCookie with createCookie for setting cookies.
Miscellaneous - Minor formatting, logging, and comment removals.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Controller
    participant Service
    participant Repository
    participant Entity

    User->>Controller: Request (e.g., updateSubjects, getExamTicket)
    Controller->>Service: Pass userId, examApplicationId, etc.
    Service->>Repository: Validate user ownership (userId, examApplicationId)
    alt Valid User
        Service->>Repository: Perform operation (update, delete, fetch)
        Repository->>Entity: Soft delete or fetch entity with userId filter
        Entity-->>Repository: Entity instance(s)
        Repository-->>Service: Result
        Service-->>Controller: Success/response
        Controller-->>User: API Response
    else Invalid User
        Service-->>Controller: Throw USER_NOT_ACCESS_FORBIDDEN
        Controller-->>User: Error Response
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • wlgns12370
  • jbh010204
  • polyglot-k

Poem

In fields of code where rabbits leap,
We burrowed deep for user keep.
Soft deletes now gently hide,
Ownership checks stand side by side.
With every hop and every test,
This patch ensures our code is blessed!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c40c33 and 90dddbb.

📒 Files selected for processing (40)
  • src/main/java/life/mosu/mosuserver/application/application/ApplicationContext.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/application/application/ApplicationService.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/application/application/dto/RegisterApplicationCommand.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/application/application/processor/GetApplicationsStepProcessor.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/application/application/processor/RegisterApplicationStepProcessor.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/application/application/vaildator/ApplicationValidator.java (3 hunks)
  • src/main/java/life/mosu/mosuserver/application/examapplication/ExamApplicationService.java (7 hunks)
  • src/main/java/life/mosu/mosuserver/application/examapplication/dto/RegisterExamApplicationEvent.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/application/payment/PaymentService.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/domain/application/ApplicationJpaEntity.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/application/ApplicationJpaRepository.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/domain/application/ExamTicketImageJpaEntity.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/domain/banner/BannerJpaEntity.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/base/BaseDeleteEntity.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/base/BaseTimeEntity.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/exam/ExamJpaRepository.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/domain/examapplication/ExamApplicationJpaEntity.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/domain/examapplication/ExamApplicationJpaRepository.java (4 hunks)
  • src/main/java/life/mosu/mosuserver/domain/examapplication/ExamSubjectJpaEntity.java (3 hunks)
  • src/main/java/life/mosu/mosuserver/domain/examapplication/ExamSubjectJpaRepository.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/examapplication/projection/ExamTicketInfoProjection.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/file/File.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/file/FileWithTime.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/payment/PaymentJpaEntity.java (4 hunks)
  • src/main/java/life/mosu/mosuserver/domain/payment/PaymentJpaRepository.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/domain/payment/service/PaymentMapper.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/domain/refund/RefundJpaEntity.java (3 hunks)
  • src/main/java/life/mosu/mosuserver/global/exception/ErrorCode.java (3 hunks)
  • src/main/java/life/mosu/mosuserver/global/initializer/DatabaseInitializer.java (4 hunks)
  • src/main/java/life/mosu/mosuserver/infra/payment/dto/ConfirmTossPaymentResponse.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/infra/persistence/jpa/ExamApplicationBulkRepository.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/application/ApplicationController.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/application/dto/ExamWithSubjects.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/auth/AuthController.java (1 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/exam/dto/ExamResponse.java (2 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/exam/dto/LunchInfo.java (0 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/examapplication/ExamApplicationController.java (4 hunks)
  • src/main/java/life/mosu/mosuserver/presentation/examapplication/dto/UpdateSubjectRequest.java (1 hunks)
  • src/main/resources/application.yml (2 hunks)
  • src/test/resources/application.yml (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/mosu-147

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@chominju02 chominju02 changed the title MOSU-147 refacor: 신청 response 및 로직 수정, 엔티티 필드 추가 MOSU-147 refactor: 신청 response 및 로직 수정, 엔티티 필드 추가 Jul 27, 2025
Copy link

@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.

Summary of Changes

Hello @chominju02, 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!

This pull request introduces significant refactoring to the application and exam application modules, focusing on implementing soft deletion for core entities, enhancing data relationships between applications and payments, and strengthening access control and validation. It also refines several business logic aspects, such as discount calculations and subject updates, while cleaning up the codebase for better maintainability.

Highlights

  • Soft Deletion Implementation: Introduced a comprehensive soft deletion mechanism across key entities. ApplicationJpaEntity, ExamApplicationJpaEntity, and ExamSubjectJpaEntity now include a deleted flag, inheriting from new BaseDeleteEntity or an updated BaseTimeEntity. This changes how records are 'deleted' in the database, marking them as inactive rather than physically removing them. Corresponding repository methods have been updated to perform soft deletes (e.g., updateDeleteById, deleteWithExamTicketById).
  • Enhanced Application and Payment Logic: Refactored the application and payment flow to better link payments with the overall application. The PaymentJpaEntity now includes an applicationId field, and the userId is consistently passed through the application registration and retrieval processes. This ensures more accurate tracking and user-specific data access.
  • Improved Access Control and Validation: Implemented stricter access control for retrieving application details and exam tickets. New validation checks ensure that users can only access their own application resources and that exam tickets are only viewable within a specific timeframe (3 days before the exam date). New error codes (USER_NOT_ACCESS_FORBIDDEN, EXAM_TICKET_NOT_OPEN, EXAM_RESOURCE_ACCESS_DENIED) have been added to support these validations.
  • Refinement of Business Rules: Adjusted the logic for calculating discounts to correctly account for lunch prices. The process for updating exam subjects has also been modified: existing subjects are now hard-deleted before new ones are saved if the payment status is 'DONE'. This reflects a specific business decision for subject modification.
  • Codebase Refactoring and Cleanup: Performed general code cleanup, including renaming validator methods to follow camelCase conventions, removing unused DTOs (ExamWithSubjects.java, LunchInfo.java), and updating the database initializer to align with the new entity fields and pricing logic. Logging has also been enhanced in critical service methods.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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

@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 introduces a significant and valuable refactoring of the application logic, entity design, and test data initialization. The changes, such as adding userId for better tracking and implementing soft deletes, are positive steps forward.

I've identified a few issues that should be addressed. The most critical is an inconsistent implementation of soft deletes across different base entities, which could compromise data integrity. I've also pointed out an unused userId parameter in a repository query, which is a security concern. Other comments focus on improving maintainability by removing magic numbers, avoiding duplicated logic, and cleaning up the code. Addressing these points will further enhance the quality of the codebase.

Comment on lines +26 to +27
@Column(name = "is_deleted", nullable = false)
private Boolean deleted = false;

Choose a reason for hiding this comment

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

critical

There's an inconsistent implementation of soft deletion. This BaseTimeEntity defines a deleted field mapped to the is_deleted column. Concurrently, a new BaseDeleteEntity is introduced with a deleted field mapped to a deleted column. This discrepancy in column names and having two base classes for soft deletion can lead to confusion and bugs.

To ensure consistency, I recommend consolidating the soft-delete logic into a single base class (e.g., BaseDeleteEntity) with a standardized column name. Other base entities, like BaseTimeEntity, can then extend it if they require both timestamping and soft-delete capabilities.

Comment on lines +45 to +46
Optional<ExamApplicationInfoProjection> findExamApplicationInfoById(Long userId,
Long examApplicationId);

Choose a reason for hiding this comment

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

high

The userId parameter in this method signature is not utilized within the associated JPQL query. While the service layer might be handling authorization, it's a security best practice to filter by user at the database level. This prevents potential data leaks and improves query performance by fetching only necessary data. Please add AND ea.userId = :userId to the WHERE clause.

Comment on lines +145 to +146
lunchCount > 0 ? totalAmount - (9000 * lunchCount)
: totalAmount);

Choose a reason for hiding this comment

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

medium

Using the magic number 9000 for the lunch price makes the code harder to maintain and prone to inconsistencies. This value should be externalized to a constant, perhaps in a configuration file or a shared constants class, to be used across the application. The DatabaseInitializer already defines a LUNCH_PRICE constant, and a similar approach should be adopted here.

                lunchCount > 0 ? totalAmount - (LUNCH_PRICE * lunchCount)
                        : totalAmount;


private void validateExamTicketOpenDate(LocalDate examDate, String examNumber) {

LocalDateTime openDateTime = examDate.minusDays(3).atTime(8, 0);

Choose a reason for hiding this comment

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

medium

The values 3, 8, and 0 are used to define the exam ticket open date logic. These magic numbers make the code less readable. It would be better to extract them into named constants to clarify their purpose (e.g., EXAM_TICKET_OPEN_DAYS_BEFORE, EXAM_TICKET_OPEN_HOUR).

        LocalDateTime openDateTime = examDate.minusDays(EXAM_TICKET_OPEN_DAYS_BEFORE).atTime(EXAM_TICKET_OPEN_HOUR, 0);

private void validateExamTicketOpenDate(LocalDate examDate, String examNumber) {

LocalDateTime openDateTime = examDate.minusDays(3).atTime(8, 0);
LocalDateTime now = LocalDateTime.now();

Choose a reason for hiding this comment

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

medium

Using LocalDateTime.now() directly makes this method dependent on the system clock, which makes it difficult to test reliably. To improve testability, consider injecting a java.time.Clock instance and using LocalDateTime.now(clock). This allows you to control time within your tests.

        LocalDateTime now = LocalDateTime.now(clock); // Assuming a Clock instance is injected

Comment on lines +25 to +33
@Modifying
@Query(value = """
DELETE es
FROM exam_subject es
JOIN payment p ON es.exam_application_id = p.exam_application_id
WHERE p.status = 'DONE'
AND p.exam_application_id = :examApplicationId
""", nativeQuery = true)
void deleteExamSubjectsWithDonePayment(@Param("examApplicationId") Long examApplicationId);

Choose a reason for hiding this comment

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

medium

This repository employs inconsistent deletion strategies. The deleteByExamApplicationId method performs a soft delete (UPDATE), whereas deleteExamSubjectsWithDonePayment performs a hard delete (DELETE). This can be confusing and may lead to unexpected behavior.

If the hard delete is intentional (e.g., for a "delete and re-insert" pattern when updating subjects), please add a comment to clarify the reasoning. Otherwise, I recommend using a consistent soft-delete approach for all deletion operations on this entity.

Comment on lines +215 to +220
int baseTotal = switch (applyCount) {
case 1 -> 49_000;
case 2 -> 89_000;
case 3 -> 129_000;
default -> applyCount * BASE_EXAM_FEE;
};

Choose a reason for hiding this comment

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

medium

The switch statement for calculating baseTotal duplicates the pricing logic already present in FixedQuantityDiscountCalculator. To avoid code duplication and ensure that the test data generation stays in sync with the application logic, please use FixedQuantityDiscountCalculator to determine the price here.

Comment on lines +59 to +66
log.info(
"Saving ExamApplication - applicationId: {}, userId: {}, examId: {}, isLunchChecked: {}, examNumber: {}",
e.getApplicationId(),
e.getUserId(),
e.getExamId(),
e.getIsLunchChecked(),
e.getExamNumber()
);

Choose a reason for hiding this comment

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

medium

This log.info statement is inside a loop that performs a bulk operation. This can generate a large volume of logs, potentially impacting performance and making logs difficult to read. For such detailed, high-frequency logging, it's better to use the DEBUG level.

Suggested change
log.info(
"Saving ExamApplication - applicationId: {}, userId: {}, examId: {}, isLunchChecked: {}, examNumber: {}",
e.getApplicationId(),
e.getUserId(),
e.getExamId(),
e.getIsLunchChecked(),
e.getExamNumber()
);
log.debug(
"Saving ExamApplication - applicationId: {}, userId: {}, examId: {}, isLunchChecked: {}, examNumber: {}",
e.getApplicationId(),
e.getUserId(),
e.getExamId(),
e.getIsLunchChecked(),
e.getExamNumber()
);

Comment on lines +36 to 65
//
// public static List<ExamResponse> fromList(List<ExamJpaEntity> foundExams) {
// return foundExams.stream()
// .map(ExamResponse::from)
// .toList();
// }

// public static ExamResponse from(ExamWithLunchProjection exam) {
// AddressResponse address = AddressResponse.from(exam.address());
// List<LunchInfo> lunchInfos = lunches.stream().map(
// lunch -> LunchInfo.of(lunch.getName(), lunch.getPrice())
// ).toList();
// return new ExamResponse(
// exam.examId(),
// exam.schoolName(),
// address,
// exam.area(),
// exam.capacity(),
// exam.deadLineTime(),
// exam.examDate()
// e
// );
// }

// public static List<ExamResponse> fromList(List<ExamJpaEntity> foundExams) {
// return foundExams.stream()
// .map(ExamResponse::from)
// .toList();
// }
}

Choose a reason for hiding this comment

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

medium

This file contains a large block of commented-out code. To maintain a clean and readable codebase, please remove this code before merging.

Comment on lines +39 to +41
if (applicationId == null) {
throw new CustomRuntimeException(ErrorCode.WRONG_APPLICATION_ID_TYPE);
}

Choose a reason for hiding this comment

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

medium

The manual null check for applicationId is redundant. Since @RequestParam is used without required = false, Spring will automatically handle the case where the parameter is missing by returning a 400 Bad Request response. This check can be safely removed.

@chominju02 chominju02 merged commit 18a4b67 into develop Jul 27, 2025
1 of 2 checks passed
@chominju02 chominju02 deleted the refactor/mosu-147 branch July 27, 2025 19:17
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.

1 participant