Refactor streams to initialize with values

This commit is contained in:
Eric Xu authored and Zhiheng Xu committed 2021-05-24 12:20:19 -04:00
1 parent 013c59f904
commit 4cd1f201f5
1 file changed
+1 -2
@@ -54,8 +54,7 @@ public abstract class PlayQueue implements Serializable {
private transient boolean disposed;
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
streams = new ArrayList<>();
streams.addAll(startWith);
streams = new ArrayList<>(startWith);
history = new ArrayList<>();
if (streams.size() > index) {
history.add(streams.get(index));