java-design-patterns
java-design-patterns copied to clipboard
Refactor Layered Architecture pattern
A couple of specific refactorings are needed for Layered Architecture code example.
- Runner.java has no main entry point and can't be executed in the IDE. Let's add this.
- 3 Warnings: Optional<Long> used as type for field id. This is related to classes CakeInfo, CakeLayerInfo, and CakeToppingInfo.
Optional is primarily intended for use as a method return type where there is a clear need to represent "no result," and where using null is likely to cause errors.
Acceptance criteria
- Refactorings implemented