Using non-ASCII Unicode characters in code can be confusing, and potentially unsafe.
For example, homoglyphs can result in a different method to the one that was expected being invoked.
import static com.google.common.base.Objects.equal;
public void isAuthenticated(String password) {
// The "l" here is not what it seems.
return equaâ…¼(password, this.password());
}
// ...
private boolean equaâ…¼(String a, String b) {
return true;
}
Suppress false positives by adding the suppression annotation @SuppressWarnings("UnicodeInCode") to the enclosing element.