Skip to content

Refactor Prototype pattern (Closes #584) #1970

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

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

yonatankarp
Copy link
Contributor

This PR refactors the Prototype pattern by making it Cloneable and thus inheriting the clone() method to its subclasses which removes code duplications.

@yonatankarp yonatankarp force-pushed the update_prototype_pattern branch from 67bb828 to cf41a94 Compare March 2, 2022 07:08
@yonatankarp yonatankarp force-pushed the update_prototype_pattern branch 2 times, most recently from 8434428 to 700b2be Compare April 20, 2022 08:41
@@ -1,2 +1,2 @@
lombok.log.fieldName = LOGGER

lombok.addLombokGeneratedAnnotation = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exclude Lombok auto-generated code from code-coverage

@yonatankarp yonatankarp force-pushed the update_prototype_pattern branch from 700b2be to 0a73b52 Compare April 20, 2022 09:57
…watar#584)

This commit  refactors the Prototype pattern by making it Cloneable and thus inheriting the clone() method to its subclasses which removes code duplications.
@yonatankarp yonatankarp force-pushed the update_prototype_pattern branch from 0a73b52 to eae3a3a Compare April 20, 2022 12:05
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

75.0% 75.0% Coverage
0.0% 0.0% Duplication

@iluwatar
Copy link
Owner

iluwatar commented Sep 8, 2022

This is a good refactoring that reduces the amount of boilerplate code. The code coverage is on a good level (75% on new code) even though Sonar is complaining.

@iluwatar iluwatar merged commit 5397f85 into iluwatar:master Sep 8, 2022
@iluwatar
Copy link
Owner

iluwatar commented Sep 8, 2022

Thank you for the prototype pattern refactoring! 🎉

@all-contributors please add @yonatankarp for code

@allcontributors
Copy link
Contributor

@iluwatar

I've put up a pull request to add @yonatankarp! 🎉

@iluwatar iluwatar added this to the 1.26.0 milestone Sep 8, 2022
@yonatankarp yonatankarp deleted the update_prototype_pattern branch September 9, 2022 04: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.

Prototype pattern re-factor
2 participants