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 9 months ago
parent adbbdc7a5b
commit 8c1041def6
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
  1. 2
      extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java
  2. 5
      extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeCommentsExtractor.java
  3. 1
      extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeSearchExtractor.java
  4. 3
      extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java
  5. 2
      extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeTrendingExtractor.java
  6. 3
      extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/ItagItem.java
  7. 1
      extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSearchExtractor.java

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

Loading…
Cancel
Save