Skip to content

Commit f18a7c9

Browse files
committed
Suppressed warning
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 #6986 (comment)
1 parent b061423 commit f18a7c9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ class FeedLoadService : Service() {
300300
.subscribeOn(Schedulers.io())
301301
.observeOn(AndroidSchedulers.mainThread())
302302
.subscribe { _, throwable ->
303+
// There seems to be a bug in the kotlin plugin as it tells you when
304+
// building that this can't be null:
305+
// "Condition 'throwable != null' is always 'true'"
306+
// However it can indeed be null
307+
// The suppression may be removed in further versions
308+
@Suppress("SENSELESS_COMPARISON")
303309
if (throwable != null) {
304310
Log.e(TAG, "Error while storing result", throwable)
305311
handleError(throwable)

0 commit comments

Comments
 (0)