.class public final Lio/sentry/JsonObjectReader; .super Lio/sentry/vendor/gson/stream/JsonReader; .source "JsonObjectReader.java" # direct methods .method public constructor (Ljava/io/Reader;)V .locals 0 .line 21 invoke-direct {p0, p1}, Lio/sentry/vendor/gson/stream/JsonReader;->(Ljava/io/Reader;)V return-void .end method .method public static dateOrNull(Ljava/lang/String;Lio/sentry/ILogger;)Ljava/util/Date; .locals 3 const/4 v0, 0x0 if-nez p0, :cond_0 return-object v0 .line 174 :cond_0 :try_start_0 invoke-static {p0}, Lio/sentry/DateUtils;->getDateTime(Ljava/lang/String;)Ljava/util/Date; move-result-object p0 :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 return-object p0 .line 177 :catch_0 :try_start_1 invoke-static {p0}, Lio/sentry/DateUtils;->getDateTimeWithMillisPrecision(Ljava/lang/String;)Ljava/util/Date; move-result-object p0 :try_end_1 .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1 return-object p0 :catch_1 move-exception p0 .line 179 sget-object v1, Lio/sentry/SentryLevel;->ERROR:Lio/sentry/SentryLevel; const-string v2, "Error when deserializing millis timestamp format." invoke-interface {p1, v1, v2, p0}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V return-object v0 .end method # virtual methods .method public nextBooleanOrNull()Ljava/lang/Boolean; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 69 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 70 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 73 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextBoolean()Z move-result p0 invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object p0 return-object p0 .end method .method public nextDateOrNull(Lio/sentry/ILogger;)Ljava/util/Date; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 162 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 163 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 166 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextString()Ljava/lang/String; move-result-object p0 invoke-static {p0, p1}, Lio/sentry/JsonObjectReader;->dateOrNull(Ljava/lang/String;Lio/sentry/ILogger;)Ljava/util/Date; move-result-object p0 return-object p0 .end method .method public nextDoubleOrNull()Ljava/lang/Double; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 33 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 34 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 37 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextDouble()D move-result-wide v0 invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double; move-result-object p0 return-object p0 .end method .method public nextFloat()Ljava/lang/Float; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 49 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextDouble()D move-result-wide v0 double-to-float p0, v0 invoke-static {p0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float; move-result-object p0 return-object p0 .end method .method public nextFloatOrNull()Ljava/lang/Float; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 41 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 42 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 45 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextFloat()Ljava/lang/Float; move-result-object p0 return-object p0 .end method .method public nextIntegerOrNull()Ljava/lang/Integer; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 61 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 62 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 65 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextInt()I move-result p0 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object p0 return-object p0 .end method .method public nextListOrNull(Lio/sentry/ILogger;Lio/sentry/JsonDeserializer;)Ljava/util/List; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/ILogger;", "Lio/sentry/JsonDeserializer<", "TT;>;)", "Ljava/util/List<", "TT;>;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 86 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 87 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 90 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->beginArray()V .line 91 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V .line 92 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->hasNext()Z move-result v1 if-eqz v1, :cond_2 .line 95 :cond_1 :try_start_0 invoke-interface {p2, p0, p1}, Lio/sentry/JsonDeserializer;->deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object; move-result-object v1 invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v1 .line 97 sget-object v2, Lio/sentry/SentryLevel;->WARNING:Lio/sentry/SentryLevel; const-string v3, "Failed to deserialize object in list." invoke-interface {p1, v2, v3, v1}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V .line 99 :goto_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v1 sget-object v2, Lio/sentry/vendor/gson/stream/JsonToken;->BEGIN_OBJECT:Lio/sentry/vendor/gson/stream/JsonToken; if-eq v1, v2, :cond_1 .line 101 :cond_2 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->endArray()V return-object v0 .end method .method public nextLongOrNull()Ljava/lang/Long; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 53 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 54 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 57 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextLong()J move-result-wide v0 invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p0 return-object p0 .end method .method public nextMapOfListOrNull(Lio/sentry/ILogger;Lio/sentry/JsonDeserializer;)Ljava/util/Map; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/ILogger;", "Lio/sentry/JsonDeserializer<", "TT;>;)", "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/util/List<", "TT;>;>;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 131 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 132 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 135 :cond_0 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V .line 137 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->beginObject()V .line 138 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->hasNext()Z move-result v1 if-eqz v1, :cond_3 .line 140 :cond_1 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextName()Ljava/lang/String; move-result-object v1 .line 141 invoke-virtual {p0, p1, p2}, Lio/sentry/JsonObjectReader;->nextListOrNull(Lio/sentry/ILogger;Lio/sentry/JsonDeserializer;)Ljava/util/List; move-result-object v2 if-eqz v2, :cond_2 .line 143 invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 145 :cond_2 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v1 sget-object v2, Lio/sentry/vendor/gson/stream/JsonToken;->BEGIN_OBJECT:Lio/sentry/vendor/gson/stream/JsonToken; if-eq v1, v2, :cond_1 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v1 sget-object v2, Lio/sentry/vendor/gson/stream/JsonToken;->NAME:Lio/sentry/vendor/gson/stream/JsonToken; if-eq v1, v2, :cond_1 .line 147 :cond_3 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->endObject()V return-object v0 .end method .method public nextMapOrNull(Lio/sentry/ILogger;Lio/sentry/JsonDeserializer;)Ljava/util/Map; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/ILogger;", "Lio/sentry/JsonDeserializer<", "TT;>;)", "Ljava/util/Map<", "Ljava/lang/String;", "TT;>;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 107 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 108 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 111 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->beginObject()V .line 112 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V .line 113 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->hasNext()Z move-result v1 if-eqz v1, :cond_2 .line 116 :cond_1 :try_start_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextName()Ljava/lang/String; move-result-object v1 .line 117 invoke-interface {p2, p0, p1}, Lio/sentry/JsonDeserializer;->deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object; move-result-object v2 invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v1 .line 119 sget-object v2, Lio/sentry/SentryLevel;->WARNING:Lio/sentry/SentryLevel; const-string v3, "Failed to deserialize object in map." invoke-interface {p1, v2, v3, v1}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V .line 121 :goto_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v1 sget-object v2, Lio/sentry/vendor/gson/stream/JsonToken;->BEGIN_OBJECT:Lio/sentry/vendor/gson/stream/JsonToken; if-eq v1, v2, :cond_1 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v1 sget-object v2, Lio/sentry/vendor/gson/stream/JsonToken;->NAME:Lio/sentry/vendor/gson/stream/JsonToken; if-eq v1, v2, :cond_1 .line 124 :cond_2 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->endObject()V return-object v0 .end method .method public nextObjectOrNull()Ljava/lang/Object; .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 205 new-instance v0, Lio/sentry/JsonObjectDeserializer; invoke-direct {v0}, Lio/sentry/JsonObjectDeserializer;->()V invoke-virtual {v0, p0}, Lio/sentry/JsonObjectDeserializer;->deserialize(Lio/sentry/JsonObjectReader;)Ljava/lang/Object; move-result-object p0 return-object p0 .end method .method public nextOrNull(Lio/sentry/ILogger;Lio/sentry/JsonDeserializer;)Ljava/lang/Object; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/ILogger;", "Lio/sentry/JsonDeserializer<", "TT;>;)TT;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/Exception; } .end annotation .line 154 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 155 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 158 :cond_0 invoke-interface {p2, p0, p1}, Lio/sentry/JsonDeserializer;->deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object; move-result-object p0 return-object p0 .end method .method public nextStringOrNull()Ljava/lang/String; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 25 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; if-ne v0, v1, :cond_0 .line 26 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V const/4 p0, 0x0 return-object p0 .line 29 :cond_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextString()Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public nextTimeZoneOrNull(Lio/sentry/ILogger;)Ljava/util/TimeZone; .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 186 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken; move-result-object v0 sget-object v1, Lio/sentry/vendor/gson/stream/JsonToken;->NULL:Lio/sentry/vendor/gson/stream/JsonToken; const/4 v2, 0x0 if-ne v0, v1, :cond_0 .line 187 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextNull()V return-object v2 .line 191 :cond_0 :try_start_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextString()Ljava/lang/String; move-result-object p0 invoke-static {p0}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone; move-result-object p0 :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 return-object p0 :catch_0 move-exception p0 .line 193 sget-object v0, Lio/sentry/SentryLevel;->ERROR:Lio/sentry/SentryLevel; const-string v1, "Error when deserializing TimeZone" invoke-interface {p1, v0, v1, p0}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V return-object v2 .end method .method public nextUnknown(Lio/sentry/ILogger;Ljava/util/Map;Ljava/lang/String;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/ILogger;", "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/lang/Object;", ">;", "Ljava/lang/String;", ")V" } .end annotation .line 78 :try_start_0 invoke-virtual {p0}, Lio/sentry/JsonObjectReader;->nextObjectOrNull()Ljava/lang/Object; move-result-object p0 invoke-interface {p2, p3, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p0 .line 80 sget-object p2, Lio/sentry/SentryLevel;->ERROR:Lio/sentry/SentryLevel; const-string v0, "Error deserializing unknown key: %s" filled-new-array {p3}, [Ljava/lang/Object; move-result-object p3 invoke-interface {p1, p2, p0, v0, p3}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V :goto_0 return-void .end method