mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
BasicExpiresHandler is annotated as immutable but is not. (#240)
This commit is contained in:
parent
9866865357
commit
66f8ca1f09
@ -46,11 +46,11 @@
|
|||||||
public class BasicExpiresHandler extends AbstractCookieAttributeHandler implements CommonCookieAttributeHandler {
|
public class BasicExpiresHandler extends AbstractCookieAttributeHandler implements CommonCookieAttributeHandler {
|
||||||
|
|
||||||
/** Valid date patterns */
|
/** Valid date patterns */
|
||||||
private final String[] datepatterns;
|
private final String[] datePatterns;
|
||||||
|
|
||||||
public BasicExpiresHandler(final String[] datepatterns) {
|
public BasicExpiresHandler(final String[] datePatterns) {
|
||||||
Args.notNull(datepatterns, "Array of date patterns");
|
Args.notNull(datePatterns, "Array of date patterns");
|
||||||
this.datepatterns = datepatterns;
|
this.datePatterns = datePatterns.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,7 +60,7 @@ public void parse(final SetCookie cookie, final String value)
|
|||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new MalformedCookieException("Missing value for 'expires' attribute");
|
throw new MalformedCookieException("Missing value for 'expires' attribute");
|
||||||
}
|
}
|
||||||
final Date expiry = DateUtils.parseDate(value, this.datepatterns);
|
final Date expiry = DateUtils.parseDate(value, this.datePatterns);
|
||||||
if (expiry == null) {
|
if (expiry == null) {
|
||||||
throw new MalformedCookieException("Invalid 'expires' attribute: "
|
throw new MalformedCookieException("Invalid 'expires' attribute: "
|
||||||
+ value);
|
+ value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user