Refactor assignments to field declaration

Assignments that don't require the constructor can be moved out.
pull/6345/head
Eric Xu 2021-05-21 18:04:22 -04:00 zatwierdzone przez Zhiheng Xu
rodzic 441c68ead2
commit 8efe2859b8
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -46,22 +46,21 @@ public abstract class PlayQueue implements Serializable {
@NonNull
private final AtomicInteger queueIndex;
private final List<PlayQueueItem> history;
private final List<PlayQueueItem> history = new ArrayList<>();
private transient BehaviorSubject<PlayQueueEvent> eventBroadcast;
private transient Flowable<PlayQueueEvent> broadcastReceiver;
private transient boolean disposed;
private transient boolean disposed = false;
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
streams = new ArrayList<>(startWith);
history = new ArrayList<>();
if (streams.size() > index) {
history.add(streams.get(index));
}
queueIndex = new AtomicInteger(index);
disposed = false;
}
/*//////////////////////////////////////////////////////////////////////////