{"action":"created","comment":{"url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/comments/195376129","pull_request_review_id":128731409,"id":195376129,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTM3NjEyOQ==","diff_hunk":"@@ -212,21 +194,43 @@ public String toString() {\n \t\t);\n \t}\n \n-\tprivate static Type getParameterGenericType(Type[] parameterTypes, Type[] genericParameterTypes, int parameterIndex) {\n-\t\t// getGenericParameterTypes() doesn't return synthetic parameters; in this case fall back to getParameterTypes()\n-\t\tType[] typesToConsider;\n-\t\tif ( parameterIndex >= genericParameterTypes.length ) {\n-\t\t\ttypesToConsider = parameterTypes;\n-\t\t}\n-\t\telse {\n-\t\t\ttypesToConsider = genericParameterTypes;\n+\tprivate static List<JavaBeanParameter> getParameters(Executable executable) {\n+\t\tif ( executable.getParameterCount() == 0 ) {\n+\t\t\treturn Collections.emptyList();\n \t\t}\n \n-\t\tType type = typesToConsider[parameterIndex];\n+\t\tList<JavaBeanParameter> parameters = new ArrayList<>( executable.getParameterCount() );\n \n-\t\tif ( type instanceof TypeVariable ) {\n-\t\t\ttype = TypeHelper.getErasedType( type );","path":"engine/src/main/java/org/hibernate/validator/internal/properties/javabean/JavaBeanExecutable.java","position":62,"original_position":62,"commit_id":"d53104f4e45071237c10d25dbe005c697af731b3","original_commit_id":"d53104f4e45071237c10d25dbe005c697af731b3","user":{"login":"gsmet","id":1279749,"node_id":"MDQ6VXNlcjEyNzk3NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1279749?v=4","gravatar_id":"","url":"https://api.github.com/users/gsmet","html_url":"https://github.com/gsmet","followers_url":"https://api.github.com/users/gsmet/followers","following_url":"https://api.github.com/users/gsmet/following{/other_user}","gists_url":"https://api.github.com/users/gsmet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsmet/subscriptions","organizations_url":"https://api.github.com/users/gsmet/orgs","repos_url":"https://api.github.com/users/gsmet/repos","events_url":"https://api.github.com/users/gsmet/events{/privacy}","received_events_url":"https://api.github.com/users/gsmet/received_events","type":"User","site_admin":false},"body":"FWIW, I tried to add a test for that but the type is later erased again when used.\r\n\r\nI think I will still keep the erasure here though as it makes sense.","created_at":"2018-06-14T10:39:22Z","updated_at":"2018-06-14T10:39:23Z","html_url":"https://github.com/hibernate/hibernate-validator/pull/970#discussion_r195376129","pull_request_url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/comments/195376129"},"html":{"href":"https://github.com/hibernate/hibernate-validator/pull/970#discussion_r195376129"},"pull_request":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970"}},"in_reply_to_id":195334854},"pull_request":{"url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970","id":194357383,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MzU3Mzgz","html_url":"https://github.com/hibernate/hibernate-validator/pull/970","diff_url":"https://github.com/hibernate/hibernate-validator/pull/970.diff","patch_url":"https://github.com/hibernate/hibernate-validator/pull/970.patch","issue_url":"https://api.github.com/repos/hibernate/hibernate-validator/issues/970","number":970,"state":"open","locked":false,"title":"HV-1634 Deal with synthetic and implicit parameters properly when getting the generic type of a parameter","user":{"login":"gsmet","id":1279749,"node_id":"MDQ6VXNlcjEyNzk3NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1279749?v=4","gravatar_id":"","url":"https://api.github.com/users/gsmet","html_url":"https://github.com/gsmet","followers_url":"https://api.github.com/users/gsmet/followers","following_url":"https://api.github.com/users/gsmet/following{/other_user}","gists_url":"https://api.github.com/users/gsmet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsmet/subscriptions","organizations_url":"https://api.github.com/users/gsmet/orgs","repos_url":"https://api.github.com/users/gsmet/repos","events_url":"https://api.github.com/users/gsmet/events{/privacy}","received_events_url":"https://api.github.com/users/gsmet/received_events","type":"User","site_admin":false},"body":"* https://hibernate.atlassian.net/browse/HV-1634\r\n\r\nThis one is a funny one: I discovered it while working on the reflection abstraction stuff and it has been there forever (the code of `ReflectionHelper#typeOf(Executable, int)` was not working correctly at all).\r\n\r\nI thought about it again when playing with the Kotlin issue with enum constructors.\r\n\r\nI removed this now unused and broken method and implemented things properly in the new code (the old logic came directly from the old method).\r\n\r\nApparently, we don't have a lot of users playing with non-static nested classes and generic parameters in their constructors :).","created_at":"2018-06-12T17:44:17Z","updated_at":"2018-06-14T10:39:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff70b1b68c54e9460745f3a0e166cb97ce5c27ed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":867022768,"node_id":"MDU6TGFiZWw4NjcwMjI3Njg=","url":"https://api.github.com/repos/hibernate/hibernate-validator/labels/6.1","name":"6.1","color":"5319e7","default":false},{"id":175371464,"node_id":"MDU6TGFiZWwxNzUzNzE0NjQ=","url":"https://api.github.com/repos/hibernate/hibernate-validator/labels/Changes%20suggested","name":"Changes suggested","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970/commits","review_comments_url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970/comments","review_comment_url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hibernate/hibernate-validator/issues/970/comments","statuses_url":"https://api.github.com/repos/hibernate/hibernate-validator/statuses/d53104f4e45071237c10d25dbe005c697af731b3","head":{"label":"gsmet:HV-1634","ref":"HV-1634","sha":"d53104f4e45071237c10d25dbe005c697af731b3","user":{"login":"gsmet","id":1279749,"node_id":"MDQ6VXNlcjEyNzk3NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1279749?v=4","gravatar_id":"","url":"https://api.github.com/users/gsmet","html_url":"https://github.com/gsmet","followers_url":"https://api.github.com/users/gsmet/followers","following_url":"https://api.github.com/users/gsmet/following{/other_user}","gists_url":"https://api.github.com/users/gsmet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsmet/subscriptions","organizations_url":"https://api.github.com/users/gsmet/orgs","repos_url":"https://api.github.com/users/gsmet/repos","events_url":"https://api.github.com/users/gsmet/events{/privacy}","received_events_url":"https://api.github.com/users/gsmet/received_events","type":"User","site_admin":false},"repo":{"id":56131797,"node_id":"MDEwOlJlcG9zaXRvcnk1NjEzMTc5Nw==","name":"hibernate-validator","full_name":"gsmet/hibernate-validator","owner":{"login":"gsmet","id":1279749,"node_id":"MDQ6VXNlcjEyNzk3NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1279749?v=4","gravatar_id":"","url":"https://api.github.com/users/gsmet","html_url":"https://github.com/gsmet","followers_url":"https://api.github.com/users/gsmet/followers","following_url":"https://api.github.com/users/gsmet/following{/other_user}","gists_url":"https://api.github.com/users/gsmet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsmet/subscriptions","organizations_url":"https://api.github.com/users/gsmet/orgs","repos_url":"https://api.github.com/users/gsmet/repos","events_url":"https://api.github.com/users/gsmet/events{/privacy}","received_events_url":"https://api.github.com/users/gsmet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gsmet/hibernate-validator","description":"Hibernate Validator - Bean Validation 1.1 (JSR 349) Reference Implementation","fork":true,"url":"https://api.github.com/repos/gsmet/hibernate-validator","forks_url":"https://api.github.com/repos/gsmet/hibernate-validator/forks","keys_url":"https://api.github.com/repos/gsmet/hibernate-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsmet/hibernate-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsmet/hibernate-validator/teams","hooks_url":"https://api.github.com/repos/gsmet/hibernate-validator/hooks","issue_events_url":"https://api.github.com/repos/gsmet/hibernate-validator/issues/events{/number}","events_url":"https://api.github.com/repos/gsmet/hibernate-validator/events","assignees_url":"https://api.github.com/repos/gsmet/hibernate-validator/assignees{/user}","branches_url":"https://api.github.com/repos/gsmet/hibernate-validator/branches{/branch}","tags_url":"https://api.github.com/repos/gsmet/hibernate-validator/tags","blobs_url":"https://api.github.com/repos/gsmet/hibernate-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsmet/hibernate-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsmet/hibernate-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsmet/hibernate-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsmet/hibernate-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/gsmet/hibernate-validator/languages","stargazers_url":"https://api.github.com/repos/gsmet/hibernate-validator/stargazers","contributors_url":"https://api.github.com/repos/gsmet/hibernate-validator/contributors","subscribers_url":"https://api.github.com/repos/gsmet/hibernate-validator/subscribers","subscription_url":"https://api.github.com/repos/gsmet/hibernate-validator/subscription","commits_url":"https://api.github.com/repos/gsmet/hibernate-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsmet/hibernate-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsmet/hibernate-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsmet/hibernate-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsmet/hibernate-validator/contents/{+path}","compare_url":"https://api.github.com/repos/gsmet/hibernate-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsmet/hibernate-validator/merges","archive_url":"https://api.github.com/repos/gsmet/hibernate-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsmet/hibernate-validator/downloads","issues_url":"https://api.github.com/repos/gsmet/hibernate-validator/issues{/number}","pulls_url":"https://api.github.com/repos/gsmet/hibernate-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/gsmet/hibernate-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/gsmet/hibernate-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsmet/hibernate-validator/labels{/name}","releases_url":"https://api.github.com/repos/gsmet/hibernate-validator/releases{/id}","deployments_url":"https://api.github.com/repos/gsmet/hibernate-validator/deployments","created_at":"2016-04-13T07:48:18Z","updated_at":"2016-04-13T07:48:22Z","pushed_at":"2018-06-13T15:14:25Z","git_url":"git://github.com/gsmet/hibernate-validator.git","ssh_url":"git@github.com:gsmet/hibernate-validator.git","clone_url":"https://github.com/gsmet/hibernate-validator.git","svn_url":"https://github.com/gsmet/hibernate-validator","homepage":"http://validator.hibernate.org/","size":28491,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"hibernate:master","ref":"master","sha":"de8d2e652fc32c2b3bec6b950196439d9f190243","user":{"login":"hibernate","id":348262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0ODI2Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/348262?v=4","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"repo":{"id":972205,"node_id":"MDEwOlJlcG9zaXRvcnk5NzIyMDU=","name":"hibernate-validator","full_name":"hibernate/hibernate-validator","owner":{"login":"hibernate","id":348262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0ODI2Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/348262?v=4","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hibernate/hibernate-validator","description":"Hibernate Validator - Bean Validation 2.0 (JSR 380) Reference Implementation","fork":false,"url":"https://api.github.com/repos/hibernate/hibernate-validator","forks_url":"https://api.github.com/repos/hibernate/hibernate-validator/forks","keys_url":"https://api.github.com/repos/hibernate/hibernate-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hibernate/hibernate-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hibernate/hibernate-validator/teams","hooks_url":"https://api.github.com/repos/hibernate/hibernate-validator/hooks","issue_events_url":"https://api.github.com/repos/hibernate/hibernate-validator/issues/events{/number}","events_url":"https://api.github.com/repos/hibernate/hibernate-validator/events","assignees_url":"https://api.github.com/repos/hibernate/hibernate-validator/assignees{/user}","branches_url":"https://api.github.com/repos/hibernate/hibernate-validator/branches{/branch}","tags_url":"https://api.github.com/repos/hibernate/hibernate-validator/tags","blobs_url":"https://api.github.com/repos/hibernate/hibernate-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hibernate/hibernate-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hibernate/hibernate-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/hibernate/hibernate-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hibernate/hibernate-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/hibernate/hibernate-validator/languages","stargazers_url":"https://api.github.com/repos/hibernate/hibernate-validator/stargazers","contributors_url":"https://api.github.com/repos/hibernate/hibernate-validator/contributors","subscribers_url":"https://api.github.com/repos/hibernate/hibernate-validator/subscribers","subscription_url":"https://api.github.com/repos/hibernate/hibernate-validator/subscription","commits_url":"https://api.github.com/repos/hibernate/hibernate-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/hibernate/hibernate-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/hibernate/hibernate-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/hibernate/hibernate-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/hibernate/hibernate-validator/contents/{+path}","compare_url":"https://api.github.com/repos/hibernate/hibernate-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hibernate/hibernate-validator/merges","archive_url":"https://api.github.com/repos/hibernate/hibernate-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hibernate/hibernate-validator/downloads","issues_url":"https://api.github.com/repos/hibernate/hibernate-validator/issues{/number}","pulls_url":"https://api.github.com/repos/hibernate/hibernate-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/hibernate/hibernate-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/hibernate/hibernate-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hibernate/hibernate-validator/labels{/name}","releases_url":"https://api.github.com/repos/hibernate/hibernate-validator/releases{/id}","deployments_url":"https://api.github.com/repos/hibernate/hibernate-validator/deployments","created_at":"2010-10-08T13:25:07Z","updated_at":"2018-06-14T08:42:44Z","pushed_at":"2018-06-14T08:42:40Z","git_url":"git://github.com/hibernate/hibernate-validator.git","ssh_url":"git@github.com:hibernate/hibernate-validator.git","clone_url":"https://github.com/hibernate/hibernate-validator.git","svn_url":"https://github.com/hibernate/hibernate-validator","homepage":"http://hibernate.org/validator/","size":28366,"stargazers_count":503,"watchers_count":503,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":313,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":313,"open_issues":8,"watchers":503,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970"},"html":{"href":"https://github.com/hibernate/hibernate-validator/pull/970"},"issue":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/issues/970"},"comments":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/issues/970/comments"},"review_comments":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970/comments"},"review_comment":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/pulls/970/commits"},"statuses":{"href":"https://api.github.com/repos/hibernate/hibernate-validator/statuses/d53104f4e45071237c10d25dbe005c697af731b3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gsmet"}}