mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Fix three Java lint errors (#6531)
* Add braces to conditions. * Remove an unnecessary semicolon. * Remove an unnecessary constructor. This fixes all the Java lint errors of these types.
This commit is contained in:
parent
3549789cdf
commit
beaf211f39
3 changed files with 7 additions and 6 deletions
|
|
@ -21,14 +21,18 @@ public class TextUtils {
|
|||
* mocks TextUtils.equals
|
||||
*/
|
||||
public static boolean equals(CharSequence a, CharSequence b) {
|
||||
if (a == b) return true;
|
||||
if (a == b) {
|
||||
return true;
|
||||
}
|
||||
int length;
|
||||
if (a != null && b != null && (length = a.length()) == b.length()) {
|
||||
if (a instanceof String && b instanceof String) {
|
||||
return a.equals(b);
|
||||
} else {
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (a.charAt(i) != b.charAt(i)) return false;
|
||||
if (a.charAt(i) != b.charAt(i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue