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

Refactor ClinicServiceImpl #143

Merged

Conversation

thisdudkin
Copy link
Contributor

@thisdudkin thisdudkin commented Aug 18, 2024

Summary

This PR makes all fields in the ClinicServiceImpl class final to ensure they are immutable after initialization. It also removes some redundant imports.

Changes

  • Made fields in ClinicServiceImpl final.

  • Updated the constructor to initialize these fields.

  • Removed unnecessary imports.

  • UPD: added private helper method to extract common entity retrieval logic

}

@Override
Copy link
Member

Choose a reason for hiding this comment

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

thought: it seems, there are a lot of reformatting for converting tab to spaces according to the .editorconfig

@thisdudkin
Copy link
Contributor Author

I've added commit for Issue #144 there, @arey

@thisdudkin thisdudkin changed the title Refactor ClinicServiceImpl to use final fields Refactor ClinicServiceImpl Aug 19, 2024
@arey arey merged commit a745565 into spring-petclinic:master Aug 20, 2024
1 check passed
@arey
Copy link
Member

arey commented Aug 20, 2024

Thanks a lot Alexander :D

@thisdudkin thisdudkin deleted the refactor/clinic-service-final-fields branch August 25, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants