{"action":"created","comment":{"url":"https://api.github.com/repos/corda/corda/pulls/comments/190601424","pull_request_review_id":123010862,"id":190601424,"diff_hunk":"@@ -66,22 +73,37 @@ abstract class EvolutionSerializer(\n \n             if (!clazz.isConcreteClass) return null\n \n-            val oldArgumentSet = oldArgs.map { Pair(it.key as String?, it.value.property.resolvedType) }\n-\n+            val oldArgumentSet = oldArgs.map { Pair(it.key as String?, it.value.property.resolvedType.asClass()) }\n             var maxConstructorVersion = Integer.MIN_VALUE\n             var constructor: KFunction<Any>? = null\n+\n             clazz.kotlin.constructors.forEach {\n                 val version = it.findAnnotation<DeprecatedConstructorForDeserialization>()?.version ?: Integer.MIN_VALUE\n-                if (oldArgumentSet.containsAll(it.parameters.map { v -> Pair(v.name, v.type.javaType) }) &&\n-                        version > maxConstructorVersion) {\n+\n+                if (version > maxConstructorVersion &&\n+                        oldArgumentSet.containsAll(it.parameters.map { v -> Pair(v.name, v.type.javaType.asClass()) })\n+                ) {\n                     constructor = it\n                     maxConstructorVersion = version\n+\n+                    with(logger) {\n+                        info(\"Select annotated constructor version=$version nparams=${it.parameters.size}\")\n+                        debug(\"  params=${it.parameters}\")","path":"serialization/src/main/kotlin/net/corda/serialization/internal/amqp/EvolutionSerializer.kt","position":47,"original_position":47,"commit_id":"31c666205037515b6f3174fd91ccfef4ed776e60","original_commit_id":"31c666205037515b6f3174fd91ccfef4ed776e60","user":{"login":"shamsasari","id":3883563,"avatar_url":"https://avatars3.githubusercontent.com/u/3883563?v=4","gravatar_id":"","url":"https://api.github.com/users/shamsasari","html_url":"https://github.com/shamsasari","followers_url":"https://api.github.com/users/shamsasari/followers","following_url":"https://api.github.com/users/shamsasari/following{/other_user}","gists_url":"https://api.github.com/users/shamsasari/gists{/gist_id}","starred_url":"https://api.github.com/users/shamsasari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamsasari/subscriptions","organizations_url":"https://api.github.com/users/shamsasari/orgs","repos_url":"https://api.github.com/users/shamsasari/repos","events_url":"https://api.github.com/users/shamsasari/events{/privacy}","received_events_url":"https://api.github.com/users/shamsasari/received_events","type":"User","site_admin":false},"body":"Use the `debug {  }` extension method which will avoid creating the string if not at debug level.","created_at":"2018-05-24T14:13:07Z","updated_at":"2018-05-24T14:17:03Z","html_url":"https://github.com/corda/corda/pull/3232#discussion_r190601424","pull_request_url":"https://api.github.com/repos/corda/corda/pulls/3232","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/comments/190601424"},"html":{"href":"https://github.com/corda/corda/pull/3232#discussion_r190601424"},"pull_request":{"href":"https://api.github.com/repos/corda/corda/pulls/3232"}}},"pull_request":{"url":"https://api.github.com/repos/corda/corda/pulls/3232","id":190303074,"html_url":"https://github.com/corda/corda/pull/3232","diff_url":"https://github.com/corda/corda/pull/3232.diff","patch_url":"https://github.com/corda/corda/pull/3232.patch","issue_url":"https://api.github.com/repos/corda/corda/issues/3232","number":3232,"state":"open","locked":false,"title":"CORDA-1530 - Generics break default evolver","user":{"login":"fenryka","id":3903362,"avatar_url":"https://avatars3.githubusercontent.com/u/3903362?v=4","gravatar_id":"","url":"https://api.github.com/users/fenryka","html_url":"https://github.com/fenryka","followers_url":"https://api.github.com/users/fenryka/followers","following_url":"https://api.github.com/users/fenryka/following{/other_user}","gists_url":"https://api.github.com/users/fenryka/gists{/gist_id}","starred_url":"https://api.github.com/users/fenryka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenryka/subscriptions","organizations_url":"https://api.github.com/users/fenryka/orgs","repos_url":"https://api.github.com/users/fenryka/repos","events_url":"https://api.github.com/users/fenryka/events{/privacy}","received_events_url":"https://api.github.com/users/fenryka/received_events","type":"User","site_admin":false},"body":"When selecting an annotated constructor for evolving a type make sure\r\nwe treat generics in the same manner we did when serialized. Effectively\r\nthrow away the template information and treat lists as lists and maps\r\nas maps\r\n","created_at":"2018-05-24T14:07:37Z","updated_at":"2018-05-24T14:17:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58d8e184d942718a150ffec944af24f67862ca13","assignee":{"login":"fenryka","id":3903362,"avatar_url":"https://avatars3.githubusercontent.com/u/3903362?v=4","gravatar_id":"","url":"https://api.github.com/users/fenryka","html_url":"https://github.com/fenryka","followers_url":"https://api.github.com/users/fenryka/followers","following_url":"https://api.github.com/users/fenryka/following{/other_user}","gists_url":"https://api.github.com/users/fenryka/gists{/gist_id}","starred_url":"https://api.github.com/users/fenryka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenryka/subscriptions","organizations_url":"https://api.github.com/users/fenryka/orgs","repos_url":"https://api.github.com/users/fenryka/repos","events_url":"https://api.github.com/users/fenryka/events{/privacy}","received_events_url":"https://api.github.com/users/fenryka/received_events","type":"User","site_admin":false},"assignees":[{"login":"fenryka","id":3903362,"avatar_url":"https://avatars3.githubusercontent.com/u/3903362?v=4","gravatar_id":"","url":"https://api.github.com/users/fenryka","html_url":"https://github.com/fenryka","followers_url":"https://api.github.com/users/fenryka/followers","following_url":"https://api.github.com/users/fenryka/following{/other_user}","gists_url":"https://api.github.com/users/fenryka/gists{/gist_id}","starred_url":"https://api.github.com/users/fenryka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenryka/subscriptions","organizations_url":"https://api.github.com/users/fenryka/orgs","repos_url":"https://api.github.com/users/fenryka/repos","events_url":"https://api.github.com/users/fenryka/events{/privacy}","received_events_url":"https://api.github.com/users/fenryka/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"kasiastreich","id":24268146,"avatar_url":"https://avatars1.githubusercontent.com/u/24268146?v=4","gravatar_id":"","url":"https://api.github.com/users/kasiastreich","html_url":"https://github.com/kasiastreich","followers_url":"https://api.github.com/users/kasiastreich/followers","following_url":"https://api.github.com/users/kasiastreich/following{/other_user}","gists_url":"https://api.github.com/users/kasiastreich/gists{/gist_id}","starred_url":"https://api.github.com/users/kasiastreich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasiastreich/subscriptions","organizations_url":"https://api.github.com/users/kasiastreich/orgs","repos_url":"https://api.github.com/users/kasiastreich/repos","events_url":"https://api.github.com/users/kasiastreich/events{/privacy}","received_events_url":"https://api.github.com/users/kasiastreich/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":456115737,"url":"https://api.github.com/repos/corda/corda/labels/bug","name":"bug","color":"ee0701","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/corda/corda/pulls/3232/commits","review_comments_url":"https://api.github.com/repos/corda/corda/pulls/3232/comments","review_comment_url":"https://api.github.com/repos/corda/corda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/corda/corda/issues/3232/comments","statuses_url":"https://api.github.com/repos/corda/corda/statuses/31c666205037515b6f3174fd91ccfef4ed776e60","head":{"label":"corda:kat/serializer-evolve-bug","ref":"kat/serializer-evolve-bug","sha":"31c666205037515b6f3174fd91ccfef4ed776e60","user":{"login":"corda","id":22600631,"avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"name":"corda","full_name":"corda/corda","owner":{"login":"corda","id":22600631,"avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/corda/corda","description":"Corda is a distributed ledger platform designed to record, manage and automate legal agreements between business partners. Designed by (and for) the world's largest financial institutions yet with applications in multiple industries.  It offers a unique response to the privacy and scalability challenges facing decentralised applications.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2018-05-24T13:44:05Z","pushed_at":"2018-05-24T14:07:38Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":152866,"stargazers_count":1909,"watchers_count":1909,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":502,"mirror_url":null,"archived":false,"open_issues_count":106,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":502,"open_issues":106,"watchers":1909,"default_branch":"master"}},"base":{"label":"corda:master","ref":"master","sha":"4adc0380a2f98d249dbec0cc1c41c4e1bbc099af","user":{"login":"corda","id":22600631,"avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"name":"corda","full_name":"corda/corda","owner":{"login":"corda","id":22600631,"avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/corda/corda","description":"Corda is a distributed ledger platform designed to record, manage and automate legal agreements between business partners. Designed by (and for) the world's largest financial institutions yet with applications in multiple industries.  It offers a unique response to the privacy and scalability challenges facing decentralised applications.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2018-05-24T13:44:05Z","pushed_at":"2018-05-24T14:07:38Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":152866,"stargazers_count":1909,"watchers_count":1909,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":502,"mirror_url":null,"archived":false,"open_issues_count":106,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":502,"open_issues":106,"watchers":1909,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/3232"},"html":{"href":"https://github.com/corda/corda/pull/3232"},"issue":{"href":"https://api.github.com/repos/corda/corda/issues/3232"},"comments":{"href":"https://api.github.com/repos/corda/corda/issues/3232/comments"},"review_comments":{"href":"https://api.github.com/repos/corda/corda/pulls/3232/comments"},"review_comment":{"href":"https://api.github.com/repos/corda/corda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/corda/corda/pulls/3232/commits"},"statuses":{"href":"https://api.github.com/repos/corda/corda/statuses/31c666205037515b6f3174fd91ccfef4ed776e60"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shamsasari"}}