{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/132824248","pull_request_review_id":55949515,"id":132824248,"diff_hunk":"@@ -1385,6 +1388,19 @@ public static AsciiString of(CharSequence string) {\n     }\n \n     /**\n+     * Returns an {@link AsciiString} containing the given string.","path":"common/src/main/java/io/netty/util/AsciiString.java","position":46,"original_position":46,"commit_id":"5dd03a1cd44d28e5fee8b4fcb86a29f542cc6a74","original_commit_id":"5dd03a1cd44d28e5fee8b4fcb86a29f542cc6a74","user":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars0.githubusercontent.com/u/7562868?v=4","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"body":"`containing the given string.` -> `and retains/caches the input string for later use in {@link #toString()}`","created_at":"2017-08-12T18:43:46Z","updated_at":"2017-08-12T18:44:20Z","html_url":"https://github.com/netty/netty/pull/7060#discussion_r132824248","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/7060","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/132824248"},"html":{"href":"https://github.com/netty/netty/pull/7060#discussion_r132824248"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/7060"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/7060","id":134518972,"html_url":"https://github.com/netty/netty/pull/7060","diff_url":"https://github.com/netty/netty/pull/7060.diff","patch_url":"https://github.com/netty/netty/pull/7060.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/7060","number":7060,"state":"open","locked":false,"title":"Immediate caching the wrapped string value in AsciiString","user":{"login":"fenik17","id":20779569,"avatar_url":"https://avatars3.githubusercontent.com/u/20779569?v=4","gravatar_id":"","url":"https://api.github.com/users/fenik17","html_url":"https://github.com/fenik17","followers_url":"https://api.github.com/users/fenik17/followers","following_url":"https://api.github.com/users/fenik17/following{/other_user}","gists_url":"https://api.github.com/users/fenik17/gists{/gist_id}","starred_url":"https://api.github.com/users/fenik17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenik17/subscriptions","organizations_url":"https://api.github.com/users/fenik17/orgs","repos_url":"https://api.github.com/users/fenik17/repos","events_url":"https://api.github.com/users/fenik17/events{/privacy}","received_events_url":"https://api.github.com/users/fenik17/received_events","type":"User","site_admin":false},"body":"Motivation:\r\nThe `AsciiString#toString` method calculate string value and cache it into field. If an `AsciiString` created from the `String` value, we can avoid rebuilding strings if we cache them immediately when creating `AsciiString`. It would be useful for constants strings, which already stored in the JVMs string table, or in cases where an unavoidable `#toString `method call is assumed.\r\n\r\nModifications:\r\n- Add new static method `AsciiString#cache(String)` which save string value into cache field.\r\n- Apply a \"benign\" data race in the `#hashCode` and `#toString` methods.\r\n\r\nResult:\r\nLess memory usage in some `AsciiString` use cases.","created_at":"2017-08-07T20:23:36Z","updated_at":"2017-08-12T18:44:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"106914555e95d69c78224b2aed206df6321e9e60","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/netty/netty/pulls/7060/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/7060/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/7060/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/5dd03a1cd44d28e5fee8b4fcb86a29f542cc6a74","head":{"label":"fenik17:ascii_to_string","ref":"ascii_to_string","sha":"5dd03a1cd44d28e5fee8b4fcb86a29f542cc6a74","user":{"login":"fenik17","id":20779569,"avatar_url":"https://avatars3.githubusercontent.com/u/20779569?v=4","gravatar_id":"","url":"https://api.github.com/users/fenik17","html_url":"https://github.com/fenik17","followers_url":"https://api.github.com/users/fenik17/followers","following_url":"https://api.github.com/users/fenik17/following{/other_user}","gists_url":"https://api.github.com/users/fenik17/gists{/gist_id}","starred_url":"https://api.github.com/users/fenik17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenik17/subscriptions","organizations_url":"https://api.github.com/users/fenik17/orgs","repos_url":"https://api.github.com/users/fenik17/repos","events_url":"https://api.github.com/users/fenik17/events{/privacy}","received_events_url":"https://api.github.com/users/fenik17/received_events","type":"User","site_admin":false},"repo":{"id":82708489,"name":"netty","full_name":"fenik17/netty","owner":{"login":"fenik17","id":20779569,"avatar_url":"https://avatars3.githubusercontent.com/u/20779569?v=4","gravatar_id":"","url":"https://api.github.com/users/fenik17","html_url":"https://github.com/fenik17","followers_url":"https://api.github.com/users/fenik17/followers","following_url":"https://api.github.com/users/fenik17/following{/other_user}","gists_url":"https://api.github.com/users/fenik17/gists{/gist_id}","starred_url":"https://api.github.com/users/fenik17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenik17/subscriptions","organizations_url":"https://api.github.com/users/fenik17/orgs","repos_url":"https://api.github.com/users/fenik17/repos","events_url":"https://api.github.com/users/fenik17/events{/privacy}","received_events_url":"https://api.github.com/users/fenik17/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fenik17/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/fenik17/netty","forks_url":"https://api.github.com/repos/fenik17/netty/forks","keys_url":"https://api.github.com/repos/fenik17/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fenik17/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fenik17/netty/teams","hooks_url":"https://api.github.com/repos/fenik17/netty/hooks","issue_events_url":"https://api.github.com/repos/fenik17/netty/issues/events{/number}","events_url":"https://api.github.com/repos/fenik17/netty/events","assignees_url":"https://api.github.com/repos/fenik17/netty/assignees{/user}","branches_url":"https://api.github.com/repos/fenik17/netty/branches{/branch}","tags_url":"https://api.github.com/repos/fenik17/netty/tags","blobs_url":"https://api.github.com/repos/fenik17/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fenik17/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fenik17/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/fenik17/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fenik17/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/fenik17/netty/languages","stargazers_url":"https://api.github.com/repos/fenik17/netty/stargazers","contributors_url":"https://api.github.com/repos/fenik17/netty/contributors","subscribers_url":"https://api.github.com/repos/fenik17/netty/subscribers","subscription_url":"https://api.github.com/repos/fenik17/netty/subscription","commits_url":"https://api.github.com/repos/fenik17/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/fenik17/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/fenik17/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/fenik17/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/fenik17/netty/contents/{+path}","compare_url":"https://api.github.com/repos/fenik17/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fenik17/netty/merges","archive_url":"https://api.github.com/repos/fenik17/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fenik17/netty/downloads","issues_url":"https://api.github.com/repos/fenik17/netty/issues{/number}","pulls_url":"https://api.github.com/repos/fenik17/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/fenik17/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/fenik17/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fenik17/netty/labels{/name}","releases_url":"https://api.github.com/repos/fenik17/netty/releases{/id}","deployments_url":"https://api.github.com/repos/fenik17/netty/deployments","created_at":"2017-02-21T17:37:03Z","updated_at":"2017-02-21T17:37:16Z","pushed_at":"2017-08-12T18:15:04Z","git_url":"git://github.com/fenik17/netty.git","ssh_url":"git@github.com:fenik17/netty.git","clone_url":"https://github.com/fenik17/netty.git","svn_url":"https://github.com/fenik17/netty","homepage":"http://netty.io/","size":46439,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"4.1"}},"base":{"label":"netty:4.1","ref":"4.1","sha":"8be9a63c1c4beb3f43ffcc3ea978e67f138b5050","user":{"login":"netty","id":473791,"avatar_url":"https://avatars1.githubusercontent.com/u/473791?v=4","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars1.githubusercontent.com/u/473791?v=4","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","deployments_url":"https://api.github.com/repos/netty/netty/deployments","created_at":"2010-11-09T09:22:21Z","updated_at":"2017-08-12T16:00:15Z","pushed_at":"2017-08-12T18:20:18Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":48576,"stargazers_count":10886,"watchers_count":10886,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5208,"mirror_url":null,"open_issues_count":367,"forks":5208,"open_issues":367,"watchers":10886,"default_branch":"4.1"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/7060"},"html":{"href":"https://github.com/netty/netty/pull/7060"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/7060"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/7060/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/7060/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/7060/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/5dd03a1cd44d28e5fee8b4fcb86a29f542cc6a74"}}}}
{"actor":{"display_login":"Scottmitch"}}