Use correct `NonNull`

This commit is contained in:
litetex 2022-06-22 19:54:46 +02:00 committed by Stypox
parent 4e285a4e70
commit 155c6e94a3
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23

View file

@ -6,6 +6,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.preference.PreferenceManager;
@ -24,8 +25,6 @@ import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull;
public final class ServiceHelper {
private static final StreamingService DEFAULT_FALLBACK_SERVICE = ServiceList.YouTube;
@ -135,7 +134,7 @@ public final class ServiceHelper {
}
}
@Nonnull
@NonNull
public static String getNameOfServiceById(final int serviceId) {
return ServiceList.all().stream()
.filter(s -> s.getServiceId() == serviceId)