{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cassandra/pulls/comments/204382546","pull_request_review_id":139450487,"id":204382546,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDM4MjU0Ng==","diff_hunk":"@@ -350,13 +396,38 @@ public static String getRelativePath(String basePath, String path)\n \n     public static void clean(ByteBuffer buffer)\n     {\n-        if (buffer == null)\n+        if (buffer == null || !buffer.isDirect())\n             return;\n-        if (isCleanerAvailable && buffer.isDirect())\n+\n+        // TODO Once we can get rid of Java 8, it's simpler to call sun.misc.Unsafe.invokeCleaner(ByteBuffer),\n+        // but need to take care of the attachment handling (i.e. whether 'buf' is a duplicate or slice) - that\n+        // is different in sun.misc.Unsafe.invokeCleaner and this implementation.\n+\n+        try\n         {\n-            DirectBuffer db = (DirectBuffer) buffer;\n-            if (db.cleaner() != null)\n-                db.cleaner().clean();\n+            if (buffer.isDirect())\n+            {\n+                Object cleaner = mhDirectBufferCleaner.bindTo(buffer).invoke();","path":"src/java/org/apache/cassandra/io/util/FileUtils.java","position":154,"original_position":154,"commit_id":"41ea5eb96c95d7896b452df7ae228ecccd95c660","original_commit_id":"41ea5eb96c95d7896b452df7ae228ecccd95c660","user":{"login":"snazy","id":957468,"node_id":"MDQ6VXNlcjk1NzQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/957468?v=4","gravatar_id":"","url":"https://api.github.com/users/snazy","html_url":"https://github.com/snazy","followers_url":"https://api.github.com/users/snazy/followers","following_url":"https://api.github.com/users/snazy/following{/other_user}","gists_url":"https://api.github.com/users/snazy/gists{/gist_id}","starred_url":"https://api.github.com/users/snazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snazy/subscriptions","organizations_url":"https://api.github.com/users/snazy/orgs","repos_url":"https://api.github.com/users/snazy/repos","events_url":"https://api.github.com/users/snazy/events{/privacy}","received_events_url":"https://api.github.com/users/snazy/received_events","type":"User","site_admin":false},"body":"Woops. There shouldn't be any else.","created_at":"2018-07-23T12:30:30Z","updated_at":"2018-07-23T12:30:31Z","html_url":"https://github.com/apache/cassandra/pull/236#discussion_r204382546","pull_request_url":"https://api.github.com/repos/apache/cassandra/pulls/236","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/cassandra/pulls/comments/204382546"},"html":{"href":"https://github.com/apache/cassandra/pull/236#discussion_r204382546"},"pull_request":{"href":"https://api.github.com/repos/apache/cassandra/pulls/236"}},"in_reply_to_id":204370957},"pull_request":{"url":"https://api.github.com/repos/apache/cassandra/pulls/236","id":195351190,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzUxMTkw","html_url":"https://github.com/apache/cassandra/pull/236","diff_url":"https://github.com/apache/cassandra/pull/236.diff","patch_url":"https://github.com/apache/cassandra/pull/236.patch","issue_url":"https://api.github.com/repos/apache/cassandra/issues/236","number":236,"state":"open","locked":false,"title":"9608 trunk","user":{"login":"jasobrown","id":1398849,"node_id":"MDQ6VXNlcjEzOTg4NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1398849?v=4","gravatar_id":"","url":"https://api.github.com/users/jasobrown","html_url":"https://github.com/jasobrown","followers_url":"https://api.github.com/users/jasobrown/followers","following_url":"https://api.github.com/users/jasobrown/following{/other_user}","gists_url":"https://api.github.com/users/jasobrown/gists{/gist_id}","starred_url":"https://api.github.com/users/jasobrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasobrown/subscriptions","organizations_url":"https://api.github.com/users/jasobrown/orgs","repos_url":"https://api.github.com/users/jasobrown/repos","events_url":"https://api.github.com/users/jasobrown/events{/privacy}","received_events_url":"https://api.github.com/users/jasobrown/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-16T22:10:23Z","updated_at":"2018-07-23T12:30:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e160bab2291b04ac61c0d88eaf708853e23db995","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/cassandra/pulls/236/commits","review_comments_url":"https://api.github.com/repos/apache/cassandra/pulls/236/comments","review_comment_url":"https://api.github.com/repos/apache/cassandra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cassandra/issues/236/comments","statuses_url":"https://api.github.com/repos/apache/cassandra/statuses/41ea5eb96c95d7896b452df7ae228ecccd95c660","head":{"label":"snazy:9608-trunk","ref":"9608-trunk","sha":"41ea5eb96c95d7896b452df7ae228ecccd95c660","user":{"login":"snazy","id":957468,"node_id":"MDQ6VXNlcjk1NzQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/957468?v=4","gravatar_id":"","url":"https://api.github.com/users/snazy","html_url":"https://github.com/snazy","followers_url":"https://api.github.com/users/snazy/followers","following_url":"https://api.github.com/users/snazy/following{/other_user}","gists_url":"https://api.github.com/users/snazy/gists{/gist_id}","starred_url":"https://api.github.com/users/snazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snazy/subscriptions","organizations_url":"https://api.github.com/users/snazy/orgs","repos_url":"https://api.github.com/users/snazy/repos","events_url":"https://api.github.com/users/snazy/events{/privacy}","received_events_url":"https://api.github.com/users/snazy/received_events","type":"User","site_admin":false},"repo":{"id":21100244,"node_id":"MDEwOlJlcG9zaXRvcnkyMTEwMDI0NA==","name":"cassandra","full_name":"snazy/cassandra","owner":{"login":"snazy","id":957468,"node_id":"MDQ6VXNlcjk1NzQ2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/957468?v=4","gravatar_id":"","url":"https://api.github.com/users/snazy","html_url":"https://github.com/snazy","followers_url":"https://api.github.com/users/snazy/followers","following_url":"https://api.github.com/users/snazy/following{/other_user}","gists_url":"https://api.github.com/users/snazy/gists{/gist_id}","starred_url":"https://api.github.com/users/snazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snazy/subscriptions","organizations_url":"https://api.github.com/users/snazy/orgs","repos_url":"https://api.github.com/users/snazy/repos","events_url":"https://api.github.com/users/snazy/events{/privacy}","received_events_url":"https://api.github.com/users/snazy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snazy/cassandra","description":"Mirror of Apache Cassandra","fork":true,"url":"https://api.github.com/repos/snazy/cassandra","forks_url":"https://api.github.com/repos/snazy/cassandra/forks","keys_url":"https://api.github.com/repos/snazy/cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snazy/cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snazy/cassandra/teams","hooks_url":"https://api.github.com/repos/snazy/cassandra/hooks","issue_events_url":"https://api.github.com/repos/snazy/cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/snazy/cassandra/events","assignees_url":"https://api.github.com/repos/snazy/cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/snazy/cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/snazy/cassandra/tags","blobs_url":"https://api.github.com/repos/snazy/cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snazy/cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snazy/cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/snazy/cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snazy/cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/snazy/cassandra/languages","stargazers_url":"https://api.github.com/repos/snazy/cassandra/stargazers","contributors_url":"https://api.github.com/repos/snazy/cassandra/contributors","subscribers_url":"https://api.github.com/repos/snazy/cassandra/subscribers","subscription_url":"https://api.github.com/repos/snazy/cassandra/subscription","commits_url":"https://api.github.com/repos/snazy/cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/snazy/cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/snazy/cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/snazy/cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/snazy/cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/snazy/cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snazy/cassandra/merges","archive_url":"https://api.github.com/repos/snazy/cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snazy/cassandra/downloads","issues_url":"https://api.github.com/repos/snazy/cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/snazy/cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/snazy/cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/snazy/cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snazy/cassandra/labels{/name}","releases_url":"https://api.github.com/repos/snazy/cassandra/releases{/id}","deployments_url":"https://api.github.com/repos/snazy/cassandra/deployments","created_at":"2014-06-22T17:39:52Z","updated_at":"2018-06-15T12:41:55Z","pushed_at":"2018-07-23T10:40:01Z","git_url":"git://github.com/snazy/cassandra.git","ssh_url":"git@github.com:snazy/cassandra.git","clone_url":"https://github.com/snazy/cassandra.git","svn_url":"https://github.com/snazy/cassandra","homepage":"http://cassandra.apache.org","size":351099,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"176d4bac22c356c80e275dcb4040bc5cbd0da1c2","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":206424,"node_id":"MDEwOlJlcG9zaXRvcnkyMDY0MjQ=","name":"cassandra","full_name":"apache/cassandra","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cassandra","description":"Mirror of Apache Cassandra","fork":false,"url":"https://api.github.com/repos/apache/cassandra","forks_url":"https://api.github.com/repos/apache/cassandra/forks","keys_url":"https://api.github.com/repos/apache/cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cassandra/teams","hooks_url":"https://api.github.com/repos/apache/cassandra/hooks","issue_events_url":"https://api.github.com/repos/apache/cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cassandra/events","assignees_url":"https://api.github.com/repos/apache/cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cassandra/tags","blobs_url":"https://api.github.com/repos/apache/cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cassandra/languages","stargazers_url":"https://api.github.com/repos/apache/cassandra/stargazers","contributors_url":"https://api.github.com/repos/apache/cassandra/contributors","subscribers_url":"https://api.github.com/repos/apache/cassandra/subscribers","subscription_url":"https://api.github.com/repos/apache/cassandra/subscription","commits_url":"https://api.github.com/repos/apache/cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cassandra/merges","archive_url":"https://api.github.com/repos/apache/cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cassandra/downloads","issues_url":"https://api.github.com/repos/apache/cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cassandra/labels{/name}","releases_url":"https://api.github.com/repos/apache/cassandra/releases{/id}","deployments_url":"https://api.github.com/repos/apache/cassandra/deployments","created_at":"2009-05-21T02:10:09Z","updated_at":"2018-07-23T08:19:42Z","pushed_at":"2018-07-23T10:40:05Z","git_url":"git://github.com/apache/cassandra.git","ssh_url":"git@github.com:apache/cassandra.git","clone_url":"https://github.com/apache/cassandra.git","svn_url":"https://github.com/apache/cassandra","homepage":"http://cassandra.apache.org","size":268256,"stargazers_count":4529,"watchers_count":4529,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2075,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2075,"open_issues":84,"watchers":4529,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cassandra/pulls/236"},"html":{"href":"https://github.com/apache/cassandra/pull/236"},"issue":{"href":"https://api.github.com/repos/apache/cassandra/issues/236"},"comments":{"href":"https://api.github.com/repos/apache/cassandra/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cassandra/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cassandra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cassandra/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cassandra/statuses/41ea5eb96c95d7896b452df7ae228ecccd95c660"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"snazy"}}