.class public Lorg/apache/http/impl/cookie/LaxMaxAgeHandler; .super Lorg/apache/http/impl/cookie/AbstractCookieAttributeHandler; .source "LaxMaxAgeHandler.java" # interfaces .implements Lorg/apache/http/cookie/CommonCookieAttributeHandler; # static fields .field private static final MAX_AGE_PATTERN:Ljava/util/regex/Pattern; # direct methods .method static constructor ()V .registers 1 .line 49 const-string v0, "^\\-?[0-9]+$" invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern; move-result-object v0 sput-object v0, Lorg/apache/http/impl/cookie/LaxMaxAgeHandler;->MAX_AGE_PATTERN:Ljava/util/regex/Pattern; return-void .end method .method public constructor ()V .registers 1 .line 52 invoke-direct {p0}, Lorg/apache/http/impl/cookie/AbstractCookieAttributeHandler;->()V return-void .end method # virtual methods .method public getAttributeName()Ljava/lang/String; .registers 2 .line 77 const-string v0, "max-age" return-object v0 .end method .method public parse(Lorg/apache/http/cookie/SetCookie;Ljava/lang/String;)V .registers 10 .annotation system Ldalvik/annotation/Throws; value = { Lorg/apache/http/cookie/MalformedCookieException; } .end annotation .line 57 const-string v0, "Cookie" invoke-static {p1, v0}, Lorg/apache/http/util/Args;->notNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; .line 58 invoke-static {p2}, Lorg/apache/http/util/TextUtils;->isBlank(Ljava/lang/CharSequence;)Z move-result v0 if-eqz v0, :cond_c return-void .line 61 :cond_c sget-object v0, Lorg/apache/http/impl/cookie/LaxMaxAgeHandler;->MAX_AGE_PATTERN:Ljava/util/regex/Pattern; invoke-virtual {v0, p2}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; move-result-object v0 .line 62 invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z move-result v0 if-eqz v0, :cond_36 .line 65 :try_start_18 invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I move-result p2 :try_end_1c .catch Ljava/lang/NumberFormatException; {:try_start_18 .. :try_end_1c} :catch_36 .line 69 new-instance v0, Ljava/util/Date; if-ltz p2, :cond_2d invoke-static {}, Ljava/lang/System;->currentTimeMillis()J move-result-wide v1 int-to-long v3, p2 const-wide/16 v5, 0x3e8 mul-long/2addr v3, v5 add-long/2addr v1, v3 invoke-direct {v0, v1, v2}, Ljava/util/Date;->(J)V goto :goto_32 :cond_2d const-wide/high16 v1, -0x8000000000000000L invoke-direct {v0, v1, v2}, Ljava/util/Date;->(J)V .line 71 :goto_32 invoke-interface {p1, v0}, Lorg/apache/http/cookie/SetCookie;->setExpiryDate(Ljava/util/Date;)V nop :catch_36 :cond_36 return-void .end method