New answers tagged


I think this is a better explanation of the Law of Demeter. Simply injecting the properties as follows doesn't violate that law as you are not reaching through OrderProps and don't need to know about it's internal structure. @Service @Builder public class OrderService { private final OrderProps props; public void doSomething() { int maxSize = props....

Top 50 recent answers are included