iluwatar / java-design-patterns

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

fix: Refactor Layered Architecture pattern #2936 #2938

Closed romannimets closed 2 weeks ago

romannimets commented 1 month ago

What problem does this PR solve?

Ecco un possibile testo che potresti aggiungere nella tua pull request:


What problem does this PR solve?

This PR addresses a couple of specific issues in the Layered Architecture code example (#2936):

  1. Main Entry Point for Runner.java: Runner.java lacked a main entry point, preventing it from being executed directly in an IDE. This PR adds a main method to Runner.java to resolve this issue.

  2. Warnings Regarding Optional Usage: There were warnings related to the usage of Optional as a type for the id field in the classes CakeInfo, CakeLayerInfo, and CakeToppingInfo. The use of Optional for fields is generally discouraged, as Optional is primarily intended for method return types where there is a need to represent "no result" without using null.

I'm relatively new to contributing and may have misunderstood or not fully addressed the issues. If there are any mistakes or if further changes are needed, please let me know. Apologies for any inconvenience caused.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

iluwatar commented 1 month ago

Let me know when it's ready for review

stale[bot] commented 3 weeks ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

iluwatar commented 3 weeks ago

Sorry, I have missed the notification that this PR is ready for review. If you could fix the conflicts then we are ready to merge @romannimets

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

romannimets commented 3 weeks ago

Sorry @iluwatar i may have made some mistakes during the conflict solving process 😅, i hope now everything is all right. Thaks for the patience

iluwatar commented 2 weeks ago

Looks good! Thank you for the contribution 🎉

@all-contributors please add @romannimets for code

allcontributors[bot] commented 2 weeks 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 @romannimets! :tada: