{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/211716740","pull_request_review_id":148195538,"id":211716740,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTcxNjc0MA==","diff_hunk":"@@ -0,0 +1,40 @@\n+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.facebook.presto.testing;\n+\n+import java.lang.reflect.Method;\n+\n+import static com.google.common.base.Preconditions.checkArgument;\n+import static java.lang.String.format;\n+\n+public final class InterfaceTestUtils\n+{\n+    private InterfaceTestUtils() {}\n+\n+    // Note: this should be in sync with com.facebook.presto.plugin.base.testing.InterfaceTestUtils#checkEverythingImplemented\n+    public static <I> void checkEverythingImplemented(Class<I> interfaceClass, Class<? extends I> implementationClass)\n+            throws ReflectiveOperationException\n+    {\n+        checkArgument(interfaceClass.isAssignableFrom(implementationClass));\n+        for (Method interfaceMethod : interfaceClass.getMethods()) {\n+            Method implementationMethod = implementationClass.getMethod(interfaceMethod.getName(), interfaceMethod.getParameterTypes());\n+            if (interfaceMethod.equals(implementationMethod) && interfaceMethod.getAnnotation(Deprecated.class) == null) {","path":"presto-main/src/main/java/com/facebook/presto/testing/InterfaceTestUtils.java","position":32,"original_position":32,"commit_id":"627554412a9b444f52fff5e3648add4b48dee923","original_commit_id":"627554412a9b444f52fff5e3648add4b48dee923","user":{"login":"electrum","id":9230,"node_id":"MDQ6VXNlcjkyMzA=","avatar_url":"https://avatars1.githubusercontent.com/u/9230?v=4","gravatar_id":"","url":"https://api.github.com/users/electrum","html_url":"https://github.com/electrum","followers_url":"https://api.github.com/users/electrum/followers","following_url":"https://api.github.com/users/electrum/following{/other_user}","gists_url":"https://api.github.com/users/electrum/gists{/gist_id}","starred_url":"https://api.github.com/users/electrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrum/subscriptions","organizations_url":"https://api.github.com/users/electrum/orgs","repos_url":"https://api.github.com/users/electrum/repos","events_url":"https://api.github.com/users/electrum/events{/privacy}","received_events_url":"https://api.github.com/users/electrum/received_events","type":"User","site_admin":false},"body":"This equals check will always be false, since the methods will have different declaring classes. Example:\r\n```java\r\nMethod a = CharSequence.class.getMethod(\"length\");\r\nMethod b = String.class.getMethod(\"length\");\r\nSystem.out.println(a.getDeclaringClass());\r\nSystem.out.println(b.getDeclaringClass());\r\nSystem.out.println(a.equals(b));\r\n```\r\n```\r\ninterface java.lang.CharSequence\r\nclass java.lang.String\r\nfalse\r\n```\r\nI think that `TestClassLoaderSafeWrappers` does what you want to do here.","created_at":"2018-08-21T18:43:50Z","updated_at":"2018-08-21T18:48:01Z","html_url":"https://github.com/prestodb/presto/pull/10649#discussion_r211716740","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/10649","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/211716740"},"html":{"href":"https://github.com/prestodb/presto/pull/10649#discussion_r211716740"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10649"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/10649","id":189074894,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5MDc0ODk0","html_url":"https://github.com/prestodb/presto/pull/10649","diff_url":"https://github.com/prestodb/presto/pull/10649.diff","patch_url":"https://github.com/prestodb/presto/pull/10649.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/10649","number":10649,"state":"open","locked":false,"title":"Ensure access control classes implement all methods","user":{"login":"rschlussel","id":34256034,"node_id":"MDQ6VXNlcjM0MjU2MDM0","avatar_url":"https://avatars1.githubusercontent.com/u/34256034?v=4","gravatar_id":"","url":"https://api.github.com/users/rschlussel","html_url":"https://github.com/rschlussel","followers_url":"https://api.github.com/users/rschlussel/followers","following_url":"https://api.github.com/users/rschlussel/following{/other_user}","gists_url":"https://api.github.com/users/rschlussel/gists{/gist_id}","starred_url":"https://api.github.com/users/rschlussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschlussel/subscriptions","organizations_url":"https://api.github.com/users/rschlussel/orgs","repos_url":"https://api.github.com/users/rschlussel/repos","events_url":"https://api.github.com/users/rschlussel/events{/privacy}","received_events_url":"https://api.github.com/users/rschlussel/received_events","type":"User","site_admin":false},"body":"Ensure that access control implementations that are intended to be\r\ncomplete implement all methods from the interface they override","created_at":"2018-05-18T16:24:12Z","updated_at":"2018-08-21T18:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"143876bb975117d58bf9e41647ea9104f04ddd09","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":196992743,"node_id":"MDU6TGFiZWwxOTY5OTI3NDM=","url":"https://api.github.com/repos/prestodb/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/10649/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/10649/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/10649/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/627554412a9b444f52fff5e3648add4b48dee923","head":{"label":"rschlussel:access-control-tests","ref":"access-control-tests","sha":"627554412a9b444f52fff5e3648add4b48dee923","user":{"login":"rschlussel","id":34256034,"node_id":"MDQ6VXNlcjM0MjU2MDM0","avatar_url":"https://avatars1.githubusercontent.com/u/34256034?v=4","gravatar_id":"","url":"https://api.github.com/users/rschlussel","html_url":"https://github.com/rschlussel","followers_url":"https://api.github.com/users/rschlussel/followers","following_url":"https://api.github.com/users/rschlussel/following{/other_user}","gists_url":"https://api.github.com/users/rschlussel/gists{/gist_id}","starred_url":"https://api.github.com/users/rschlussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschlussel/subscriptions","organizations_url":"https://api.github.com/users/rschlussel/orgs","repos_url":"https://api.github.com/users/rschlussel/repos","events_url":"https://api.github.com/users/rschlussel/events{/privacy}","received_events_url":"https://api.github.com/users/rschlussel/received_events","type":"User","site_admin":false},"repo":{"id":116867981,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY4Njc5ODE=","name":"presto","full_name":"rschlussel/presto","owner":{"login":"rschlussel","id":34256034,"node_id":"MDQ6VXNlcjM0MjU2MDM0","avatar_url":"https://avatars1.githubusercontent.com/u/34256034?v=4","gravatar_id":"","url":"https://api.github.com/users/rschlussel","html_url":"https://github.com/rschlussel","followers_url":"https://api.github.com/users/rschlussel/followers","following_url":"https://api.github.com/users/rschlussel/following{/other_user}","gists_url":"https://api.github.com/users/rschlussel/gists{/gist_id}","starred_url":"https://api.github.com/users/rschlussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschlussel/subscriptions","organizations_url":"https://api.github.com/users/rschlussel/orgs","repos_url":"https://api.github.com/users/rschlussel/repos","events_url":"https://api.github.com/users/rschlussel/events{/privacy}","received_events_url":"https://api.github.com/users/rschlussel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rschlussel/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/rschlussel/presto","forks_url":"https://api.github.com/repos/rschlussel/presto/forks","keys_url":"https://api.github.com/repos/rschlussel/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rschlussel/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rschlussel/presto/teams","hooks_url":"https://api.github.com/repos/rschlussel/presto/hooks","issue_events_url":"https://api.github.com/repos/rschlussel/presto/issues/events{/number}","events_url":"https://api.github.com/repos/rschlussel/presto/events","assignees_url":"https://api.github.com/repos/rschlussel/presto/assignees{/user}","branches_url":"https://api.github.com/repos/rschlussel/presto/branches{/branch}","tags_url":"https://api.github.com/repos/rschlussel/presto/tags","blobs_url":"https://api.github.com/repos/rschlussel/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rschlussel/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rschlussel/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/rschlussel/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rschlussel/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/rschlussel/presto/languages","stargazers_url":"https://api.github.com/repos/rschlussel/presto/stargazers","contributors_url":"https://api.github.com/repos/rschlussel/presto/contributors","subscribers_url":"https://api.github.com/repos/rschlussel/presto/subscribers","subscription_url":"https://api.github.com/repos/rschlussel/presto/subscription","commits_url":"https://api.github.com/repos/rschlussel/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/rschlussel/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/rschlussel/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/rschlussel/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/rschlussel/presto/contents/{+path}","compare_url":"https://api.github.com/repos/rschlussel/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rschlussel/presto/merges","archive_url":"https://api.github.com/repos/rschlussel/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rschlussel/presto/downloads","issues_url":"https://api.github.com/repos/rschlussel/presto/issues{/number}","pulls_url":"https://api.github.com/repos/rschlussel/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/rschlussel/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/rschlussel/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rschlussel/presto/labels{/name}","releases_url":"https://api.github.com/repos/rschlussel/presto/releases{/id}","deployments_url":"https://api.github.com/repos/rschlussel/presto/deployments","created_at":"2018-01-09T20:36:21Z","updated_at":"2018-05-22T03:34:39Z","pushed_at":"2018-08-21T07:47:44Z","git_url":"git://github.com/rschlussel/presto.git","ssh_url":"git@github.com:rschlussel/presto.git","clone_url":"https://github.com/rschlussel/presto.git","svn_url":"https://github.com/rschlussel/presto","homepage":"https://prestodb.io","size":96691,"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,"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":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"1f2182c4a16bd7af89ff46f0f03d4353c9fbc339","user":{"login":"prestodb","id":6882181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4ODIxODE=","avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"node_id":"MDEwOlJlcG9zaXRvcnk1MzQ5NTY1","name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4ODIxODE=","avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2018-08-21T15:18:28Z","pushed_at":"2018-08-21T18:13:19Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":96883,"stargazers_count":7949,"watchers_count":7949,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2698,"mirror_url":null,"archived":false,"open_issues_count":1356,"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":2698,"open_issues":1356,"watchers":7949,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10649"},"html":{"href":"https://github.com/prestodb/presto/pull/10649"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/10649"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/10649/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10649/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10649/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/627554412a9b444f52fff5e3648add4b48dee923"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"electrum"}}