{"action":"created","issue":{"url":"https://api.github.com/repos/tobias/clojure-java-9/issues/7","repository_url":"https://api.github.com/repos/tobias/clojure-java-9","labels_url":"https://api.github.com/repos/tobias/clojure-java-9/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/tobias/clojure-java-9/issues/7/comments","events_url":"https://api.github.com/repos/tobias/clojure-java-9/issues/7/events","html_url":"https://github.com/tobias/clojure-java-9/issues/7","id":300081424,"number":7,"title":"Calling static interface methods does not compile","user":{"login":"ghadishayban","id":829803,"avatar_url":"https://avatars1.githubusercontent.com/u/829803?v=4","gravatar_id":"","url":"https://api.github.com/users/ghadishayban","html_url":"https://github.com/ghadishayban","followers_url":"https://api.github.com/users/ghadishayban/followers","following_url":"https://api.github.com/users/ghadishayban/following{/other_user}","gists_url":"https://api.github.com/users/ghadishayban/gists{/gist_id}","starred_url":"https://api.github.com/users/ghadishayban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghadishayban/subscriptions","organizations_url":"https://api.github.com/users/ghadishayban/orgs","repos_url":"https://api.github.com/users/ghadishayban/repos","events_url":"https://api.github.com/users/ghadishayban/events{/privacy}","received_events_url":"https://api.github.com/users/ghadishayban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T01:14:15Z","updated_at":"2018-03-19T16:24:04Z","closed_at":null,"author_association":"NONE","body":"Calls to static interface methods compile on Java 8 but not on Java 9 because of a new bytecode restrictrion. \r\n\r\n```java\r\npublic interface JDK8InterfaceMethods {\r\n    // cannot call either of these from Clojure\r\n    public static long staticMethod0(long v) { return v; }\r\n    public static String staticMethod1(String s) { return s; }\r\n}\r\n```\r\n\r\nhttps://dev.clojure.org/jira/browse/CLJ-2284\r\n\r\nInterface default methods are unaffected.\r\n"},"comment":{"url":"https://api.github.com/repos/tobias/clojure-java-9/issues/comments/374273429","html_url":"https://github.com/tobias/clojure-java-9/issues/7#issuecomment-374273429","issue_url":"https://api.github.com/repos/tobias/clojure-java-9/issues/7","id":374273429,"user":{"login":"ghadishayban","id":829803,"avatar_url":"https://avatars1.githubusercontent.com/u/829803?v=4","gravatar_id":"","url":"https://api.github.com/users/ghadishayban","html_url":"https://github.com/ghadishayban","followers_url":"https://api.github.com/users/ghadishayban/followers","following_url":"https://api.github.com/users/ghadishayban/following{/other_user}","gists_url":"https://api.github.com/users/ghadishayban/gists{/gist_id}","starred_url":"https://api.github.com/users/ghadishayban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghadishayban/subscriptions","organizations_url":"https://api.github.com/users/ghadishayban/orgs","repos_url":"https://api.github.com/users/ghadishayban/repos","events_url":"https://api.github.com/users/ghadishayban/events{/privacy}","received_events_url":"https://api.github.com/users/ghadishayban/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T16:24:04Z","updated_at":"2018-03-19T16:24:04Z","author_association":"NONE","body":"workaround macro\r\n```clj\r\n(defmacro interface-static-call\r\n  [sym & argtypes]\r\n  `(let [m# (.getMethod ~(symbol (namespace sym))\r\n                        ~(name sym)\r\n                        (into-array Class ~argtypes))]\r\n     (fn [& args#]\r\n       (.invoke m# nil (to-array args#)))))\r\n\r\n(def client\r\n  (interface-static-call S3Client/create))\r\n\r\n(client)\r\n```"}}
{"actor":{"display_login":"ghadishayban"}}