{"action":"created","comment":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/261296017","pull_request_review_id":209198796,"id":261296017,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MTI5NjAxNw==","diff_hunk":"@@ -0,0 +1,68 @@\n+/* This file is part of VoltDB.\n+ * Copyright (C) 2008-2019 VoltDB Inc.\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU Affero General Public License as\n+ * published by the Free Software Foundation, either version 3 of the\n+ * License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU Affero General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public License\n+ * along with VoltDB.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+package org.voltcore.utils;\n+import sun.misc.Unsafe;\n+\n+import java.lang.reflect.InvocationTargetException;\n+import java.lang.reflect.Method;\n+import java.nio.ByteBuffer;\n+\n+/**\n+ * {@link DirectBufferCleaner} implementation based on {@code Unsafe.invokeCleaner} method.\n+ *\n+ * Note: This implementation will work only for Java 9+.\n+ */\n+public class UnsafeDirectBufferCleaner implements DirectBufferCleaner {\n+    /** Cleaner method. */\n+    private final Method cleanerMtd;\n+\n+    /** Cleaner method. */\n+    private final Method invokeCleanerMtd;\n+\n+    /** */\n+    public UnsafeDirectBufferCleaner() {\n+        try {\n+            cleanerMtd = Class.forName(\"sun.nio.ch.DirectBuffer\").getMethod(\"cleaner\");\n+        }\n+        catch (ClassNotFoundException | NoSuchMethodException e) {\n+            throw new RuntimeException(\"No sun.nio.ch.DirectBuffer.cleaner() method found\", e);\n+        }\n+\n+        try {\n+            invokeCleanerMtd = Unsafe.class.getMethod(\"invokeCleaner\", ByteBuffer.class);\n+        }\n+        catch (NoSuchMethodException e) {\n+            throw new RuntimeException(\"Reflection failure: no sun.misc.Unsafe.invokeCleaner() method found\", e);\n+        }\n+    }\n+\n+    /** {@inheritDoc} */\n+    @Override public boolean clean(ByteBuffer buf) {\n+        try {\n+            Object cleaner = cleanerMtd.invoke(buf);\n+            if (cleaner == null) {\n+                return false;\n+            }\n+            VoltUnsafe.invoke(invokeCleanerMtd, buf);\n+            return true;\n+        }\n+        catch (IllegalAccessException | InvocationTargetException e) {","path":"src/frontend/org/voltcore/utils/UnsafeDirectBufferCleaner.java","position":64,"original_position":64,"commit_id":"700f57285c25da58af6fbf0a60126f79dfd9aeb3","original_commit_id":"700f57285c25da58af6fbf0a60126f79dfd9aeb3","user":{"login":"n3world","id":4061525,"node_id":"MDQ6VXNlcjQwNjE1MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/4061525?v=4","gravatar_id":"","url":"https://api.github.com/users/n3world","html_url":"https://github.com/n3world","followers_url":"https://api.github.com/users/n3world/followers","following_url":"https://api.github.com/users/n3world/following{/other_user}","gists_url":"https://api.github.com/users/n3world/gists{/gist_id}","starred_url":"https://api.github.com/users/n3world/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n3world/subscriptions","organizations_url":"https://api.github.com/users/n3world/orgs","repos_url":"https://api.github.com/users/n3world/repos","events_url":"https://api.github.com/users/n3world/events{/privacy}","received_events_url":"https://api.github.com/users/n3world/received_events","type":"User","site_admin":false},"body":"Sometimes the catch is being put on the same line as the close `}` and sometimes it is on the next line. It would be good to be consistent with formatting since that makes it easier to read","created_at":"2019-02-28T17:11:45Z","updated_at":"2019-02-28T17:11:50Z","html_url":"https://github.com/VoltDB/voltdb/pull/5968#discussion_r261296017","pull_request_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/261296017"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/5968#discussion_r261296017"},"pull_request":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968"}}},"pull_request":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968","id":257132193,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU3MTMyMTkz","html_url":"https://github.com/VoltDB/voltdb/pull/5968","diff_url":"https://github.com/VoltDB/voltdb/pull/5968.diff","patch_url":"https://github.com/VoltDB/voltdb/pull/5968.patch","issue_url":"https://api.github.com/repos/VoltDB/voltdb/issues/5968","number":5968,"state":"open","locked":false,"title":"Eng-15241 compile8run11","user":{"login":"JadenW","id":4342624,"node_id":"MDQ6VXNlcjQzNDI2MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4342624?v=4","gravatar_id":"","url":"https://api.github.com/users/JadenW","html_url":"https://github.com/JadenW","followers_url":"https://api.github.com/users/JadenW/followers","following_url":"https://api.github.com/users/JadenW/following{/other_user}","gists_url":"https://api.github.com/users/JadenW/gists{/gist_id}","starred_url":"https://api.github.com/users/JadenW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JadenW/subscriptions","organizations_url":"https://api.github.com/users/JadenW/orgs","repos_url":"https://api.github.com/users/JadenW/repos","events_url":"https://api.github.com/users/JadenW/events{/privacy}","received_events_url":"https://api.github.com/users/JadenW/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-02-28T16:11:32Z","updated_at":"2019-02-28T17:11:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e557e55165009f04c54f8073c7ed31776b2bc5ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968/commits","review_comments_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968/comments","review_comment_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/issues/5968/comments","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/700f57285c25da58af6fbf0a60126f79dfd9aeb3","head":{"label":"VoltDB:ENG-15241-compile8run11","ref":"ENG-15241-compile8run11","sha":"700f57285c25da58af6fbf0a60126f79dfd9aeb3","user":{"login":"VoltDB","id":703910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMzkxMA==","avatar_url":"https://avatars3.githubusercontent.com/u/703910?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"node_id":"MDEwOlJlcG9zaXRvcnkyNDQ1OTcw","name":"voltdb","full_name":"VoltDB/voltdb","private":false,"owner":{"login":"VoltDB","id":703910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMzkxMA==","avatar_url":"https://avatars3.githubusercontent.com/u/703910?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","deployments_url":"https://api.github.com/repos/VoltDB/voltdb/deployments","created_at":"2011-09-23T18:46:12Z","updated_at":"2019-02-27T15:48:25Z","pushed_at":"2019-02-28T16:11:33Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":605320,"stargazers_count":1342,"watchers_count":1342,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":356,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":356,"open_issues":84,"watchers":1342,"default_branch":"master"}},"base":{"label":"VoltDB:master","ref":"master","sha":"0e6f21bb1f5e342c15ed96e4f63e1cf1ecd9384b","user":{"login":"VoltDB","id":703910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMzkxMA==","avatar_url":"https://avatars3.githubusercontent.com/u/703910?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"node_id":"MDEwOlJlcG9zaXRvcnkyNDQ1OTcw","name":"voltdb","full_name":"VoltDB/voltdb","private":false,"owner":{"login":"VoltDB","id":703910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcwMzkxMA==","avatar_url":"https://avatars3.githubusercontent.com/u/703910?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","deployments_url":"https://api.github.com/repos/VoltDB/voltdb/deployments","created_at":"2011-09-23T18:46:12Z","updated_at":"2019-02-27T15:48:25Z","pushed_at":"2019-02-28T16:11:33Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":605320,"stargazers_count":1342,"watchers_count":1342,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":356,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":356,"open_issues":84,"watchers":1342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/5968"},"issue":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/5968"},"comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/5968/comments"},"review_comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968/comments"},"review_comment":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/5968/commits"},"statuses":{"href":"https://api.github.com/repos/VoltDB/voltdb/statuses/700f57285c25da58af6fbf0a60126f79dfd9aeb3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"n3world"}}