[
https://issues.apache.org/jira/browse/UNOMI-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
bd2019us updated UNOMI-224:
---------------------------
Labels: pull-request-available (was: )
> JSONObject.getString() may cause exception, optString() should be used.
> -----------------------------------------------------------------------
>
> Key: UNOMI-224
> URL: https://issues.apache.org/jira/browse/UNOMI-224
> Project: Apache Unomi
> Issue Type: Bug
> Reporter: bd2019us
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Location :
> tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/impl/MigrationTo121.java:104,106,116
> The method JSONObject.getString(key) may throw JSONException when the key
> does not exist, which will crash the program. To ensure safety, the
> JSONObject.optString(key) should be used, which will return a default value
> ("") when the key does not exist and avoid program to crash.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)