Simplify Arrays.asList with too few arguments
This commit is contained in:
parent
14064cbe6f
commit
62ca1dfccc
|
@ -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.concat;
|
||||||
import static de.danoeh.antennapod.core.util.CollectionTestUtil.list;
|
import static de.danoeh.antennapod.core.util.CollectionTestUtil.list;
|
||||||
import static de.danoeh.antennapod.core.util.FeedItemUtil.getIdList;
|
import static de.danoeh.antennapod.core.util.FeedItemUtil.getIdList;
|
||||||
|
import static java.util.Collections.emptyList;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.mockito.Mockito.any;
|
import static org.mockito.Mockito.any;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
@ -249,7 +250,7 @@ public class ItemEnqueuePositionCalculatorTest {
|
||||||
assertEquals(message, idsExpected, getIdList(queue));
|
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 =
|
static final List<FeedItem> QUEUE_DEFAULT =
|
||||||
Collections.unmodifiableList(Arrays.asList(
|
Collections.unmodifiableList(Arrays.asList(
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
import de.danoeh.antennapod.core.feed.Feed;
|
import de.danoeh.antennapod.core.feed.Feed;
|
||||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||||
|
@ -55,7 +56,7 @@ public class FeedItemUtilTest {
|
||||||
FeedItem feedItem = new FeedItem();
|
FeedItem feedItem = new FeedItem();
|
||||||
feedItem.setLink(itemLink);
|
feedItem.setLink(itemLink);
|
||||||
feedItem.setFeed(feed);
|
feedItem.setFeed(feed);
|
||||||
feed.setItems(Arrays.asList(feedItem));
|
feed.setItems(Collections.singletonList(feedItem));
|
||||||
return feedItem;
|
return feedItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue