Skip to content

Commit 4a917c8

Browse files
committed
Deprecate Cookie factory that takes an expires, close AsyncHttpClient#935
1 parent d8ae586 commit 4a917c8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/main/java/com/ning/http/client/cookie/Cookie.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@
1414

1515
public class Cookie {
1616

17-
public static Cookie newValidCookie(String name, String value, boolean wrap, String domain, String path, long expires, int maxAge, boolean secure, boolean httpOnly) {
17+
/**
18+
* @param expires parameter will be ignored.
19+
* Use the other factory that don't take an expires.
20+
*
21+
* @deprecated
22+
*/
23+
@Deprecated
24+
public static Cookie newValidCookie(String name, String value, boolean wrap, String domain, String path, int expires, long maxAge, boolean secure, boolean httpOnly) {
25+
return newValidCookie(name, value, wrap, domain, path, maxAge, secure, httpOnly);
26+
}
27+
28+
public static Cookie newValidCookie(String name, String value, boolean wrap, String domain, String path, long maxAge, boolean secure, boolean httpOnly) {
1829

1930
if (name == null) {
2031
throw new NullPointerException("name");

0 commit comments

Comments
 (0)