d != null &&
    public void hourly(ServletContext context) {        for (;;) {            try {                Thread.sleep(MILLIS_PER_HOUR);                synchronized (this) {                    Date now = new Date();                    Iterator it = rateLimited.keySet().iterator();                    while (it.hasNext()) {                        String remoteIP = (String)it.next();                        Date d = (Date)rateLimited.get(remoteIP);                        if (now.getTime() - d.getTime() > MILLIS_PER_HOUR)                            it.remove();                    }                    it = nets.keySet().iterator();                    while (it.hasNext()) {                        String netName = (String)it.next();                        GnutellaNet net = (GnutellaNet)nets.get(netName);                        HashMap map = net.getHosts();                        Iterator it1 = map.keySet().iterator();                        while (it1.hasNext()) {                            String remoteIP = (String)it1.next();                            Date d = ((RemoteClient)map.get(remoteIP)).getLastUpdated();                            if (now.getTime() - d.getTime() > MAX_HOST_AGE)                                it1.remove();                        }                        int count = map.size();                        map = net.getURLs();                        it1 = map.keySet().iterator();                        while (it1.hasNext()) {                            String url = (String)it1.next();                            RemoteURL remoteURL = (RemoteURL)map.get(url);                            Date d = remoteURL.getLastUpdated();                            if (now.getTime() - d.getTime() > MAX_URL_AGE)                                it1.remove();                            else {                                d = remoteURL.getLastChecked();                                /*                                 * Re-verify good URLs occasionally.                                 */                                if (!remoteURL.getCacheVersion().startsWith(RemoteURL.STATE_FAILED) &&                                    now.getTime() - d.getTime() > MAX_URL_VALID)                                    addUrlForVerification(netName, remoteURL);                            }                        }                        count += map.size();                        if (count == 0)                            it.remove();                    }                }                writeData(context);            } catch (InterruptedException ex) {                //context.log("hourly exiting");                return;            }        }    }