You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java
+23-64Lines changed: 23 additions & 64 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,12 @@
14
14
importjava.io.IOException;
15
15
importjava.io.InputStream;
16
16
importjava.io.InputStreamReader;
17
+
importjava.io.UncheckedIOException;
17
18
importjava.util.ArrayList;
18
19
importjava.util.Collections;
19
20
importjava.util.List;
21
+
importjava.util.Objects;
22
+
importjava.util.stream.Collectors;
20
23
importjava.util.zip.ZipEntry;
21
24
importjava.util.zip.ZipInputStream;
22
25
@@ -110,7 +113,7 @@ public List<SubscriptionItem> fromZipInputStream(@Nonnull final InputStream cont
110
113
111
114
// Return it only if it has items (it exits early if it's the wrong file
112
115
// format), otherwise try the next file
113
-
if (csvItems.size() > 0) {
116
+
if (!csvItems.isEmpty()) {
114
117
returncsvItems;
115
118
}
116
119
} catch (finalExtractionExceptione) {
@@ -138,69 +141,25 @@ public List<SubscriptionItem> fromCsvInputStream(@Nonnull final InputStream cont
138
141
// The first line is always a header
139
142
// Header names are different based on the locale
140
143
// Fortunately the data is always the same order no matter what locale
Copy file name to clipboardExpand all lines: extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriptionExtractorTest.java
0 commit comments