All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.pmd.rules.pmd.MisplacedNullCheck.html Maven / Gradle / Ivy

Go to download

PMD is a tool that looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions or duplicate code.

There is a newer version: 2.4
Show newest version
The null check here is misplaced. if the variable is null you'll get a NullPointerException. 
      Either the check is useless (the variable will never be null) or it's incorrect.
      
Example :
if (object1!=null && object2.equals(object1)) { 
  ...
}      
      




© 2015 - 2025 Weber Informatics LLC | Privacy Policy