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
pull/822/head
Stypox 2022-03-17 16:25:49 +01:00
rodzic adbbdc7a5b
commit 8c1041def6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4BDF1B40A49FDD23
7 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -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());

Wyświetl plik

@ -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) {
}
}

Wyświetl plik

@ -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&"

Wyświetl plik

@ -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) {

Wyświetl plik

@ -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&"

Wyświetl plik

@ -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) {

Wyświetl plik

@ -133,6 +133,7 @@ public class YoutubeSearchExtractor extends SearchExtractor {
return !showingResultsForRenderer.isEmpty();
}
@Nonnull
@Override
public List<MetaInfo> getMetaInfo() throws ParsingException {
return YoutubeParsingHelper.getMetaInfo(