Messaging: Language cleanup
No unnecessary boxing, enhanced for loops, redundant checks and throws, imports (removal, reordering), possible void returns Change-Id: I7a8e1b2007e3b0906e01b41785c518d02c2f3fab
This commit is contained in:
@@ -145,7 +145,7 @@ public final class EmailAddress {
|
||||
}
|
||||
|
||||
// check if the host contains two continuous dots.
|
||||
if (host.indexOf("..") >= 0) {
|
||||
if (host.contains("..")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public final class EmailAddress {
|
||||
}
|
||||
|
||||
// the user cannot contain two continuous dots
|
||||
if (user.indexOf("..") >= 0) {
|
||||
if (user.contains("..")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user