Created
March 20, 2019 08:17
-
-
Save manuelvicnt/bf0e2c65083c48c29aba1207d2b59f61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MainThread | |
final void clear() { | |
mCleared = true; | |
// Since clear() is final, this method is still called on mock | |
// objects and in those cases, mBagOfTags is null. It'll always | |
// be empty though because setTagIfAbsent and getTag are not | |
// final so we can skip clearing it | |
if (mBagOfTags != null) { | |
for (Object value : mBagOfTags.values()) { | |
// see comment for the similar call in setTagIfAbsent | |
closeWithRuntimeException(value); | |
} | |
} | |
onCleared(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment