android-testing icon indicating copy to clipboard operation
android-testing copied to clipboard

Update LiveDataTestUtil.kt

Open al-zy-naf opened this issue 4 years ago • 2 comments

I think we should use catch instead of finally because finally is always executed.

Imagine when the LiveData value was set, the Observer.onChanged() method is triggered and removing the observer on [email protected](this). So when we using finally, the Observer which we deleted earlier will be removed again which would be wasting.

al-zy-naf avatar Mar 29 '21 00:03 al-zy-naf

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Mar 29 '21 00:03 google-cla[bot]

@googlebot I signed it!

al-zy-naf avatar Mar 29 '21 00:03 al-zy-naf