code: private <T extends Comparable<T>>
          void getInternal2(List<HttpCookie> cookies, Map<T, List<HttpCookie>> cookieIndex,
                            T comparator)
      {
          // Removed cookieJar
          for (T index : cookieIndex.keySet()) {
              if ((index == comparator) || (index != null && comparator.compareTo(index) == 0)) {
                  List<HttpCookie> indexedCookies = cookieIndex.get(index);
                  // check the list of cookies associated with this domain
                  if (indexedCookies != null) {
                      Iterator<HttpCookie> it = indexedCookies.iterator();
                      while (it.hasNext()) {
                          HttpCookie ck = it.next();
                          // the cookie still in main cookie store
                          if (!ck.hasExpired()) {
                              // don't add twice
                              if (!cookies.contains(ck))
                                  cookies.add(ck);
                          } else {
                              it.remove();
                          }
                      }
                  } // end of indexedCookies != null
              } // end of comparator.compareTo(index) == 0
          } // end of cookieIndex iteration
      }
docs: a cookie in index should be returned