Check if `SharedGroup` in a `Realm` is valid.
Goal
Checking if SharedGroup in a Realm is valid.
Expected Results
In BaseRealm.checkIfValid() method, we should check if SharedGroup is closed as well.
Actual Results
In BaseRealm.checkIfValid() method, it only checks if SharedGroupManager is null or closed.
Version of Realm and tooling
Realm version(s): 0.89.1 Android Studio version: N/A Which Android version and device: N/A
BaseRealm.checkIfValid() is supposed to be called in the same thread where the SharedGroup is in or with some proper locks (eg. locks on RealmCache). I think current
public boolean isOpen() {
return sharedGroup != null;
}
is good enough.
I agree. The current behaviour should be safe enough, and since this method is called extremely often, we should keep it as efficient as possible.
I'll close the issue.