141 lines
2.9 KiB
Smali
141 lines
2.9 KiB
Smali
.class public Lgg/f0;
|
|
.super Ljava/lang/Object;
|
|
.source "RFC2965VersionAttributeHandler.java"
|
|
|
|
# interfaces
|
|
.implements Lxf/c;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/Immutable;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lxf/b;Lxf/d;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string p2, "Cookie"
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
instance-of p2, p1, Lxf/j;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 3
|
|
instance-of p2, p1, Lxf/a;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
check-cast p1, Lxf/a;
|
|
|
|
const-string p2, "version"
|
|
|
|
.line 4
|
|
invoke-interface {p1, p2}, Lxf/a;->containsAttribute(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/CookieRestrictionViolationException;
|
|
|
|
const-string p2, "Violates RFC 2965. Version attribute is required."
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/CookieRestrictionViolationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(Lxf/b;Lxf/d;)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public c(Lxf/k;Ljava/lang/String;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Cookie"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 2
|
|
:try_start_0
|
|
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result p2
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const/4 p2, -0x1
|
|
|
|
:goto_0
|
|
if-ltz p2, :cond_0
|
|
|
|
.line 3
|
|
invoke-interface {p1, p2}, Lxf/k;->setVersion(I)V
|
|
|
|
return-void
|
|
|
|
.line 4
|
|
:cond_0
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
|
|
const-string p2, "Invalid cookie version."
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 5
|
|
:cond_1
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
|
|
const-string p2, "Missing value for version attribute"
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|