diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-07-11 20:04:48 -0400 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-07-11 20:04:48 -0400 |
commit | 62ca1dfccc8303f0417f7333e3edf71c12ad23a6 (patch) | |
tree | 71c09f72df43ca6d746b0c25523e44a6f1c83c1f /core | |
parent | 14064cbe6faac61ec2a79f6b9c888aeb70969a37 (diff) | |
download | AntennaPod-62ca1dfccc8303f0417f7333e3edf71c12ad23a6.zip |
Simplify Arrays.asList with too few arguments
Diffstat (limited to 'core')
-rw-r--r-- | core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java | 3 | ||||
-rw-r--r-- | core/src/test/java/de/danoeh/antennapod/core/util/FeedItemUtilTest.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java b/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java index 532e5921d..ed7d2fa75 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java @@ -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( diff --git a/core/src/test/java/de/danoeh/antennapod/core/util/FeedItemUtilTest.java b/core/src/test/java/de/danoeh/antennapod/core/util/FeedItemUtilTest.java index 2560ac6a0..a3744035b 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/util/FeedItemUtilTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/util/FeedItemUtilTest.java @@ -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; } } |