Prevent NPE on close() if postInit() hasn't been called

Closes #20977
This commit is contained in:
Alexander Schwartz 2023-06-13 18:08:14 +02:00 committed by Hynek Mlnařík
parent c0ac409974
commit f0f664dbb5
2 changed files with 6 additions and 2 deletions

View file

@ -67,8 +67,10 @@ public class JpaRealmProviderFactory implements RealmProviderFactory, ProviderEv
@Override
public void close() {
if (onClose != null) {
onClose.run();
}
}
@Override
public void onEvent(ProviderEvent event) {

View file

@ -66,8 +66,10 @@ public class LegacyDatastoreProviderFactory implements DatastoreProviderFactory,
@Override
public void close() {
if (onClose != null) {
onClose.run();
}
}
@Override
public String getId() {