List<JBCefCookie> (@Nullable String url, @Nullable Boolean includeHttpOnly, @Nullable Integer maxTimeToWait) { boolean httpOnly = notNull(includeHttpOnly, Boolean.FALSE); JBCookieVisitor cookieVisitor = new JBCookieVisitor(); boolean result; if (url != null) { result = myCefCookieManager.visitUrlCookies(url, httpOnly, cookieVisitor); } else { result = myCefCookieManager.visitAllCookies(cookieVisitor); } if (!result) { LOG.debug("Cookies cannot be accessed"); return Collections.emptyList(); } return cookieVisitor.get(notNull(maxTimeToWait, DEFAULT_TIMEOUT_MS)); }