From 4c19a88612ec315cd1234551f70ce168a3a6cb48 Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Mon, 19 Oct 2020 17:17:41 +0530 Subject: [PATCH] Use Objects.toString(). --- .../services/youtube/extractors/YoutubeStreamExtractor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 608ae47cd..5eaf80852 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -55,6 +55,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Objects; import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.fixThumbnailUrl; import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getJsonResponse; @@ -861,7 +862,7 @@ public class YoutubeStreamExtractor extends StreamExtractor { } finally { Context.exit(); } - return result == null ? "" : result.toString(); + return Objects.toString(result, ""); } /*//////////////////////////////////////////////////////////////////////////