Commit 84957ad0 authored by guus's avatar guus

Fixes NPE (OF-79)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11387 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1be1625a
......@@ -199,6 +199,10 @@ public class DNSUtil {
Attributes dnsLookup =
context.getAttributes(lookup, new String[]{"SRV"});
Attribute srvRecords = dnsLookup.get("SRV");
if (srvRecords == null) {
logger.debug("No SRV record found for domain: " + lookup);
return new ArrayList<HostAddress>();
}
HostAddress[] hosts = new WeightedHostAddress[srvRecords.size()];
for (int i = 0; i < srvRecords.size(); i++) {
hosts[i] = new WeightedHostAddress(((String)srvRecords.get(i)).split(" "));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment