@Override
public boolean hasItems() {
- for (Host h : hosts) {
+ if(hosts!=null) {
+ for (Host h : hosts) {
if (h.status==Status.OK) {
return true;
}
+ }
}
return false;
}
*
*/
public interface DNSLookup {
- InetAddress[] getAllByName(String host) throws UnknownHostException;
- public static final DNSLookup dflt = new DNSLookup() {
- public InetAddress[] getAllByName(String host) throws UnknownHostException {
- return InetAddress.getAllByName(host);
- }
+ InetAddress[] getAllByName(String host) throws UnknownHostException;
+ public static final DNSLookup dflt = new DNSLookup() {
+ public InetAddress[] getAllByName(String host) throws UnknownHostException {
+ return InetAddress.getAllByName(host);
+ }
};
}