This commit is contained in:
Looly
2019-10-29 19:05:23 +08:00
parent 3cef7fa9a7
commit bf03aebcef
107 changed files with 283 additions and 456 deletions

View File

@@ -19,7 +19,7 @@ import java.security.NoSuchAlgorithmException;
public class AndroidSupportSSLFactory extends CustomProtocolsSSLFactory {
// Android低版本不重置的话某些SSL访问就会失败
private static String[] protocols = {SSLv3, TLSv1, TLSv11, TLSv12};
private static final String[] protocols = {SSLv3, TLSv1, TLSv11, TLSv12};
public AndroidSupportSSLFactory() throws KeyManagementException, NoSuchAlgorithmException {
super(protocols);

View File

@@ -98,13 +98,8 @@ public class UserAgentInfo {
}
final UserAgentInfo other = (UserAgentInfo) obj;
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
return true;
return other.name == null;
} else return name.equals(other.name);
}
@Override