if (certs != null && (cs.certs == null || !certs.containsAll(cs.certs))) { return false; }
if (certs != null && (cs.certs == null || ! certs.containsAll(cs.certs))) return false;
    public boolean implies(CodeSource cs) {        if (cs == null) return false;        // First check the certificate list.        if (certs != null && (cs.certs == null || !certs.containsAll(cs.certs))) { return false; }        // Next check the location.        if (location == null) { return true; }        if (cs.location == null) { return false; }        if (!location.getProtocol().equals(cs.location.getProtocol())) { return false; }        final int ourPort = location.getPort();        if ((ourPort != -1) && (ourPort != cs.location.getPort())) { return false; }        final String ourRef = location.getRef();        if ((ourRef != null) && !ourRef.equals(cs.location.getRef())) { return false; }        final String ourHost = location.getHost();        if (ourHost != null) {            final String their_host = cs.location.getHost();            if (their_host == null) { return false; }            final SocketPermission our_sockperm = new SocketPermission(ourHost,                    "accept");            final SocketPermission their_sockperm = new SocketPermission(                    their_host, "accept");            if (!our_sockperm.implies(their_sockperm)) { return false; }        }        String our_file = location.getFile();        if (our_file != null) {            if (!our_file.endsWith("/")) {                our_file += "/";            }            final String their_file = cs.location.getFile();            if (their_file == null || !their_file.startsWith(our_file))                    return false;        }        return true;    }