kopia lustrzana https://github.com/TeamNewPipe/NewPipeExtractor
Add @ null annotations where Android Studio suggested it
That is, basically where the overriding function was missing an annotation from the base method. Also apply renaming of emptyDescription to EMPTY_DESCRIPTIONpull/822/head
rodzic
adbbdc7a5b
commit
8c1041def6
|
@ -138,7 +138,7 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onFetchPage(final Downloader downloader)
|
||||
public void onFetchPage(@Nonnull final Downloader downloader)
|
||||
throws IOException, ExtractionException {
|
||||
final Response response = downloader.get(
|
||||
baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT + getId());
|
||||
|
|
|
@ -23,12 +23,15 @@ import static org.schabi.newpipe.extractor.services.peertube.PeertubeParsingHelp
|
|||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeParsingHelper.START_KEY;
|
||||
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class PeertubeCommentsExtractor extends CommentsExtractor {
|
||||
public PeertubeCommentsExtractor(final StreamingService service,
|
||||
final ListLinkHandler uiHandler) {
|
||||
super(service, uiHandler);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public InfoItemsPage<CommentsInfoItem> getInitialPage()
|
||||
throws IOException, ExtractionException {
|
||||
|
@ -84,6 +87,6 @@ public class PeertubeCommentsExtractor extends CommentsExtractor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onFetchPage(final Downloader downloader) {
|
||||
public void onFetchPage(@Nonnull final Downloader downloader) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ public class PeertubeSearchExtractor extends SearchExtractor {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public InfoItemsPage<InfoItem> getInitialPage() throws IOException, ExtractionException {
|
||||
return getPage(new Page(getUrl() + "&" + START_KEY + "=0&"
|
||||
|
|
|
@ -388,7 +388,8 @@ public class PeertubeStreamExtractor extends StreamExtractor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onFetchPage(final Downloader downloader) throws IOException, ExtractionException {
|
||||
public void onFetchPage(@Nonnull final Downloader downloader)
|
||||
throws IOException, ExtractionException {
|
||||
final Response response = downloader.get(
|
||||
baseUrl + PeertubeStreamLinkHandlerFactory.VIDEO_API_ENDPOINT + getId());
|
||||
if (response != null) {
|
||||
|
|
|
@ -33,11 +33,13 @@ public class PeertubeTrendingExtractor extends KioskExtractor<StreamInfoItem> {
|
|||
super(streamingService, linkHandler, kioskId);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() throws ParsingException {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public InfoItemsPage<StreamInfoItem> getInitialPage() throws IOException, ExtractionException {
|
||||
return getPage(new Page(getUrl() + "&" + START_KEY + "=0&"
|
||||
|
|
|
@ -13,6 +13,8 @@ import static org.schabi.newpipe.extractor.services.youtube.ItagItem.ItagType.VI
|
|||
import org.schabi.newpipe.extractor.MediaFormat;
|
||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItagItem {
|
||||
/**
|
||||
* List can be found here
|
||||
|
@ -96,6 +98,7 @@ public class ItagItem {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static ItagItem getItag(final int itagId) throws ParsingException {
|
||||
for (final ItagItem item : ITAG_LIST) {
|
||||
if (itagId == item.id) {
|
||||
|
|
|
@ -133,6 +133,7 @@ public class YoutubeSearchExtractor extends SearchExtractor {
|
|||
return !showingResultsForRenderer.isEmpty();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<MetaInfo> getMetaInfo() throws ParsingException {
|
||||
return YoutubeParsingHelper.getMetaInfo(
|
||||
|
|
Ładowanie…
Reference in New Issue