Skip to content

Commit 4cd1f20

Browse files
committed
Refactor streams to initialize with values
1 parent 013c59f commit 4cd1f20

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ public abstract class PlayQueue implements Serializable {
5454
private transient boolean disposed;
5555

5656
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
57-
streams = new ArrayList<>();
58-
streams.addAll(startWith);
57+
streams = new ArrayList<>(startWith);
5958
history = new ArrayList<>();
6059
if (streams.size() > index) {
6160
history.add(streams.get(index));

0 commit comments

Comments
 (0)