mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Update stub classes and qldoc
This commit is contained in:
@@ -125,7 +125,7 @@ public class Cookie {
|
||||
* @return the cookie name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +134,7 @@ public class Cookie {
|
||||
* @return the cookie value.
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -143,7 +143,7 @@ public class Cookie {
|
||||
* @return the cookie version.
|
||||
*/
|
||||
public int getVersion() {
|
||||
return version;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,7 +152,7 @@ public class Cookie {
|
||||
* @return the cookie domain.
|
||||
*/
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,6 +161,6 @@ public class Cookie {
|
||||
* @return the cookie path.
|
||||
*/
|
||||
public String getPath() {
|
||||
return path;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,95 +24,51 @@
|
||||
package javax.servlet.http;
|
||||
|
||||
public class Cookie implements Cloneable {
|
||||
private String name; // NAME= ... "$Name" style is reserved
|
||||
private String value; // value of NAME
|
||||
private String comment; // ;Comment=VALUE ... describes cookie's use
|
||||
private String domain; // ;Domain=VALUE ... domain that sees cookie
|
||||
private int maxAge = -1; // ;Max-Age=VALUE ... cookies auto-expire
|
||||
private String path; // ;Path=VALUE ... URLs that see the cookie
|
||||
private boolean secure; // ;Secure ... e.g. use SSL
|
||||
private int version = 0; // ;Version=1 ... means RFC 2109++ style
|
||||
private boolean isHttpOnly = false;
|
||||
|
||||
public Cookie(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
public void setComment(String purpose) {
|
||||
comment = purpose;
|
||||
}
|
||||
public String getComment() {
|
||||
return comment;
|
||||
return null;
|
||||
}
|
||||
public void setDomain(String pattern) {
|
||||
domain = pattern.toLowerCase(); // IE allegedly needs this
|
||||
}
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
return null;
|
||||
}
|
||||
public void setMaxAge(int expiry) {
|
||||
maxAge = expiry;
|
||||
}
|
||||
public int getMaxAge() {
|
||||
return maxAge;
|
||||
return -1;
|
||||
}
|
||||
public void setPath(String uri) {
|
||||
path = uri;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
return null;
|
||||
}
|
||||
public void setSecure(boolean flag) {
|
||||
secure = flag;
|
||||
}
|
||||
public boolean getSecure() {
|
||||
return secure;
|
||||
return false;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
return null;
|
||||
}
|
||||
public void setValue(String newValue) {
|
||||
value = newValue;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
return null;
|
||||
}
|
||||
public int getVersion() {
|
||||
return version;
|
||||
return -1;
|
||||
}
|
||||
public void setVersion(int v) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks or unmarks this Cookie as <i>HttpOnly</i>.
|
||||
*
|
||||
* <p>If <tt>isHttpOnly</tt> is set to <tt>true</tt>, this cookie is
|
||||
* marked as <i>HttpOnly</i>, by adding the <tt>HttpOnly</tt> attribute
|
||||
* to it.
|
||||
*
|
||||
* <p><i>HttpOnly</i> cookies are not supposed to be exposed to
|
||||
* client-side scripting code, and may therefore help mitigate certain
|
||||
* kinds of cross-site scripting attacks.
|
||||
*
|
||||
* @param isHttpOnly true if this cookie is to be marked as
|
||||
* <i>HttpOnly</i>, false otherwise
|
||||
*
|
||||
* @since Servlet 3.0
|
||||
*/
|
||||
public void setHttpOnly(boolean isHttpOnly) {
|
||||
this.isHttpOnly = isHttpOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this Cookie has been marked as <i>HttpOnly</i>.
|
||||
*
|
||||
* @return true if this Cookie has been marked as <i>HttpOnly</i>,
|
||||
* false otherwise
|
||||
*
|
||||
* @since Servlet 3.0
|
||||
*/
|
||||
public boolean isHttpOnly() {
|
||||
return isHttpOnly;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user