code: public void add(URI uri, HttpCookie cookie) {
          // pre-condition : argument can't be null
          if (cookie == null) {
              throw new NullPointerException("cookie is null");
          }
  
          lock.lock();
          try {
              if (cookie.getMaxAge() != 0) {
                  addIndex(uriIndex, getEffectiveURI(uri), cookie);
              }
          } finally {
              lock.unlock();
          }
      }
docs: Add one cookie into cookie store.