Statement unnecessarily nested within else clause.
This commit is contained in:
parent
4aa07e6c51
commit
54a2fb2662
|
@ -284,14 +284,13 @@ public final class DefaultHostnameVerifier implements HostnameVerifier {
|
||||||
static HostNameType determineHostFormat(final String host) {
|
static HostNameType determineHostFormat(final String host) {
|
||||||
if (InetAddressUtils.isIPv4Address(host)) {
|
if (InetAddressUtils.isIPv4Address(host)) {
|
||||||
return HostNameType.IPv4;
|
return HostNameType.IPv4;
|
||||||
} else {
|
}
|
||||||
String s = host;
|
String s = host;
|
||||||
if (s.startsWith("[") && s.endsWith("]")) {
|
if (s.startsWith("[") && s.endsWith("]")) {
|
||||||
s = host.substring(1, host.length() - 1);
|
s = host.substring(1, host.length() - 1);
|
||||||
}
|
}
|
||||||
if (InetAddressUtils.isIPv6Address(s)) {
|
if (InetAddressUtils.isIPv6Address(s)) {
|
||||||
return HostNameType.IPv6;
|
return HostNameType.IPv6;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return HostNameType.DNS;
|
return HostNameType.DNS;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +302,7 @@ public final class DefaultHostnameVerifier implements HostnameVerifier {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
final List<SubjectName> result = new ArrayList<SubjectName>();
|
final List<SubjectName> result = new ArrayList<SubjectName>();
|
||||||
for (final List<?> entry: entries) {
|
for (final List<?> entry : entries) {
|
||||||
final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null;
|
final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null;
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
final String s = (String) entry.get(1);
|
final String s = (String) entry.get(1);
|
||||||
|
|
Loading…
Reference in New Issue