Skip to content

Commit aeab18f

Browse files
committed
Use the containsKey method instead of the get method in YoutubeDashManifestCreator
1 parent 8fe06d3 commit aeab18f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static String createDashManifestFromOtfStreamingUrl(
5555
@Nonnull String otfBaseStreamingUrl,
5656
@Nonnull final ItagItem itagItem)
5757
throws YoutubeDashManifestCreationException {
58-
if (otfManifestsGenerated.get(otfBaseStreamingUrl) != null) {
58+
if (otfManifestsGenerated.containsKey(otfBaseStreamingUrl)) {
5959
return otfManifestsGenerated.get(otfBaseStreamingUrl);
6060
}
6161
final String originalOtfBaseStreamingUrl = otfBaseStreamingUrl;
@@ -122,7 +122,7 @@ public static String createDashManifestFromPostLiveStreamDvrStreamingUrl(
122122
@Nonnull final ItagItem itagItem,
123123
final int targetDurationSec)
124124
throws YoutubeDashManifestCreationException {
125-
if (postLiveStreamsManifestsGenerated.get(postLiveStreamDvrStreamingUrl) != null) {
125+
if (postLiveStreamsManifestsGenerated.containsKey(postLiveStreamDvrStreamingUrl)) {
126126
return postLiveStreamsManifestsGenerated.get(postLiveStreamDvrStreamingUrl);
127127
}
128128
final String originalPostLiveStreamDvrStreamingUrl = postLiveStreamDvrStreamingUrl;

0 commit comments

Comments
 (0)