if (System.currentTimeMillis() - lastPingTime > pingInterval &&
if (pingInterval > 0 && (System.currentTimeMillis() - lastPingTime) > pingInterval &&
    public boolean isValid() {        if (invalid) {            return false;        }        if (System.currentTimeMillis() - lastPingTime > pingInterval &&            pingStatement != null) {            return ping();        } else {            return true;        }    }