@Test public void invalidCharacters() throws Exception { assertThat(Cookie.parse("a\u0000b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0000d")).isNull(); assertThat(Cookie.parse("a\u0001b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0001d")).isNull(); assertThat(Cookie.parse("a\u0009b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0009d")).isNull(); assertThat(Cookie.parse("a\u001fb=cd")).isNull(); assertThat(Cookie.parse("ab=c\u001fd")).isNull(); assertThat(Cookie.parse("a\u007fb=cd")).isNull(); assertThat(Cookie.parse("ab=c\u007fd")).isNull(); assertThat(Cookie.parse("a\u0080b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0080d")).isNull(); assertThat(Cookie.parse("a\u00ffb=cd")).isNull(); assertThat(Cookie.parse("ab=c\u00ffd")).isNull(); }
public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); String getName(); String getValue(); boolean getPersistent(); long getExpiresAt(); boolean getHostOnly(); String getDomain(); String getPath(); boolean getHttpOnly(); boolean getSecure(); static List<Cookie> parseAll(List<String> cookieStrings); static Cookie parse(String setCookie); @Override String toString(); boolean similarTo(Cookie other); @Override boolean equals(Object other); @Override int hashCode(); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); String getName(); String getValue(); boolean getPersistent(); long getExpiresAt(); boolean getHostOnly(); String getDomain(); String getPath(); boolean getHttpOnly(); boolean getSecure(); static List<Cookie> parseAll(List<String> cookieStrings); static Cookie parse(String setCookie); @Override String toString(); boolean similarTo(Cookie other); @Override boolean equals(Object other); @Override int hashCode();  }