Skip to content

Commit 94268b8

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
fixup! Refactor settings/tabs/TabsJsonHelper.java to use java streams
1 parent 9cd17c9 commit 94268b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/settings/tabs/TabsJsonHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static List<Tab> getTabsFromJson(@NonNull final String tabsJson)
5050
final JsonObject outerJsonObject = JsonParser.object().from(tabsJson);
5151

5252
final JsonArray tabsArray = outerJsonObject.getArray(JSON_TABS_ARRAY_KEY, null);
53-
if (tabsArray == null) {
53+
if (tabsArray.isEmpty()) {
5454
throw new InvalidJsonException("JSON doesn't contain \"" + JSON_TABS_ARRAY_KEY
5555
+ "\" array");
5656
}

0 commit comments

Comments
 (0)