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

Add CRTP pattern Ref: #2342 #2580

Merged
merged 15 commits into from
Oct 8, 2023
Merged

Conversation

AddeusExMachina
Copy link
Contributor

Add crtp directory containing source code and documentation for the curiously recurring template pattern

crtp/README.md Outdated
Comment on lines 1 to 4
---
title: Curiously Recurring Template Pattern
language: en
---
Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the frontmatter adding category and tag fields

*
* @param <T> MmaFighter derived class that uses itself as type parameter.
*/
@Slf4j
Copy link
Owner

Choose a reason for hiding this comment

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

Check out for what else you can use Lombok for e.g. generate constructor, toString etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced the constructor and toString() in MmaFighter with @DaTa annotation

Comment on lines +36 to +39
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
Copy link
Owner

Choose a reason for hiding this comment

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

This is the only test? I think it's not sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a new test in FightTest.java file

@sonarcloud
Copy link

sonarcloud bot commented Sep 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@iluwatar iluwatar merged commit 753587d into iluwatar:master Oct 8, 2023
1 check passed
@iluwatar
Copy link
Owner

iluwatar commented Oct 8, 2023

Looks good! Thank you for the contribution 🎉

@all-contributors please add @AddeusExMachina for code

@allcontributors
Copy link
Contributor

@iluwatar

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

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

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