{"action":"created","comment":{"url":"https://api.github.com/repos/zalando/zally/pulls/comments/183076812","pull_request_review_id":114010501,"id":183076812,"diff_hunk":"@@ -0,0 +1,182 @@\n+package de.zalando.zally.util.ast;\n+\n+import org.aopalliance.intercept.MethodInterceptor;\n+import org.springframework.aop.framework.ProxyFactory;\n+\n+import javax.annotation.Nonnull;\n+import java.lang.reflect.Constructor;\n+import java.lang.reflect.Method;\n+import java.lang.reflect.ParameterizedType;\n+import java.lang.reflect.Type;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.Collection;\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.IdentityHashMap;\n+import java.util.Map;\n+import java.util.Set;\n+\n+import static de.zalando.zally.util.ast.Util.getterNameToPointer;\n+import static de.zalando.zally.util.ast.Util.rfc6901Encode;\n+\n+public final class MethodCallRecorder<T> {\n+    static class MethodCallRecorderException extends Throwable {\n+        MethodCallRecorderException(String message) {\n+            super(message);\n+        }\n+\n+        MethodCallRecorderException(String message, Throwable cause) {\n+            super(message, cause);\n+        }\n+    }\n+\n+    private static final Set<Class<?>> PRIMITIVES = new HashSet<>(Util.PRIMITIVES);\n+\n+    static boolean isGetterMethod(Method m) {\n+        return m.getName().startsWith(\"get\") && m.getReturnType() != null;\n+    }\n+\n+    static boolean isPrimitive(Object o) {\n+        return isPrimitive(o.getClass());\n+    }\n+\n+    static boolean isPrimitive(Class<?> c) {","path":"server/src/main/java/de/zalando/zally/util/ast/MethodCallRecorder.java","position":44,"original_position":44,"commit_id":"264b704d1872dc9aa8185b248f4a894aff52da3a","original_commit_id":"264b704d1872dc9aa8185b248f4a894aff52da3a","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Use explicit scoping instead of the default package private level](https://app.codacy.com/app/api-infrastructure/zally/pullRequest?prid=1545836)","created_at":"2018-04-20T14:55:22Z","updated_at":"2018-04-20T14:55:22Z","html_url":"https://github.com/zalando/zally/pull/706#discussion_r183076812","pull_request_url":"https://api.github.com/repos/zalando/zally/pulls/706","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/zalando/zally/pulls/comments/183076812"},"html":{"href":"https://github.com/zalando/zally/pull/706#discussion_r183076812"},"pull_request":{"href":"https://api.github.com/repos/zalando/zally/pulls/706"}}},"pull_request":{"url":"https://api.github.com/repos/zalando/zally/pulls/706","id":181864281,"html_url":"https://github.com/zalando/zally/pull/706","diff_url":"https://github.com/zalando/zally/pull/706.diff","patch_url":"https://github.com/zalando/zally/pull/706.patch","issue_url":"https://api.github.com/repos/zalando/zally/issues/706","number":706,"state":"open","locked":false,"title":"OpenAPI 3 Support (WIP)","user":{"login":"mfellner","id":1183636,"avatar_url":"https://avatars2.githubusercontent.com/u/1183636?v=4","gravatar_id":"","url":"https://api.github.com/users/mfellner","html_url":"https://github.com/mfellner","followers_url":"https://api.github.com/users/mfellner/followers","following_url":"https://api.github.com/users/mfellner/following{/other_user}","gists_url":"https://api.github.com/users/mfellner/gists{/gist_id}","starred_url":"https://api.github.com/users/mfellner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfellner/subscriptions","organizations_url":"https://api.github.com/users/mfellner/orgs","repos_url":"https://api.github.com/users/mfellner/repos","events_url":"https://api.github.com/users/mfellner/events{/privacy}","received_events_url":"https://api.github.com/users/mfellner/received_events","type":"User","site_admin":false},"body":"- [ ] Support OpenAPI 3 with a fallback to Swagger 2.\r\n- [x] Reverse AST to convert OpenApi/Swagger nodes to JSON pointers and to look up \"x-zally-ignore\" information for sub-trees of nodes.\r\n- [x]  MethodCallRecorder to automatically generate JSON pointers while accessing (potentially null) properties of OpenApi/Swagger objects.\r\n- [x] Context and ContextRulesValidator for simpler and more robust rules.","created_at":"2018-04-16T13:40:37Z","updated_at":"2018-04-20T14:55:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fa24077cedf362042f61ed772128a783d36cd51","assignee":null,"assignees":[],"requested_reviewers":[{"login":"netme","id":96552,"avatar_url":"https://avatars2.githubusercontent.com/u/96552?v=4","gravatar_id":"","url":"https://api.github.com/users/netme","html_url":"https://github.com/netme","followers_url":"https://api.github.com/users/netme/followers","following_url":"https://api.github.com/users/netme/following{/other_user}","gists_url":"https://api.github.com/users/netme/gists{/gist_id}","starred_url":"https://api.github.com/users/netme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netme/subscriptions","organizations_url":"https://api.github.com/users/netme/orgs","repos_url":"https://api.github.com/users/netme/repos","events_url":"https://api.github.com/users/netme/events{/privacy}","received_events_url":"https://api.github.com/users/netme/received_events","type":"User","site_admin":false},{"login":"maxim-tschumak","id":4802353,"avatar_url":"https://avatars2.githubusercontent.com/u/4802353?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-tschumak","html_url":"https://github.com/maxim-tschumak","followers_url":"https://api.github.com/users/maxim-tschumak/followers","following_url":"https://api.github.com/users/maxim-tschumak/following{/other_user}","gists_url":"https://api.github.com/users/maxim-tschumak/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-tschumak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-tschumak/subscriptions","organizations_url":"https://api.github.com/users/maxim-tschumak/orgs","repos_url":"https://api.github.com/users/maxim-tschumak/repos","events_url":"https://api.github.com/users/maxim-tschumak/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-tschumak/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":503448433,"url":"https://api.github.com/repos/zalando/zally/labels/under%20development","name":"under development","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zalando/zally/pulls/706/commits","review_comments_url":"https://api.github.com/repos/zalando/zally/pulls/706/comments","review_comment_url":"https://api.github.com/repos/zalando/zally/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando/zally/issues/706/comments","statuses_url":"https://api.github.com/repos/zalando/zally/statuses/264b704d1872dc9aa8185b248f4a894aff52da3a","head":{"label":"zalando:openapi3-mfellner","ref":"openapi3-mfellner","sha":"264b704d1872dc9aa8185b248f4a894aff52da3a","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars0.githubusercontent.com/u/1564818?v=4","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":76853145,"name":"zally","full_name":"zalando/zally","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars0.githubusercontent.com/u/1564818?v=4","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/zally","description":"A minimalistic, simple-to-use API linter","fork":false,"url":"https://api.github.com/repos/zalando/zally","forks_url":"https://api.github.com/repos/zalando/zally/forks","keys_url":"https://api.github.com/repos/zalando/zally/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/zally/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/zally/teams","hooks_url":"https://api.github.com/repos/zalando/zally/hooks","issue_events_url":"https://api.github.com/repos/zalando/zally/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/zally/events","assignees_url":"https://api.github.com/repos/zalando/zally/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/zally/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/zally/tags","blobs_url":"https://api.github.com/repos/zalando/zally/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/zally/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/zally/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/zally/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/zally/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/zally/languages","stargazers_url":"https://api.github.com/repos/zalando/zally/stargazers","contributors_url":"https://api.github.com/repos/zalando/zally/contributors","subscribers_url":"https://api.github.com/repos/zalando/zally/subscribers","subscription_url":"https://api.github.com/repos/zalando/zally/subscription","commits_url":"https://api.github.com/repos/zalando/zally/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/zally/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/zally/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/zally/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/zally/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/zally/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/zally/merges","archive_url":"https://api.github.com/repos/zalando/zally/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/zally/downloads","issues_url":"https://api.github.com/repos/zalando/zally/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/zally/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/zally/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/zally/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/zally/labels{/name}","releases_url":"https://api.github.com/repos/zalando/zally/releases{/id}","deployments_url":"https://api.github.com/repos/zalando/zally/deployments","created_at":"2016-12-19T10:38:18Z","updated_at":"2018-04-20T08:56:38Z","pushed_at":"2018-04-20T14:53:12Z","git_url":"git://github.com/zalando/zally.git","ssh_url":"git@github.com:zalando/zally.git","clone_url":"https://github.com/zalando/zally.git","svn_url":"https://github.com/zalando/zally","homepage":"https://zalando.github.io/zally","size":6682,"stargazers_count":141,"watchers_count":141,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":25,"open_issues":38,"watchers":141,"default_branch":"master"}},"base":{"label":"zalando:master","ref":"master","sha":"ad35aaa0c0d43f5082e3f8a5139645e909a53d94","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars0.githubusercontent.com/u/1564818?v=4","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":76853145,"name":"zally","full_name":"zalando/zally","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars0.githubusercontent.com/u/1564818?v=4","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/zally","description":"A minimalistic, simple-to-use API linter","fork":false,"url":"https://api.github.com/repos/zalando/zally","forks_url":"https://api.github.com/repos/zalando/zally/forks","keys_url":"https://api.github.com/repos/zalando/zally/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/zally/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/zally/teams","hooks_url":"https://api.github.com/repos/zalando/zally/hooks","issue_events_url":"https://api.github.com/repos/zalando/zally/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/zally/events","assignees_url":"https://api.github.com/repos/zalando/zally/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/zally/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/zally/tags","blobs_url":"https://api.github.com/repos/zalando/zally/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/zally/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/zally/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/zally/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/zally/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/zally/languages","stargazers_url":"https://api.github.com/repos/zalando/zally/stargazers","contributors_url":"https://api.github.com/repos/zalando/zally/contributors","subscribers_url":"https://api.github.com/repos/zalando/zally/subscribers","subscription_url":"https://api.github.com/repos/zalando/zally/subscription","commits_url":"https://api.github.com/repos/zalando/zally/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/zally/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/zally/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/zally/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/zally/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/zally/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/zally/merges","archive_url":"https://api.github.com/repos/zalando/zally/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/zally/downloads","issues_url":"https://api.github.com/repos/zalando/zally/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/zally/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/zally/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/zally/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/zally/labels{/name}","releases_url":"https://api.github.com/repos/zalando/zally/releases{/id}","deployments_url":"https://api.github.com/repos/zalando/zally/deployments","created_at":"2016-12-19T10:38:18Z","updated_at":"2018-04-20T08:56:38Z","pushed_at":"2018-04-20T14:53:12Z","git_url":"git://github.com/zalando/zally.git","ssh_url":"git@github.com:zalando/zally.git","clone_url":"https://github.com/zalando/zally.git","svn_url":"https://github.com/zalando/zally","homepage":"https://zalando.github.io/zally","size":6682,"stargazers_count":141,"watchers_count":141,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":25,"open_issues":38,"watchers":141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando/zally/pulls/706"},"html":{"href":"https://github.com/zalando/zally/pull/706"},"issue":{"href":"https://api.github.com/repos/zalando/zally/issues/706"},"comments":{"href":"https://api.github.com/repos/zalando/zally/issues/706/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando/zally/pulls/706/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando/zally/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando/zally/pulls/706/commits"},"statuses":{"href":"https://api.github.com/repos/zalando/zally/statuses/264b704d1872dc9aa8185b248f4a894aff52da3a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"codacy-bot"}}