code: public boolean remove(URI uri, HttpCookie ck) {
          // argument can't be null
          if (ck == null) {
              throw new NullPointerException("cookie is null");
          }
  
          lock.lock();
          try {
              uri = getEffectiveURI(uri);
              if (uriIndex.get(uri) == null) {
                  return false;
              } else {
                  List<HttpCookie> cookies = uriIndex.get(uri);
                  if (cookies != null) {
                      return cookies.remove(ck);
                  } else {
                      return false;
                  }
              }
          } finally {
              lock.unlock();
          }
      }
docs: Remove a cookie from store