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_DESCRIPTION
This commit is contained in:
parent
adbbdc7a5b
commit
8c1041def6
7 changed files with 14 additions and 3 deletions
|
@ -138,7 +138,7 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFetchPage(final Downloader downloader)
|
public void onFetchPage(@Nonnull final Downloader downloader)
|
||||||
throws IOException, ExtractionException {
|
throws IOException, ExtractionException {
|
||||||
final Response response = downloader.get(
|
final Response response = downloader.get(
|
||||||
baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT + getId());
|
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.services.peertube.PeertubeParsingHelper.START_KEY;
|
||||||
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
|
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class PeertubeCommentsExtractor extends CommentsExtractor {
|
public class PeertubeCommentsExtractor extends CommentsExtractor {
|
||||||
public PeertubeCommentsExtractor(final StreamingService service,
|
public PeertubeCommentsExtractor(final StreamingService service,
|
||||||
final ListLinkHandler uiHandler) {
|
final ListLinkHandler uiHandler) {
|
||||||
super(service, uiHandler);
|
super(service, uiHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public InfoItemsPage<CommentsInfoItem> getInitialPage()
|
public InfoItemsPage<CommentsInfoItem> getInitialPage()
|
||||||
throws IOException, ExtractionException {
|
throws IOException, ExtractionException {
|
||||||
|
@ -84,6 +87,6 @@ public class PeertubeCommentsExtractor extends CommentsExtractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public InfoItemsPage<InfoItem> getInitialPage() throws IOException, ExtractionException {
|
public InfoItemsPage<InfoItem> getInitialPage() throws IOException, ExtractionException {
|
||||||
return getPage(new Page(getUrl() + "&" + START_KEY + "=0&"
|
return getPage(new Page(getUrl() + "&" + START_KEY + "=0&"
|
||||||
|
|
|
@ -388,7 +388,8 @@ public class PeertubeStreamExtractor extends StreamExtractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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(
|
final Response response = downloader.get(
|
||||||
baseUrl + PeertubeStreamLinkHandlerFactory.VIDEO_API_ENDPOINT + getId());
|
baseUrl + PeertubeStreamLinkHandlerFactory.VIDEO_API_ENDPOINT + getId());
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
|
|
|
@ -33,11 +33,13 @@ public class PeertubeTrendingExtractor extends KioskExtractor<StreamInfoItem> {
|
||||||
super(streamingService, linkHandler, kioskId);
|
super(streamingService, linkHandler, kioskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public String getName() throws ParsingException {
|
public String getName() throws ParsingException {
|
||||||
return getId();
|
return getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public InfoItemsPage<StreamInfoItem> getInitialPage() throws IOException, ExtractionException {
|
public InfoItemsPage<StreamInfoItem> getInitialPage() throws IOException, ExtractionException {
|
||||||
return getPage(new Page(getUrl() + "&" + START_KEY + "=0&"
|
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.MediaFormat;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class ItagItem {
|
public class ItagItem {
|
||||||
/**
|
/**
|
||||||
* List can be found here
|
* List can be found here
|
||||||
|
@ -96,6 +98,7 @@ public class ItagItem {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
public static ItagItem getItag(final int itagId) throws ParsingException {
|
public static ItagItem getItag(final int itagId) throws ParsingException {
|
||||||
for (final ItagItem item : ITAG_LIST) {
|
for (final ItagItem item : ITAG_LIST) {
|
||||||
if (itagId == item.id) {
|
if (itagId == item.id) {
|
||||||
|
|
|
@ -133,6 +133,7 @@ public class YoutubeSearchExtractor extends SearchExtractor {
|
||||||
return !showingResultsForRenderer.isEmpty();
|
return !showingResultsForRenderer.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public List<MetaInfo> getMetaInfo() throws ParsingException {
|
public List<MetaInfo> getMetaInfo() throws ParsingException {
|
||||||
return YoutubeParsingHelper.getMetaInfo(
|
return YoutubeParsingHelper.getMetaInfo(
|
||||||
|
|
Loading…
Reference in a new issue