Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Conversation

@bd2019us
Copy link

@bd2019us bd2019us commented Apr 14, 2019

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [EAGLE-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

final JSONObject jsonBeansObject = new JSONObject(tokener);
final JSONArray jsonArray = jsonBeansObject.getJSONArray("beans");
final JSONArray jsonArray = jsonBeansObject.optJSONArray("beans");
int size = jsonArray.length();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if jsonArray is going to be null, can u add that handling as well ? Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @jhsenjaliya, this change will incur the NPE issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants