Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
bgColor#FFCCCC
public void updateNode(int id, int newValue){		
  Node current = root;
  while(current != null){
    if(current.getId() == id){
      current.setValue(newValue);
      break;
    }
    current = current.next;
  }
}

...