{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/202783929","pull_request_review_id":137547047,"id":202783929,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjc4MzkyOQ==","diff_hunk":"@@ -0,0 +1,280 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * 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,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.elasticsearch.painless.lookup;\n+\n+import org.objectweb.asm.Type;\n+\n+import java.util.Arrays;\n+import java.util.Collection;\n+import java.util.Map;\n+\n+public final class PainlessLookupUtility {\n+\n+    // The following terminology is used for variable names throughout the lookup package:\n+    //\n+    // - javaClass           (Class)         - a java class including def and excluding array type java classes\n+    // - javaClassName       (String)        - the fully qualified java class name for a javaClass\n+    // - painlessClassName   (String)        - the fully qualified painless name or imported painless name for a painlessClass\n+    // - anyClassName        (String)        - either a javaClassName or a painlessClassName\n+    // - javaType            (Class)         - a java class excluding def and array type java classes\n+    // - painlessType        (Class)         - a java class including def and array type java classes\n+    // - javaTypeName        (String)        - the fully qualified java Type name for a javaType\n+    // - painlessTypeName    (String)        - the fully qualified painless name or imported painless name for a painlessType\n+    // - anyTypeName         (String)        - either a javaTypeName or a painlessTypeName\n+    // - painlessClass       (PainlessClass) - a painless class object\n+    //\n+    // Under ambiguous circumstances most variable names are prefixed with asm, java, or painless.\n+    // If the variable name is the same for asm, java, and painless, no prefix is used.\n+\n+    public static Class<?> javaObjectTypeToPainlessDefType(Class<?> javaType) {","path":"modules/lang-painless/src/main/java/org/elasticsearch/painless/lookup/PainlessLookupUtility.java","position":46,"original_position":46,"commit_id":"5608631ed9ffa950ac22bf6474adaced76ed6555","original_commit_id":"5608631ed9ffa950ac22bf6474adaced76ed6555","user":{"login":"rjernst","id":289412,"node_id":"MDQ6VXNlcjI4OTQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/289412?v=4","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"body":"a brief one liner would be nice on most of these methods, especially since at a glance, you would this this would always return `def.class`, but an explanation of the array case necessary would be nice. These could be in a followup since I know they are just moving here and were undocumented in their previous location.","created_at":"2018-07-16T18:45:56Z","updated_at":"2018-07-16T18:46:48Z","html_url":"https://github.com/elastic/elasticsearch/pull/32105#discussion_r202783929","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/202783929"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/32105#discussion_r202783929"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105","id":201724140,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNzI0MTQw","html_url":"https://github.com/elastic/elasticsearch/pull/32105","diff_url":"https://github.com/elastic/elasticsearch/pull/32105.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/32105.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/32105","number":32105,"state":"open","locked":false,"title":"Painless: Move and Rename Several Methods in the lookup package","user":{"login":"jdconrad","id":2126764,"node_id":"MDQ6VXNlcjIxMjY3NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2126764?v=4","gravatar_id":"","url":"https://api.github.com/users/jdconrad","html_url":"https://github.com/jdconrad","followers_url":"https://api.github.com/users/jdconrad/followers","following_url":"https://api.github.com/users/jdconrad/following{/other_user}","gists_url":"https://api.github.com/users/jdconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jdconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdconrad/subscriptions","organizations_url":"https://api.github.com/users/jdconrad/orgs","repos_url":"https://api.github.com/users/jdconrad/repos","events_url":"https://api.github.com/users/jdconrad/events{/privacy}","received_events_url":"https://api.github.com/users/jdconrad/received_events","type":"User","site_admin":false},"body":"Mechanical change.  Moves several shared static methods into a new PainlessLookupUtility class.  These are used by both PainlessLookupBuilder and PainlessLookup along with several of the node classes for conversion between type names and types and java classes to painless classes.","created_at":"2018-07-16T18:40:49Z","updated_at":"2018-07-16T18:46:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33d5ee0e66d782c614da10e980ea045bd9224b00","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":146834791,"node_id":"MDU6TGFiZWwxNDY4MzQ3OTE=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Core/Scripting","name":":Core/Scripting","color":"0e8a16","default":false},{"id":837440720,"node_id":"MDU6TGFiZWw4Mzc0NDA3MjA=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Erefactoring","name":">refactoring","color":"dddddd","default":false},{"id":912911731,"node_id":"MDU6TGFiZWw5MTI5MTE3MzE=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.4.0","name":"v6.4.0","color":"DDDDDD","default":false},{"id":484855464,"node_id":"MDU6TGFiZWw0ODQ4NTU0NjQ=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/v7.0.0","name":"v7.0.0","color":"dddddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/32105/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/5608631ed9ffa950ac22bf6474adaced76ed6555","head":{"label":"jdconrad:clean6","ref":"clean6","sha":"5608631ed9ffa950ac22bf6474adaced76ed6555","user":{"login":"jdconrad","id":2126764,"node_id":"MDQ6VXNlcjIxMjY3NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2126764?v=4","gravatar_id":"","url":"https://api.github.com/users/jdconrad","html_url":"https://github.com/jdconrad","followers_url":"https://api.github.com/users/jdconrad/followers","following_url":"https://api.github.com/users/jdconrad/following{/other_user}","gists_url":"https://api.github.com/users/jdconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jdconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdconrad/subscriptions","organizations_url":"https://api.github.com/users/jdconrad/orgs","repos_url":"https://api.github.com/users/jdconrad/repos","events_url":"https://api.github.com/users/jdconrad/events{/privacy}","received_events_url":"https://api.github.com/users/jdconrad/received_events","type":"User","site_admin":false},"repo":{"id":33491776,"node_id":"MDEwOlJlcG9zaXRvcnkzMzQ5MTc3Ng==","name":"elasticsearch","full_name":"jdconrad/elasticsearch","owner":{"login":"jdconrad","id":2126764,"node_id":"MDQ6VXNlcjIxMjY3NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2126764?v=4","gravatar_id":"","url":"https://api.github.com/users/jdconrad","html_url":"https://github.com/jdconrad","followers_url":"https://api.github.com/users/jdconrad/followers","following_url":"https://api.github.com/users/jdconrad/following{/other_user}","gists_url":"https://api.github.com/users/jdconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jdconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdconrad/subscriptions","organizations_url":"https://api.github.com/users/jdconrad/orgs","repos_url":"https://api.github.com/users/jdconrad/repos","events_url":"https://api.github.com/users/jdconrad/events{/privacy}","received_events_url":"https://api.github.com/users/jdconrad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdconrad/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jdconrad/elasticsearch","forks_url":"https://api.github.com/repos/jdconrad/elasticsearch/forks","keys_url":"https://api.github.com/repos/jdconrad/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdconrad/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdconrad/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jdconrad/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jdconrad/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jdconrad/elasticsearch/events","assignees_url":"https://api.github.com/repos/jdconrad/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jdconrad/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jdconrad/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jdconrad/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdconrad/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdconrad/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdconrad/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdconrad/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jdconrad/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jdconrad/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jdconrad/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jdconrad/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jdconrad/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jdconrad/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdconrad/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdconrad/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdconrad/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdconrad/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jdconrad/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdconrad/elasticsearch/merges","archive_url":"https://api.github.com/repos/jdconrad/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdconrad/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jdconrad/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jdconrad/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jdconrad/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jdconrad/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdconrad/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jdconrad/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jdconrad/elasticsearch/deployments","created_at":"2015-04-06T16:19:42Z","updated_at":"2018-07-13T22:29:33Z","pushed_at":"2018-07-16T18:33:31Z","git_url":"git://github.com/jdconrad/elasticsearch.git","ssh_url":"git@github.com:jdconrad/elasticsearch.git","clone_url":"https://github.com/jdconrad/elasticsearch.git","svn_url":"https://github.com/jdconrad/elasticsearch","homepage":"http://elasticsearch.org","size":434197,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"2a1a28f19c63a268330b3fe351dda731ee0f6627","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"node_id":"MDEwOlJlcG9zaXRvcnk1MDc3NzU=","name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2018-07-16T18:22:16Z","pushed_at":"2018-07-16T18:40:50Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":496374,"stargazers_count":32595,"watchers_count":32595,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11159,"mirror_url":null,"archived":false,"open_issues_count":1560,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":11159,"open_issues":1560,"watchers":32595,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/32105"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/32105"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/32105/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/32105/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/5608631ed9ffa950ac22bf6474adaced76ed6555"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rjernst"}}