Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Remove unused declarations #4527

Merged
merged 1 commit into from
Sep 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/main/java/io/reactivex/Scheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ public long now(TimeUnit unit) {
* of this task has to happen (accounting for clock drifts).
*/
final class PeriodicTask implements Runnable {
final long firstStartInNanoseconds;
final Runnable decoratedRun;
final long firstNowNanoseconds;
final SequentialDisposable sd;
final long periodInNanoseconds;
long count;
Expand All @@ -267,9 +265,7 @@ final class PeriodicTask implements Runnable {

PeriodicTask(long firstStartInNanoseconds, Runnable decoratedRun,
long firstNowNanoseconds, SequentialDisposable sd, long periodInNanoseconds) {
this.firstStartInNanoseconds = firstStartInNanoseconds;
this.decoratedRun = decoratedRun;
this.firstNowNanoseconds = firstNowNanoseconds;
this.sd = sd;
this.periodInNanoseconds = periodInNanoseconds;
lastNowNanoseconds = firstNowNanoseconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ static final class ConcatInnerObserver extends AtomicInteger implements Completa
final CompletableObserver actual;
final Iterator<? extends CompletableSource> sources;

int index;

final SequentialDisposable sd;

public ConcatInnerObserver(CompletableObserver actual, Iterator<? extends CompletableSource> sources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ static final class DebounceSubscriber<T, U> extends AtomicLong
final Subscriber<? super T> actual;
final Function<? super T, ? extends Publisher<U>> debounceSelector;

volatile boolean gate;

Subscription s;

final AtomicReference<Disposable> debouncer = new AtomicReference<Disposable>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public final class FlowableFromArray<T> extends Flowable<T> {
public FlowableFromArray(T[] array) {
this.array = array;
}
public T[] array() {
return array; // NOPMD
}
@Override
public void subscribeActual(Subscriber<? super T> s) {
if (s instanceof ConditionalSubscriber) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ static final class MulticastProcessor<T> extends Flowable<T> implements Subscrib

final int prefetch;

final int limit;

final boolean delayError;

final AtomicReference<Subscription> s;
Expand All @@ -161,7 +159,6 @@ static final class MulticastProcessor<T> extends Flowable<T> implements Subscrib
public MulticastProcessor(int prefetch, boolean delayError) {
this.prefetch = prefetch;
this.delayError = delayError;
this.limit = prefetch - (prefetch >> 2);
this.wip = new AtomicInteger();
this.s = new AtomicReference<Subscription>();
this.subscribers = new AtomicReference<MulticastSubscription<T>[]>(EMPTY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ static final class FlatMapCompletableObserver<T>

final Function<? super T, ? extends CompletableSource> mapper;

Disposable d;

public FlatMapCompletableObserver(CompletableObserver actual,
Function<? super T, ? extends CompletableSource> mapper) {
this.actual = actual;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ static final class LatestCoordinator<T, R> extends AtomicInteger implements Disp
private static final long serialVersionUID = 8567835998786448817L;
final Observer<? super R> actual;
final Function<? super Object[], ? extends R> combiner;
final int count;
final CombinerSubscriber<T, R>[] subscribers;
final int bufferSize;
final T[] latest;
final SpscLinkedArrayQueue<Object> queue;
final boolean delayError;
Expand All @@ -98,8 +96,6 @@ public LatestCoordinator(Observer<? super R> actual,
int count, int bufferSize, boolean delayError) {
this.actual = actual;
this.combiner = combiner;
this.count = count;
this.bufferSize = bufferSize;
this.delayError = delayError;
this.latest = (T[])new Object[count];
this.subscribers = new CombinerSubscriber[count];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ static final class DebounceSubscriber<T, U>
final Observer<? super T> actual;
final Function<? super T, ? extends ObservableSource<U>> debounceSelector;

volatile boolean gate;

Disposable s;

final AtomicReference<Disposable> debouncer = new AtomicReference<Disposable>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public final class ObservableFromArray<T> extends Observable<T> {
public ObservableFromArray(T[] array) {
this.array = array;
}
public T[] array() {
return array; // NOPMD
}
@Override
public void subscribeActual(Observer<? super T> s) {
FromArrayDisposable<T> d = new FromArrayDisposable<T>(s, array);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ static final class MapNotificationSubscriber<T, R>

Disposable s;

Observable<? extends R> value;

volatile boolean done;

public MapNotificationSubscriber(Observer<? super ObservableSource<? extends R>> actual,
Function<? super T, ? extends ObservableSource<? extends R>> onNextMapper,
Function<? super Throwable, ? extends ObservableSource<? extends R>> onErrorMapper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ static final class MaterializeSubscriber<T> implements Observer<T>, Disposable {

Disposable s;

volatile boolean done;

public MaterializeSubscriber(Observer<? super Notification<T>> actual) {
this.actual = actual;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ static final class ObserveOnSubscriber<T> extends Padding0 implements Observer<T
final Observer<? super T> actual;
final Scheduler.Worker worker;
final boolean delayError;
final int bufferSize;
final SpscLinkedArrayQueue<T> queue;

Disposable s;
Expand All @@ -76,7 +75,6 @@ public ObserveOnSubscriber(Observer<? super T> actual, Scheduler.Worker worker,
this.actual = actual;
this.worker = worker;
this.delayError = delayError;
this.bufferSize = bufferSize;
this.queue = new SpscLinkedArrayQueue<T>(bufferSize);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ static final class OnErrorReturnSubscriber<T> implements Observer<T>, Disposable

Disposable s;

volatile boolean done;

public OnErrorReturnSubscriber(Observer<? super T> actual, Function<? super Throwable, ? extends T> valueSupplier) {
this.actual = actual;
this.valueSupplier = valueSupplier;
Expand Down Expand Up @@ -70,7 +68,6 @@ public void onNext(T t) {

@Override
public void onError(Throwable t) {
done = true;
T v;
try {
v = valueSupplier.apply(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ static final class PublishSubscriber<T> implements Observer<T>, Disposable {
final SpscLinkedArrayQueue<Object> queue;
/** Holds onto the current connected PublishSubscriber. */
final AtomicReference<PublishSubscriber<T>> current;
/** The prefetch buffer size. */
final int bufferSize;
/** Contains either an onCompleted or an onError token from upstream. */
volatile Object terminalEvent;

Expand Down Expand Up @@ -254,7 +252,6 @@ public PublishSubscriber(AtomicReference<PublishSubscriber<T>> current, int buff
this.producers = new AtomicReference<InnerProducer[]>(EMPTY);
this.current = current;
this.shouldConnect = new AtomicBoolean();
this.bufferSize = bufferSize;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,6 @@ static final class ReplaySubscriber<T> implements Observer<T>, Disposable {
*/
final AtomicBoolean shouldConnect;

/** Guarded by this. */
boolean emitting;
/** Guarded by this. */
boolean missed;


/** The upstream producer. */
volatile Disposable subscription;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ static final class EqualSubscriber<T> implements Observer<T> {
volatile boolean done;
Throwable error;

Disposable s;

public EqualSubscriber(EqualCoordinator<T> parent, int index, int bufferSize) {
this.parent = parent;
this.index = index;
Expand All @@ -233,9 +231,7 @@ public EqualSubscriber(EqualCoordinator<T> parent, int index, int bufferSize) {

@Override
public void onSubscribe(Disposable s) {
if (parent.setSubscription(s, index)) {
this.s = s;
}
parent.setSubscription(s, index);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,13 @@ static final class SwitchMapInnerSubscriber<T, R> extends AtomicReference<Dispos
private static final long serialVersionUID = 3837284832786408377L;
final SwitchMapSubscriber<T, R> parent;
final long index;
final int bufferSize;
final SpscArrayQueue<R> queue;

volatile boolean done;

public SwitchMapInnerSubscriber(SwitchMapSubscriber<T, R> parent, long index, int bufferSize) {
this.parent = parent;
this.index = index;
this.bufferSize = bufferSize;
this.queue = new SpscArrayQueue<R>(bufferSize);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static final class TakeLastSubscriber<T> extends ArrayDeque<T> implements Observ

Disposable s;

volatile boolean done;
volatile boolean cancelled;

public TakeLastSubscriber(Observer<? super T> actual, int count) {
Expand Down Expand Up @@ -71,7 +70,6 @@ public void onError(Throwable t) {

@Override
public void onComplete() {
done = true;
if (cancelled) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ static final class FlatMapCompletableObserver<T>

final Function<? super T, ? extends CompletableSource> mapper;

Disposable d;

public FlatMapCompletableObserver(CompletableObserver actual,
Function<? super T, ? extends CompletableSource> mapper) {
this.actual = actual;
Expand Down