Skip to content
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

Moved JSON to HashMap cast into try-catch block #377

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -166,11 +166,11 @@ class ButtonWidget : AppWidgetProvider() {
Log.w(TAG, "Service Call Data incomplete. Aborting service call")
} else {
// If everything loaded correctly, package the service data and attempt the call

// Convert JSON to HashMap
val serviceDataMap = Gson().fromJson(serviceDataJson, HashMap<String, Any>()::class.java)

try {
// Convert JSON to HashMap
val serviceDataMap =
Gson().fromJson(serviceDataJson, HashMap<String, Any>()::class.java)

integrationUseCase.callService(domain, service, serviceDataMap)

// If service call does not throw an exception, send positive feedback
Expand Down