Don't declare exceptions that can't actually be thrown

This commit is contained in:
Fynn Godau 2020-04-20 22:46:54 +02:00
parent 965bce00cf
commit 9201e0d3ea
4 changed files with 12 additions and 16 deletions

View File

@ -6,7 +6,6 @@ import com.grack.nanojson.JsonArray;
import com.grack.nanojson.JsonObject;
import com.grack.nanojson.JsonParser;
import com.grack.nanojson.JsonParserException;
import org.schabi.newpipe.extractor.Collector;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.InfoItemsCollector;
import org.schabi.newpipe.extractor.StreamingService;
@ -15,10 +14,7 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.kiosk.KioskExtractor;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItemsCollector;
import org.schabi.newpipe.extractor.search.InfoItemsSearchCollector;
import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampFeaturedLinkHandlerFactory;
import javax.annotation.Nonnull;
import java.io.IOException;

View File

@ -76,7 +76,7 @@ public class BandcampRadioExtractor extends KioskExtractor<InfoItem> {
}
@Override
public InfoItemsPage<InfoItem> getPage(String pageUrl) throws IOException, ExtractionException {
public InfoItemsPage<InfoItem> getPage(String pageUrl) {
return null;
}
}

View File

@ -89,13 +89,13 @@ public class BandcampStreamExtractor extends StreamExtractor {
@Nonnull
@Override
public String getUploaderName() throws ParsingException {
public String getUploaderName() {
return albumJson.getString("artist");
}
@Nullable
@Override
public String getTextualUploadDate() throws ParsingException {
public String getTextualUploadDate() {
return current.getString("release_date");
}
@ -136,44 +136,44 @@ public class BandcampStreamExtractor extends StreamExtractor {
}
@Override
public int getAgeLimit() throws ParsingException {
public int getAgeLimit() {
return NO_AGE_LIMIT;
}
@Override
public long getLength() throws ParsingException {
public long getLength() {
return 0;
}
@Override
public long getTimeStamp() throws ParsingException {
public long getTimeStamp() {
return 0;
}
@Override
public long getViewCount() throws ParsingException {
public long getViewCount() {
return -1;
}
@Override
public long getLikeCount() throws ParsingException {
public long getLikeCount() {
return -1;
}
@Override
public long getDislikeCount() throws ParsingException {
public long getDislikeCount() {
return -1;
}
@Nonnull
@Override
public String getDashMpdUrl() throws ParsingException {
public String getDashMpdUrl() {
return "";
}
@Nonnull
@Override
public String getHlsUrl() throws ParsingException {
public String getHlsUrl() {
return null;
}

View File

@ -128,7 +128,7 @@ public class BandcampStreamInfoItemExtractor implements StreamInfoItemExtractor
* There are no ads just like that, duh
*/
@Override
public boolean isAd() throws ParsingException {
public boolean isAd() {
return false;
}
}