Skip to content

Fix issues when application settings has null values for category, description, icon and title #1475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ public Mono<String> getCategory(ApplicationRecordService applicationRecordServic
if (liveDSL == null || liveDSL.get("settings") == null) return "";
Object settingsObject = liveDSL.get("settings");
if (settingsObject instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> settings = (Map<String, Object>) liveDSL.get("settings");
return (String) settings.get("category");
Map<?, ?> settings = (Map<?, ?>) liveDSL.get("settings");
Object category = settings.get("category");
return (category != null & category instanceof String)?(String) category:"";
} else {
return "";
}
Expand All @@ -186,9 +186,9 @@ public Mono<String> getTitle(ApplicationRecordService applicationRecordService)
if (liveDSL == null || liveDSL.get("settings") == null) return "";
Object settingsObject = liveDSL.get("settings");
if (settingsObject instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> settings = (Map<String, Object>) liveDSL.get("settings");
return (String) settings.get("title");
Map<?, ?> settings = (Map<?, ?>) liveDSL.get("settings");
Object title = settings.get("title");
return (title != null & title instanceof String)?(String) title:"";
} else {
return "";
}
Expand All @@ -200,9 +200,9 @@ public Mono<String> getDescription(ApplicationRecordService applicationRecordSer
if (liveDSL == null || liveDSL.get("settings") == null) return "";
Object settingsObject = liveDSL.get("settings");
if (settingsObject instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> settings = (Map<String, Object>) liveDSL.get("settings");
return (String) settings.get("description");
Map<?, ?> settings = (Map<?, ?>) liveDSL.get("settings");
Object description = settings.get("description");
return (description != null & description instanceof String)?(String) description:"";
} else {
return "";
}
Expand All @@ -215,9 +215,9 @@ public Mono<String> getIcon(ApplicationRecordService applicationRecordService) {
if (liveDSL == null || liveDSL.get("settings") == null) return "";
Object settingsObject = liveDSL.get("settings");
if (settingsObject instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> settings = (Map<String, Object>) liveDSL.get("settings");
return (String) settings.get("icon");
Map<?, ?> settings = (Map<?, ?>) liveDSL.get("settings");
Object icon = settings.get("icon");
return (icon != null & icon instanceof String)?(String) icon:"";
} else {
return "";
}
Expand Down
Loading