So i have this code: Is the "if" breaking the law of demeter and if yes how could I solve it? ...
So i have this code: Is the "if" breaking the law of demeter and if yes how could I solve it? ...
so I've started using the law of Demeter recently(heard about it a month ago) and I am currently also learning react. But let's take this component ...
It's a easy question. I have there some database-framework, which gives me a few methods working with them. So now i want to extend that behavior. I ...
I'm studying for an oral exam, and I wonder if I have understood Law of Demeter correctly. In essence, I have understood that the Law of Demeter aims ...
I'm trying to understand Demeter's law. This example (taken from the book called 'Pragmatic programmer') confuses me.The task is to determine if the s ...
Is it always possible to work around the Law of Demeter simply by creating more methods? Some people mention that this is not valid (http://wiki ...
quoting from here: https://en.wikipedia.org/wiki/Law_of_Demeter More formally, the Law of Demeter for functions requires that a method m of an obj ...
I'm having some issues understanding how the Law of Demeter should be applied in some cases with Symfony's DI system. I have some factory that requir ...
I am using IntelliJ PMD plugin, and it gives me LOD violation, on the if(keys[i].equals(key)). Keys is an object in the same class within the function ...
above is a simple iterator pattern. I wonder does Client violates the principle of least knowledge. Is it inevitable to violate the principle in i ...
I don't understand what phrase direct component object means in context of Law of Demeter's article. As I can see the term was taken from David Block' ...
while I was reviewing some code, I came across this snippet. The call of method user.getAddress() returns an Optional<Address>. Following the ...
Assuming the following code: requiredIssue.get().isDone() where requiredIssue is an Optional and it has been verified that requiredIssue.isPresent() ...
If I have a class C containing a method f that takes as argument an object of type D (another class I defined) If I call the methods of the object D ...
a very simple point: and a circle of course it breaks the Demeter's law. So let me refractor it: apart from it looks better, I dont see any a ...
Am I breaking the “Law of Demeter”? For example i create a Class person which contains name, phone and id and it match the column in my database. When ...
I went little fancy and wrote Selenium page-object with Java 8 streaming as mentioned in below code and got a review comment that my code is breaking ...
I have been building a RTS to improve my Java skills. I have been reading a lot about the Law of Demeter because I want to keep my code clean but I'm ...
A trivial example from the "Dependency Injection with Guice" break the "Law of Demeter." At least as PMD mean it. PMD mark the next line the warni ...
Let's suppose that I have this piece of code: From the point of view of the LoD, the first part of this function is essentially equivalent to W ...