{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/24070","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24070/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24070/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24070/events","html_url":"https://github.com/elastic/elasticsearch/pull/24070","id":221301168,"number":24070,"title":"Fix Painless Lambdas for Java 9","user":{"login":"jdconrad","id":2126764,"avatar_url":"https://avatars1.githubusercontent.com/u/2126764?v=3","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},"labels":[{"id":322176648,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Plugin%20Lang%20Painless","name":":Plugin Lang Painless","color":"009800","default":false},{"id":23173,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c","default":true},{"id":552045539,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/jdk9","name":"jdk9","color":"e11d21","default":false},{"id":249799053,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/jvm%20bug","name":"jvm bug","color":"e11d21","default":false},{"id":582501014,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.5.0","name":"v5.5.0","color":"dddddd","default":false},{"id":334286612,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.0.0","name":"v6.0.0","color":"dddddd","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-04-12T15:28:41Z","updated_at":"2017-04-24T17:07:35Z","closed_at":"2017-04-24T16:58:03Z","pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/24070","html_url":"https://github.com/elastic/elasticsearch/pull/24070","diff_url":"https://github.com/elastic/elasticsearch/pull/24070.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/24070.patch"},"body":"JDK9 has made changes to LambdaMetaFactory that prevent Painless lambdas from being able to do proper adaptation of types from the interface method to the delegate method even using a bridge.  In particular boxed types are no longer widened appropriately, and Object can no longer be adapted to primitive types.  Though, the former is likely a bug based on the spec, whether the latter is allowed according to spec is somewhat ambiguous.  \r\n\r\nThis fix adds a LambdaBootstrap class that replaces LambdaMetaFactory in Painless using the same methodology that LambdaMetaFactory was based on (http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html).  This allows us to do whatever adaptations we believe are necessary without having to worry about future changes/bugs in LambdaMetaFactory.\r\n\r\nThis is related to #23473."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/296748197","html_url":"https://github.com/elastic/elasticsearch/pull/24070#issuecomment-296748197","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24070","id":296748197,"user":{"login":"jdconrad","id":2126764,"avatar_url":"https://avatars1.githubusercontent.com/u/2126764?v=3","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},"created_at":"2017-04-24T17:07:35Z","updated_at":"2017-04-24T17:07:35Z","body":"@nik9000 Thank you for the review."}}
{"actor":{"display_login":"jdconrad"}}