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

Development for stleary#516 completed with rebased repository #524

Conversation

viveksacademia4git
Copy link
Contributor

  • Introduced JSONObject(int) constructor.

    • param - int > Initial capacity of the underlying data structure
  • Test for new introduced JSONArray(int) constructor.

    1. Checked with input parameter: 0
    2. Checked with input parameter: positive number
    3. Checked with positive number input parameter and compared length
    4. If the input parameter is negative number JSONException is thrown:
      JSONArray's initial capacity cannot be negative.

- Introduced JSONObject(int) constructor.
   - int > Initial capacity of the underlying data structure

- Test for new introduced JSONArray(int) constructor.
   1. Checked with input parameter: 0
   2. Checked with input parameter: positive number
   3. Checked with positive number input parameter and compared length
   4. If input parameter is negative number JSONException is thrown:
         JSONArray initial capacity cannot be negative.
Copy link
Contributor

@johnjaylward johnjaylward left a comment

Choose a reason for hiding this comment

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

looks good

@stleary
Copy link
Owner

stleary commented Jun 3, 2020

PRs are temporarily on hold, see #523. I will review when the issues are resolved.

@stleary
Copy link
Owner

stleary commented Jun 7, 2020

What problem does this code solve?
This is an enhancement to allow users to allocate very large JSONArrays in the constructor

Risks
Low

Changes to the API?
No

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No

Was any code refactored in this commit?
No

Review status
APPROVED

Starting 3 day comment window.

@stleary stleary merged commit 9de9743 into stleary:master Jun 12, 2020
This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants