iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
88.22k stars 26.18k forks source link

fix: Refactored Visitor #2975 #3001

Closed Joel-Dandin closed 1 day ago

Joel-Dandin commented 6 days ago

What problem does this PR solve?

This PR refactors the VisitorTest class to address code smells related to the misuse of Optional for class fields and constructor parameters. Optional is intended for method return types to indicate "no result," and not for class fields or parameters.

Close #2975

sonarcloud[bot] commented 6 days ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

iluwatar commented 1 day ago

Looks good! Thank you for the contribution 🎉

@all-contributors please add @Joel-Dandin for code

allcontributors[bot] commented 1 day ago

@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 @Joel-Dandin! :tada: