java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

fix: Refactor Layered Architecture pattern #2936

Open romannimets opened this issue 1 month ago • 2 comments

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.

romannimets avatar May 05 '24 18:05 romannimets