...
As shown in this example, noncompliant methods can silently corrupt the state of the object if they fail to return a value that the developer can intuitively interpret.:
Code Block | ||
---|---|---|
| ||
public void updateNode(int id, int newValue){ Node current = root; while(current != null){ if(current.getId() == id){ current.setValue(newValue); break; } current = current.next; } } |
...