
resources.report.rules.pmd.CompareObjectsWithEquals.html Maven / Gradle / Ivy
CompareObjectsWithEquals
CompareObjectsWithEquals
Use equals() to compare object references; avoid comparing them with ==.
This rule is defined by the following Java class:
net.sourceforge.pmd.rules.design.CompareObjectsWithEquals
Example:
class Foo {
boolean bar(String a, String b) {
return a == b;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy