Skip to content

Commit

Permalink
Suppressed warning
Browse files Browse the repository at this point in the history
There seems to be a bug in the kotlin plugin as it tells you when building that this can't be null:
"Condition 'throwable != null' is always 'true'"
However it can indeed be null as seen in TeamNewPipe#6986 (comment)
  • Loading branch information
litetex committed Aug 27, 2021
1 parent b061423 commit f18a7c9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ class FeedLoadService : Service() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { _, throwable ->
// There seems to be a bug in the kotlin plugin as it tells you when
// building that this can't be null:
// "Condition 'throwable != null' is always 'true'"
// However it can indeed be null
// The suppression may be removed in further versions
@Suppress("SENSELESS_COMPARISON")
if (throwable != null) {
Log.e(TAG, "Error while storing result", throwable)
handleError(throwable)
Expand Down

0 comments on commit f18a7c9

Please sign in to comment.