From a17f24912f262c79d1822e3df389ab08d4cb0273 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Fri, 29 May 2020 14:53:24 -0400 Subject: [PATCH] Remove unnecessary conditions --- .../java/de/danoeh/antennapod/activity/MediaplayerActivity.java | 2 +- .../main/java/de/danoeh/antennapod/core/feed/FeedComponent.java | 2 +- .../antennapod/core/service/download/DownloadRequest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index 886835095..61cbcbb01 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -305,7 +305,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements return false; } Playable media = controller.getMedia(); - boolean isFeedMedia = media != null && (media instanceof FeedMedia); + boolean isFeedMedia = (media instanceof FeedMedia); menu.findItem(R.id.open_feed_item).setVisible(isFeedMedia); // FeedMedia implies it belongs to a Feed diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java index 2610d253f..3edecd35c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java @@ -50,7 +50,7 @@ public abstract class FeedComponent { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || !(o instanceof FeedComponent)) return false; + if (!(o instanceof FeedComponent)) return false; FeedComponent that = (FeedComponent) o; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java index 78c4d3f48..3f503c6b4 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java @@ -115,7 +115,7 @@ public class DownloadRequest implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || !(o instanceof DownloadRequest)) return false; + if (!(o instanceof DownloadRequest)) return false; DownloadRequest that = (DownloadRequest) o;