{"action":"created","comment":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/233562116","pull_request_review_id":175006474,"id":233562116,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzU2MjExNg==","diff_hunk":"@@ -29,26 +29,28 @@ public MapProperty(final String name, final String description, final Map<T, U>\n   }\n \n   @SuppressWarnings(\"unchecked\")\n-  private void resetProperties(final Map<T, U> map, final List<IEditableProperty> properties, final String name,\n+  private void resetProperties(final Map<T, U> map, final List<IEditableProperty<U>> properties, final String name,\n       final String description) {\n     properties.clear();\n     for (final Entry<T, U> entry : map.entrySet()) {\n       final String key = (String) entry.getKey();\n       final U value = entry.getValue();\n       if (value instanceof Boolean) {\n-        properties.add(new BooleanProperty(key, description, ((Boolean) value)));\n+        properties.add((IEditableProperty<U>) new BooleanProperty(key, description, ((Boolean) value)));","path":"game-core/src/main/java/games/strategy/engine/data/properties/MapProperty.java","position":27,"original_position":27,"commit_id":"1a65085c24387eadf302d9f473a25e1e46f0efcb","original_commit_id":"466bb6221d3763ebf40e52b11bcf29ed75ec551e","user":{"login":"ssoloff","id":4826349,"node_id":"MDQ6VXNlcjQ4MjYzNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"body":"I kind of recant my assertion that the value type of the map should be `Object`.  I started to write some unit tests for the `MapProperty#validate()` method and discovered that the implementation forces the value type of all entries to be the same (at least according to the LSP).  So, theoretically, the map values would be homogeneous.\r\n\r\nInteresting to note, however, that the validation check doesn't occur via the constructor, so one could slip in a heterogeneous map unintentionally.","created_at":"2018-11-14T18:17:35Z","updated_at":"2018-11-14T18:17:36Z","html_url":"https://github.com/triplea-game/triplea/pull/4287#discussion_r233562116","pull_request_url":"https://api.github.com/repos/triplea-game/triplea/pulls/4287","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/233562116"},"html":{"href":"https://github.com/triplea-game/triplea/pull/4287#discussion_r233562116"},"pull_request":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/4287"}},"in_reply_to_id":230635867},"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/4287","id":228067352,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MDY3MzUy","html_url":"https://github.com/triplea-game/triplea/pull/4287","diff_url":"https://github.com/triplea-game/triplea/pull/4287.diff","patch_url":"https://github.com/triplea-game/triplea/pull/4287.patch","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/4287","number":4287,"state":"closed","locked":false,"title":"Property generics","user":{"login":"RoiEXLab","id":8350879,"node_id":"MDQ6VXNlcjgzNTA4Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"body":"## Overview\r\nAs announced in #4280 this PR adds a generic type parameter for IEditableProperty subclasses and the interface itself in order to avoid boilerplate code that casts types around.\r\nThere are some places where this turned out better than on other places, so don't hesitate to tell me about your suggestions, there are a some unchecked casts left that are not really avoidable in my opinion.\r\n\r\n## Functional Changes\r\nNone.\r\n\r\n## Manual Testing Performed\r\nI verified I could play a normal game without any ClassCastExceptions.","created_at":"2018-11-02T21:48:04Z","updated_at":"2018-11-14T18:17:36Z","closed_at":"2018-11-05T22:39:08Z","merged_at":"2018-11-05T22:39:08Z","merge_commit_sha":"a633377ed418cef21a4584e880c965e11a94206d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/triplea-game/triplea/pulls/4287/commits","review_comments_url":"https://api.github.com/repos/triplea-game/triplea/pulls/4287/comments","review_comment_url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/4287/comments","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/1a65085c24387eadf302d9f473a25e1e46f0efcb","head":{"label":"RoiEXLab:property-generics","ref":"property-generics","sha":"1a65085c24387eadf302d9f473a25e1e46f0efcb","user":{"login":"RoiEXLab","id":8350879,"node_id":"MDQ6VXNlcjgzNTA4Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"repo":{"id":57201503,"node_id":"MDEwOlJlcG9zaXRvcnk1NzIwMTUwMw==","name":"triplea","full_name":"RoiEXLab/triplea","private":false,"owner":{"login":"RoiEXLab","id":8350879,"node_id":"MDQ6VXNlcjgzNTA4Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"html_url":"https://github.com/RoiEXLab/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":true,"url":"https://api.github.com/repos/RoiEXLab/triplea","forks_url":"https://api.github.com/repos/RoiEXLab/triplea/forks","keys_url":"https://api.github.com/repos/RoiEXLab/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoiEXLab/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoiEXLab/triplea/teams","hooks_url":"https://api.github.com/repos/RoiEXLab/triplea/hooks","issue_events_url":"https://api.github.com/repos/RoiEXLab/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/RoiEXLab/triplea/events","assignees_url":"https://api.github.com/repos/RoiEXLab/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/RoiEXLab/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/RoiEXLab/triplea/tags","blobs_url":"https://api.github.com/repos/RoiEXLab/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoiEXLab/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoiEXLab/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoiEXLab/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoiEXLab/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/RoiEXLab/triplea/languages","stargazers_url":"https://api.github.com/repos/RoiEXLab/triplea/stargazers","contributors_url":"https://api.github.com/repos/RoiEXLab/triplea/contributors","subscribers_url":"https://api.github.com/repos/RoiEXLab/triplea/subscribers","subscription_url":"https://api.github.com/repos/RoiEXLab/triplea/subscription","commits_url":"https://api.github.com/repos/RoiEXLab/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoiEXLab/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoiEXLab/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoiEXLab/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoiEXLab/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/RoiEXLab/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoiEXLab/triplea/merges","archive_url":"https://api.github.com/repos/RoiEXLab/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoiEXLab/triplea/downloads","issues_url":"https://api.github.com/repos/RoiEXLab/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/RoiEXLab/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/RoiEXLab/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/RoiEXLab/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoiEXLab/triplea/labels{/name}","releases_url":"https://api.github.com/repos/RoiEXLab/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/RoiEXLab/triplea/deployments","created_at":"2016-04-27T09:32:28Z","updated_at":"2018-11-11T11:06:18Z","pushed_at":"2018-11-11T18:40:34Z","git_url":"git://github.com/RoiEXLab/triplea.git","ssh_url":"git@github.com:RoiEXLab/triplea.git","clone_url":"https://github.com/RoiEXLab/triplea.git","svn_url":"https://github.com/RoiEXLab/triplea","homepage":null,"size":742833,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"triplea-game:master","ref":"master","sha":"e22db6e97c378a2e8d308cbb4956cfefd42009f2","user":{"login":"triplea-game","id":13318615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzE4NjE1","avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"repo":{"id":39766308,"node_id":"MDEwOlJlcG9zaXRvcnkzOTc2NjMwOA==","name":"triplea","full_name":"triplea-game/triplea","private":false,"owner":{"login":"triplea-game","id":13318615,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzE4NjE1","avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/triplea-game/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":false,"url":"https://api.github.com/repos/triplea-game/triplea","forks_url":"https://api.github.com/repos/triplea-game/triplea/forks","keys_url":"https://api.github.com/repos/triplea-game/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplea-game/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplea-game/triplea/teams","hooks_url":"https://api.github.com/repos/triplea-game/triplea/hooks","issue_events_url":"https://api.github.com/repos/triplea-game/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/triplea-game/triplea/events","assignees_url":"https://api.github.com/repos/triplea-game/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/triplea-game/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/triplea-game/triplea/tags","blobs_url":"https://api.github.com/repos/triplea-game/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplea-game/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplea-game/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplea-game/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/triplea-game/triplea/languages","stargazers_url":"https://api.github.com/repos/triplea-game/triplea/stargazers","contributors_url":"https://api.github.com/repos/triplea-game/triplea/contributors","subscribers_url":"https://api.github.com/repos/triplea-game/triplea/subscribers","subscription_url":"https://api.github.com/repos/triplea-game/triplea/subscription","commits_url":"https://api.github.com/repos/triplea-game/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplea-game/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplea-game/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplea-game/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplea-game/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/triplea-game/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplea-game/triplea/merges","archive_url":"https://api.github.com/repos/triplea-game/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplea-game/triplea/downloads","issues_url":"https://api.github.com/repos/triplea-game/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/triplea-game/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/triplea-game/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/triplea-game/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplea-game/triplea/labels{/name}","releases_url":"https://api.github.com/repos/triplea-game/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/triplea-game/triplea/deployments","created_at":"2015-07-27T09:32:58Z","updated_at":"2018-11-13T23:24:56Z","pushed_at":"2018-11-14T18:12:55Z","git_url":"git://github.com/triplea-game/triplea.git","ssh_url":"git@github.com:triplea-game/triplea.git","clone_url":"https://github.com/triplea-game/triplea.git","svn_url":"https://github.com/triplea-game/triplea","homepage":"https://triplea-game.org/","size":751565,"stargazers_count":140,"watchers_count":140,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":85,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":58,"open_issues":85,"watchers":140,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/4287"},"html":{"href":"https://github.com/triplea-game/triplea/pull/4287"},"issue":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/4287"},"comments":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/4287/comments"},"review_comments":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/4287/comments"},"review_comment":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/4287/commits"},"statuses":{"href":"https://api.github.com/repos/triplea-game/triplea/statuses/1a65085c24387eadf302d9f473a25e1e46f0efcb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ssoloff"}}