code: @Sensitive
      public static String getCookieValue(Cookie[] cookies, String cookieName) {
          if (cookies == null) {
              return null;
          }
  
          String retVal = null;
          for (int i = 0; i < cookies.length; ++i) {
              if (cookieName.equalsIgnoreCase(cookies[i].getName())) {
                  retVal = cookies[i].getValue();
                  break;
              }
          }
  
          return retVal;
      }
docs: Retrieve the value of the first instance of the specified Cookie name
  from the array of Cookies. Note name matching ignores case.
  
  @param cookies array of Cookie objects, may be {@code null}.
  @param cookieName the name of the cookie
  @return String value associated with the specified cookieName, {@code null} if no match could not be found.