b.smali
.class public final Lio/reactivex/subjects/b;
.super Lio/reactivex/subjects/d;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/reactivex/subjects/b$a;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lio/reactivex/subjects/d<",
"TT;>;"
}
.end annotation
# static fields
.field public static final c:[Lio/reactivex/subjects/b$a;
.field public static final d:[Lio/reactivex/subjects/b$a;
# instance fields
.field public final a:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"[",
"Lio/reactivex/subjects/b$a<",
"TT;>;>;"
}
.end annotation
.end field
.field public b:Ljava/lang/Throwable;
# direct methods
.method public static constructor <clinit>()V
.registers 2
const/4 v0, 0x0
new-array v1, v0, [Lio/reactivex/subjects/b$a;
.line 1
sput-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
new-array v0, v0, [Lio/reactivex/subjects/b$a;
.line 2
sput-object v0, Lio/reactivex/subjects/b;->d:[Lio/reactivex/subjects/b$a;
return-void
.end method
.method public constructor <init>()V
.registers 3
.line 1
invoke-direct {p0}, Lio/reactivex/subjects/d;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
sget-object v1, Lio/reactivex/subjects/b;->d:[Lio/reactivex/subjects/b$a;
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
return-void
.end method
# virtual methods
.method public final a(Lio/reactivex/subjects/b$a;)V
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/subjects/b$a<",
"TT;>;)V"
}
.end annotation
.line 1
:cond_0
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/subjects/b$a;
.line 2
sget-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
if-eq v0, v1, :cond_40
sget-object v1, Lio/reactivex/subjects/b;->d:[Lio/reactivex/subjects/b$a;
if-ne v0, v1, :cond_11
goto :goto_40
.line 3
:cond_11
array-length v1, v0
const/4 v2, -0x1
const/4 v3, 0x0
const/4 v4, 0x0
:goto_15
if-ge v4, v1, :cond_20
.line 4
aget-object v5, v0, v4
if-ne v5, p1, :cond_1d
move v2, v4
goto :goto_20
:cond_1d
add-int/lit8 v4, v4, 0x1
goto :goto_15
:cond_20
:goto_20
if-gez v2, :cond_23
return-void
:cond_23
const/4 v4, 0x1
if-ne v1, v4, :cond_29
.line 5
sget-object v1, Lio/reactivex/subjects/b;->d:[Lio/reactivex/subjects/b$a;
goto :goto_38
:cond_29
add-int/lit8 v5, v1, -0x1
.line 6
new-array v5, v5, [Lio/reactivex/subjects/b$a;
.line 7
invoke-static {v0, v3, v5, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
add-int/lit8 v3, v2, 0x1
sub-int/2addr v1, v2
sub-int/2addr v1, v4
.line 8
invoke-static {v0, v3, v5, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
move-object v1, v5
.line 9
:goto_38
iget-object v2, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v2, v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
:cond_40
:goto_40
return-void
.end method
.method public final onComplete()V
.registers 6
.line 1
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
sget-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
if-ne v0, v1, :cond_b
return-void
.line 2
:cond_b
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/subjects/b$a;
array-length v1, v0
const/4 v2, 0x0
:goto_15
if-ge v2, v1, :cond_27
aget-object v3, v0, v2
.line 3
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v4
if-nez v4, :cond_24
.line 4
iget-object v3, v3, Lio/reactivex/subjects/b$a;->a:Lio/reactivex/s;
invoke-interface {v3}, Lio/reactivex/s;->onComplete()V
:cond_24
add-int/lit8 v2, v2, 0x1
goto :goto_15
:cond_27
return-void
.end method
.method public final onError(Ljava/lang/Throwable;)V
.registers 7
const-string v0, "onError called with null. Null values are generally not allowed in 2.x operators and sources."
.line 1
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 2
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
sget-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
if-ne v0, v1, :cond_13
.line 3
invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V
return-void
.line 4
:cond_13
iput-object p1, p0, Lio/reactivex/subjects/b;->b:Ljava/lang/Throwable;
.line 5
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/subjects/b$a;
array-length v1, v0
const/4 v2, 0x0
:goto_1f
if-ge v2, v1, :cond_35
aget-object v3, v0, v2
.line 6
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v4
if-eqz v4, :cond_2d
.line 7
invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V
goto :goto_32
.line 8
:cond_2d
iget-object v3, v3, Lio/reactivex/subjects/b$a;->a:Lio/reactivex/s;
invoke-interface {v3, p1}, Lio/reactivex/s;->onError(Ljava/lang/Throwable;)V
:goto_32
add-int/lit8 v2, v2, 0x1
goto :goto_1f
:cond_35
return-void
.end method
.method public final onNext(Ljava/lang/Object;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
const-string v0, "onNext called with null. Null values are generally not allowed in 2.x operators and sources."
.line 1
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 2
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
sget-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
if-ne v0, v1, :cond_10
return-void
.line 3
:cond_10
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/subjects/b$a;
array-length v1, v0
const/4 v2, 0x0
:goto_1a
if-ge v2, v1, :cond_2c
aget-object v3, v0, v2
.line 4
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v4
if-nez v4, :cond_29
.line 5
iget-object v3, v3, Lio/reactivex/subjects/b$a;->a:Lio/reactivex/s;
invoke-interface {v3, p1}, Lio/reactivex/s;->onNext(Ljava/lang/Object;)V
:cond_29
add-int/lit8 v2, v2, 0x1
goto :goto_1a
:cond_2c
return-void
.end method
.method public final onSubscribe(Lio/reactivex/disposables/b;)V
.registers 4
.line 1
iget-object v0, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
sget-object v1, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
if-ne v0, v1, :cond_d
.line 2
invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V
:cond_d
return-void
.end method
.method public final subscribeActual(Lio/reactivex/s;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/s<",
"-TT;>;)V"
}
.end annotation
.line 1
new-instance v0, Lio/reactivex/subjects/b$a;
invoke-direct {v0, p1, p0}, Lio/reactivex/subjects/b$a;-><init>(Lio/reactivex/s;Lio/reactivex/subjects/b;)V
.line 2
invoke-interface {p1, v0}, Lio/reactivex/s;->onSubscribe(Lio/reactivex/disposables/b;)V
.line 3
:cond_8
iget-object v1, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v1
check-cast v1, [Lio/reactivex/subjects/b$a;
.line 4
sget-object v2, Lio/reactivex/subjects/b;->c:[Lio/reactivex/subjects/b$a;
const/4 v3, 0x0
if-ne v1, v2, :cond_16
goto :goto_29
.line 5
:cond_16
array-length v2, v1
add-int/lit8 v4, v2, 0x1
.line 6
new-array v4, v4, [Lio/reactivex/subjects/b$a;
.line 7
invoke-static {v1, v3, v4, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 8
aput-object v0, v4, v2
.line 9
iget-object v2, p0, Lio/reactivex/subjects/b;->a:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v2, v1, v4}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_8
const/4 v3, 0x1
:goto_29
if-eqz v3, :cond_35
.line 10
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result p1
if-eqz p1, :cond_40
.line 11
invoke-virtual {p0, v0}, Lio/reactivex/subjects/b;->a(Lio/reactivex/subjects/b$a;)V
goto :goto_40
.line 12
:cond_35
iget-object v0, p0, Lio/reactivex/subjects/b;->b:Ljava/lang/Throwable;
if-eqz v0, :cond_3d
.line 13
invoke-interface {p1, v0}, Lio/reactivex/s;->onError(Ljava/lang/Throwable;)V
goto :goto_40
.line 14
:cond_3d
invoke-interface {p1}, Lio/reactivex/s;->onComplete()V
:cond_40
:goto_40
return-void
.end method