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

44: GitHubApplication should not use a JSONParser instance #30

Closed
wants to merge 1 commit into from

Conversation

@edvbld
Copy link
Member

edvbld commented Jul 5, 2019

Hi all,

a JSONParser instance is not thread-safe and it is therefore a little dangerous to create instances of it if that instance might end up being accessible by multiple threads. We have such a case in GitHubApplication. Since a JSONParser is very cheap to allocate (it only has an int and a pointer) I decided to make JSONParser package private thereby forcing all callers to use JSON.parse.

Thanks,
Erik

Testing

  • sh gradlew test on Linux x86-64

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Approvers

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 5, 2019

👋 Welcome back ehelin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@openjdk openjdk bot added the rfr label Jul 5, 2019
@mlbridge
Copy link

mlbridge bot commented Jul 5, 2019

Webrevs

Copy link
Member

rwestberg left a comment

Looks good, thanks for fixing!

@openjdk openjdk bot removed the rfr label Jul 5, 2019
@openjdk
Copy link

openjdk bot commented Jul 5, 2019

@edvbld This change can now be integrated. The commit message will be:

44: GitHubApplication should not use a JSONParser instance

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To list additional contributors, use the /contributor command.
  • To integrate this PR with the above commit message, type /integrate in a new comment.
@openjdk openjdk bot added the ready label Jul 5, 2019
@edvbld
Copy link
Member Author

edvbld commented Jul 5, 2019

/integrate

@openjdk openjdk bot closed this Jul 5, 2019
@openjdk
Copy link

openjdk bot commented Jul 5, 2019

@edvbld Pushed as commit 6746b03.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.