result.put("whois_organization", parser.getOrganization());
result.put("whois_country_code", parser.getCountryCode());
return new WhoisIpLookupResult(result);
} catch (IOException e) {
LOG.error("Could not lookup WHOIS information for [{}] at [{}].", ip, registry.toString());
<BUG>return null;
} finally {</BUG>
if (socket != null) {
try {
socket.close();

result.put("whois_organization", parser.getOrganization());
result.put("whois_country_code", parser.getCountryCode());
return new WhoisIpLookupResult(result);
} catch (IOException e) {
LOG.error("Could not lookup WHOIS information for [{}] at [{}].", ip, registry.toString());
throw e;
} finally {
if (socket != null) {
try {
socket.close();
