You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eagle.apache.org by "bd2019us (JIRA)" <ji...@apache.org> on 2019/04/14 01:35:00 UTC

[jira] [Updated] (EAGLE-1096) getJSONArray may cause exception, optJSONArray should be used

     [ https://issues.apache.org/jira/browse/EAGLE-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bd2019us updated EAGLE-1096:
----------------------------
    Attachment:     (was: 1.patch)

> getJSONArray may cause exception, optJSONArray should be used
> -------------------------------------------------------------
>
>                 Key: EAGLE-1096
>                 URL: https://issues.apache.org/jira/browse/EAGLE-1096
>             Project: Eagle
>          Issue Type: Bug
>            Reporter: bd2019us
>            Priority: Major
>         Attachments: 1.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hello,
> The method call jsonBeansObject.getJSONArray("beans")  may throw JSONException when the key does not exist, which will crash the program. To ensure safety, optJSONArray is recommended to use, which will avoid the exception in case no such key.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)