mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Make store wrapper more resilient
This commit is contained in:
parent
0620fe1d2a
commit
e26240ac1f
1 changed files with 12 additions and 12 deletions
|
@ -151,7 +151,7 @@ public class StoreEntryWrapper {
|
||||||
summary.setValue(null);
|
summary.setValue(null);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
summary.setValue(entry.getProvider().summaryString(this));
|
summary.setValue(entry.getProvider() != null ? entry.getProvider().summaryString(this) : null);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// Summary creation might fail or have a bug
|
// Summary creation might fail or have a bug
|
||||||
ErrorEvent.fromThrowable(ex).handle();
|
ErrorEvent.fromThrowable(ex).handle();
|
||||||
|
@ -162,6 +162,7 @@ public class StoreEntryWrapper {
|
||||||
actionProviders.clear();
|
actionProviders.clear();
|
||||||
defaultActionProvider.setValue(null);
|
defaultActionProvider.setValue(null);
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
var defaultProvider = ActionProvider.ALL.stream()
|
var defaultProvider = ActionProvider.ALL.stream()
|
||||||
.filter(e -> entry.getStore() != null
|
.filter(e -> entry.getStore() != null
|
||||||
&& e.getDefaultDataStoreCallSite() != null
|
&& e.getDefaultDataStoreCallSite() != null
|
||||||
|
@ -173,7 +174,6 @@ public class StoreEntryWrapper {
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
this.defaultActionProvider.setValue(defaultProvider);
|
this.defaultActionProvider.setValue(defaultProvider);
|
||||||
|
|
||||||
try {
|
|
||||||
var newProviders = ActionProvider.ALL.stream()
|
var newProviders = ActionProvider.ALL.stream()
|
||||||
.filter(dataStoreActionProvider -> {
|
.filter(dataStoreActionProvider -> {
|
||||||
return showActionProvider(dataStoreActionProvider);
|
return showActionProvider(dataStoreActionProvider);
|
||||||
|
|
Loading…
Reference in a new issue