Simplify Arrays.asList with too few arguments

This commit is contained in:
TacoTheDank 2020-07-11 20:04:48 -04:00
parent 14064cbe6f
commit 62ca1dfccc
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import static de.danoeh.antennapod.core.preferences.UserPreferences.EnqueueLocat
import static de.danoeh.antennapod.core.util.CollectionTestUtil.concat;
import static de.danoeh.antennapod.core.util.CollectionTestUtil.list;
import static de.danoeh.antennapod.core.util.FeedItemUtil.getIdList;
import static java.util.Collections.emptyList;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
@ -249,7 +250,7 @@ public class ItemEnqueuePositionCalculatorTest {
assertEquals(message, idsExpected, getIdList(queue));
}
static final List<FeedItem> QUEUE_EMPTY = Collections.unmodifiableList(Arrays.asList());
static final List<FeedItem> QUEUE_EMPTY = Collections.unmodifiableList(emptyList());
static final List<FeedItem> QUEUE_DEFAULT =
Collections.unmodifiableList(Arrays.asList(

View File

@ -7,6 +7,7 @@ import org.junit.runners.Parameterized.Parameters;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
@ -55,7 +56,7 @@ public class FeedItemUtilTest {
FeedItem feedItem = new FeedItem();
feedItem.setLink(itemLink);
feedItem.setFeed(feed);
feed.setItems(Arrays.asList(feedItem));
feed.setItems(Collections.singletonList(feedItem));
return feedItem;
}
}