tmap/smali_classes5/org/apache/http/impl/cookie/BasicExpiresHandler.smali
2022-06-10 21:38:30 +09:00

102 lines
2.7 KiB
Smali

.class public Lorg/apache/http/impl/cookie/BasicExpiresHandler;
.super Lorg/apache/http/impl/cookie/AbstractCookieAttributeHandler;
.source "BasicExpiresHandler.java"
# annotations
.annotation build Lorg/apache/http/annotation/Immutable;
.end annotation
# instance fields
.field private final datepatterns:[Ljava/lang/String;
# direct methods
.method public constructor <init>([Ljava/lang/String;)V
.locals 1
.line 1
invoke-direct {p0}, Lorg/apache/http/impl/cookie/AbstractCookieAttributeHandler;-><init>()V
if-eqz p1, :cond_0
.line 2
iput-object p1, p0, Lorg/apache/http/impl/cookie/BasicExpiresHandler;->datepatterns:[Ljava/lang/String;
return-void
.line 3
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Array of date patterns may not be null"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public parse(Lorg/apache/http/cookie/SetCookie;Ljava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/http/cookie/MalformedCookieException;
}
.end annotation
if-eqz p1, :cond_1
if-eqz p2, :cond_0
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/http/impl/cookie/BasicExpiresHandler;->datepatterns:[Ljava/lang/String;
invoke-static {p2, v0}, Lorg/apache/http/impl/cookie/DateUtils;->parseDate(Ljava/lang/String;[Ljava/lang/String;)Ljava/util/Date;
move-result-object v0
invoke-interface {p1, v0}, Lorg/apache/http/cookie/SetCookie;->setExpiryDate(Ljava/util/Date;)V
:try_end_0
.catch Lorg/apache/http/impl/cookie/DateParseException; {:try_start_0 .. :try_end_0} :catch_0
return-void
.line 2
:catch_0
new-instance p1, Lorg/apache/http/cookie/MalformedCookieException;
const-string v0, "Unable to parse expires attribute: "
invoke-static {v0, p2}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Lorg/apache/http/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
throw p1
.line 3
:cond_0
new-instance p1, Lorg/apache/http/cookie/MalformedCookieException;
const-string p2, "Missing value for expires attribute"
invoke-direct {p1, p2}, Lorg/apache/http/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
throw p1
.line 4
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Cookie may not be null"
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method