Why is NetBeans with TMC (IDE recommended by MOOC fi Java) telling my that my final if statement is redundant?
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null) {
return false;
}
if (this.getClass() != object.getClass()) {
return false;
}
LicensePlate compared = (LicensePlate) object;
if (!this.country.equals(compared.country)) {
return false;
}
if (!this.liNumber.equals(compared.liNumber)) {
return false;
}
return true;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…