Skip to content

Conversation

@eedwards0
Copy link
Contributor

Jira ticket: ASM-881

Brief description of the change(s)

Mini PR to cover changes to:
CategoryTemplate and related classes
ExternalNotificationEmailModel and related classes

Working example

Successful EFS submission in local environment

EFS Completed journey

Test notes

Regression test

Checklist

  • Adhered to the coding style guidelines.
    - [ ] Added/updated logging appropriately.
  • Written tests.
  • Tested the new code in my local environment.
    - [ ] Updated Docker/ECS configs.
    - [ ] Added all new properties to chs-configs.`
  • Updated release notes - TODO

Strikethrough (~~like this~~) anything not applicable to your changes.

@eedwards0 eedwards0 requested a review from a team as a code owner December 3, 2025 18:39
@ch-code-analysis
Copy link

CI: Security warnings found!

@eedwards0 eedwards0 requested a review from Copilot December 3, 2025 19:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR converts CategoryTemplate and ExternalNotificationEmailModel from traditional Java classes to Java records, simplifying the codebase by leveraging record's automatic generation of constructors, getters, equals, hashCode, and toString methods.

Key changes:

  • Converted CategoryTemplate and ExternalNotificationEmailModel to records with compact constructors for validation
  • Updated all references from getter methods (e.g., getSubmission()) to record accessor methods (e.g., submission())
  • Added comprehensive javadoc documentation to mapper and service classes

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
CategoryTemplate.java Converted to record with compact constructor ensuring guidanceTexts is never null
ExternalNotificationEmailModel.java Converted to record with documentation
CategoryTemplateMapper.java Updated method calls to use record accessors and added javadoc
CategoryTemplateServiceImpl.java Updated to use record accessor methods and marked fields as final
EmailServiceImpl.java Updated to use record accessor methods and added comprehensive javadoc
ExternalNotificationEmailMapper.java Updated to use record accessors, marked fields as final, and added javadoc
CategoryTemplateMapperTest.java Simplified test helper methods to use single-line record instantiation
CategoryTemplateTest.java Replaced EqualsVerifier test with manual record behavior verification
CategoryTemplateServiceImplTest.java Updated mock expectations to use record accessor methods
EmailServiceImplTest.java Updated mock expectations and verifications to use record accessor methods
ExternalNotificationEmailMapperTest.java Updated mock expectations to use record accessor methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ch-code-analysis
Copy link

CI: Security warnings found!

1 similar comment
@ch-code-analysis
Copy link

CI: Security warnings found!

@ch-code-analysis
Copy link

CI: Security warnings found!

@hepsimo hepsimo self-requested a review December 5, 2025 09:32
Copy link
Contributor

@hepsimo hepsimo left a comment

Choose a reason for hiding this comment

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

Changes look good. Just one small improvement comment

@ch-code-analysis
Copy link

CI: Security warnings found!

@eedwards0 eedwards0 requested a review from hepsimo December 5, 2025 14:43
@chsonarqubeprchecks
Copy link

@ch-code-analysis
Copy link

CI: Security warnings found!

Copy link
Contributor

@hepsimo hepsimo left a comment

Choose a reason for hiding this comment

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

Changes look good

@eedwards0 eedwards0 merged commit b8d9197 into master Dec 10, 2025
2 checks passed
@eedwards0 eedwards0 deleted the feature/sonar-fixes-and-use-java-records-1 branch December 10, 2025 11:02
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.

4 participants