Skip to content

Commit 8b7cb62

Browse files
committed
Remove useless checkstyle off
1 parent 95a8b8b commit 8b7cb62

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -680,18 +680,10 @@ private static void extractClientVersionAndKeyFromHtmlSearchResultsPage()
680680
} catch (final Parser.RegexException ignored) {
681681
}
682682

683-
if (isNullOrEmpty(key)) {
684-
throw new ParsingException(
685-
// CHECKSTYLE:OFF
686-
"Could not extract YouTube WEB InnerTube API key from HTML search results page");
687-
// CHECKSTYLE:ON
688-
}
689-
690-
if (clientVersion == null) {
691-
throw new ParsingException(
692-
// CHECKSTYLE:OFF
693-
"Could not extract YouTube WEB InnerTube client version from HTML search results page");
694-
// CHECKSTYLE:ON
683+
if (isNullOrEmpty(key) || clientVersion == null) {
684+
throw new ParsingException("Could not extract YouTube WEB InnerTube "
685+
+ (isNullOrEmpty(key) ? "API key" : "client version")
686+
+ " from HTML search results page");
695687
}
696688

697689
keyAndVersionExtracted = true;

0 commit comments

Comments
 (0)