Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kamikatze2008
Copy link
Contributor

@kamikatze2008 kamikatze2008 commented Sep 13, 2024

Description

...

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

)
}
}
val event = cachedEvents[firstKey]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this always works?

Copy link
Collaborator

@CherryPerry CherryPerry Sep 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is a good question. But it is true for the previous implementation too.

.let { key ->
  Observable.fromIterable(cachedEvents[key])
  ...
}

RxJava2 version does not have @NonNull annotation, so Kotlin compiler allows passing a nullable value here, while it will still throw an exception in runtime.

RxJava3 version now has @NonNull annotation, so Kotlin compiler is more strict here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt it worked fine in the previous version as well. Because the result of the subscription is not used anywhere, hence there’s no manual unsubscribe implemented.

@CherryPerry CherryPerry merged commit 33f2c45 into badoo:master Apr 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants