From 5bf9fddba930fb0555b5ec77221bf6faa00d79e6 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 15 Feb 2021 22:45:02 +0100 Subject: [PATCH] Code improvements --- .../bandcamp/extractors/BandcampRadioStreamExtractor.java | 4 +--- .../bandcamp/BandcampChannelLinkHandlerFactoryTest.java | 1 - .../bandcamp/BandcampStreamLinkHandlerFactoryTest.java | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java index 57ca8b187..a0c109810 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java @@ -27,11 +27,9 @@ import static org.schabi.newpipe.extractor.services.bandcamp.extractors.Bandcamp public class BandcampRadioStreamExtractor extends BandcampStreamExtractor { private JsonObject showInfo; - private LinkHandler linkHandler; public BandcampRadioStreamExtractor(final StreamingService service, final LinkHandler linkHandler) { super(service, linkHandler); - this.linkHandler = linkHandler; } static JsonObject query(final int id) throws ParsingException { @@ -64,7 +62,7 @@ public class BandcampRadioStreamExtractor extends BandcampStreamExtractor { @Nonnull @Override public String getUrl() throws ParsingException { - return linkHandler.getUrl(); + return getLinkHandler().getUrl(); } @Nonnull diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampChannelLinkHandlerFactoryTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampChannelLinkHandlerFactoryTest.java index 89c81fb9e..aa7a93d8a 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampChannelLinkHandlerFactoryTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampChannelLinkHandlerFactoryTest.java @@ -10,7 +10,6 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampChannelLinkHandlerFactory; import static org.junit.Assert.*; -import static org.junit.Assert.assertTrue; /** * Test for {@link BandcampChannelLinkHandlerFactory} diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamLinkHandlerFactoryTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamLinkHandlerFactoryTest.java index 17d983cec..85094827e 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamLinkHandlerFactoryTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamLinkHandlerFactoryTest.java @@ -10,7 +10,6 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampStreamLinkHandlerFactory; import static org.junit.Assert.*; -import static org.junit.Assert.assertFalse; /** * Test for {@link BandcampStreamLinkHandlerFactory}