Update StringMan.java

This commit is contained in:
Alexander Söderberg 2018-12-27 01:31:48 +01:00 committed by GitHub
parent fba7eac6d8
commit 75bcd1adec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,8 +240,10 @@ public class StringMan {
}
public static boolean isEqual(String a, String b) {
return a.equals(b) || b != null && a.length() == b.length() && a.hashCode() == b.hashCode()
&& a.equals(b);
return (a == b) || ((a != null) && (b != null) && (a.length() == b.length()) &&
(a.hashCode() == b.hashCode()) && a.equals(b));
// return a.equals(b) || b != null && a.length() == b.length() && a.hashCode() == b.hashCode()
// && a.equals(b);
}
public static boolean isEqualIgnoreCase(String a, String b) {