{"action":"created","comment":{"url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/comments/222234775","pull_request_review_id":161069055,"id":222234775,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjIzNDc3NQ==","diff_hunk":"@@ -0,0 +1,49 @@\n+/*\n+ * Copyright 2018 The Exonum Team\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ */\n+\n+package com.exonum.binding.common.serialization;\n+\n+import static com.exonum.binding.common.serialization.SerializationUtils.checkLength;\n+import static com.google.common.base.Preconditions.checkArgument;\n+\n+enum BoolSerializer implements Serializer<Boolean> {\n+  INSTANCE;\n+\n+  private static final int BOOLEAN_BYTES = 1;\n+  private static final byte BOOLEAN_TRUE = 1;\n+  private static final byte BOOLEAN_FALSE = 0;\n+\n+  @Override\n+  public byte[] toBytes(Boolean value) {\n+    byte b = value ? BOOLEAN_TRUE : BOOLEAN_FALSE;\n+    return new byte[]{b};\n+  }\n+\n+  @Override\n+  public Boolean fromBytes(byte[] serializedValue) {\n+    checkLength(serializedValue, BOOLEAN_BYTES);\n+    byte value = serializedValue[0];\n+    checkArgument(isValidBoolean(value), \"Is not a boolean value\");","path":"exonum-java-binding-common/src/main/java/com/exonum/binding/common/serialization/BoolSerializer.java","position":40,"original_position":40,"commit_id":"45d34d5bc5e5fb49e418ba643281b14a86465af8","original_commit_id":"45d34d5bc5e5fb49e418ba643281b14a86465af8","user":{"login":"dmitry-timofeev","id":7531824,"node_id":"MDQ6VXNlcjc1MzE4MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7531824?v=4","gravatar_id":"","url":"https://api.github.com/users/dmitry-timofeev","html_url":"https://github.com/dmitry-timofeev","followers_url":"https://api.github.com/users/dmitry-timofeev/followers","following_url":"https://api.github.com/users/dmitry-timofeev/following{/other_user}","gists_url":"https://api.github.com/users/dmitry-timofeev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitry-timofeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitry-timofeev/subscriptions","organizations_url":"https://api.github.com/users/dmitry-timofeev/orgs","repos_url":"https://api.github.com/users/dmitry-timofeev/repos","events_url":"https://api.github.com/users/dmitry-timofeev/events{/privacy}","received_events_url":"https://api.github.com/users/dmitry-timofeev/received_events","type":"User","site_admin":false},"body":"Please include the value to give a context.","created_at":"2018-10-03T09:03:17Z","updated_at":"2018-10-03T09:44:19Z","html_url":"https://github.com/exonum/exonum-java-binding/pull/514#discussion_r222234775","pull_request_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/comments/222234775"},"html":{"href":"https://github.com/exonum/exonum-java-binding/pull/514#discussion_r222234775"},"pull_request":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514"}}},"pull_request":{"url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514","id":219748146,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzQ4MTQ2","html_url":"https://github.com/exonum/exonum-java-binding/pull/514","diff_url":"https://github.com/exonum/exonum-java-binding/pull/514.diff","patch_url":"https://github.com/exonum/exonum-java-binding/pull/514.patch","issue_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/514","number":514,"state":"open","locked":false,"title":"Standard serializers [ECR-883]","user":{"login":"bullet-tooth","id":5055052,"node_id":"MDQ6VXNlcjUwNTUwNTI=","avatar_url":"https://avatars1.githubusercontent.com/u/5055052?v=4","gravatar_id":"","url":"https://api.github.com/users/bullet-tooth","html_url":"https://github.com/bullet-tooth","followers_url":"https://api.github.com/users/bullet-tooth/followers","following_url":"https://api.github.com/users/bullet-tooth/following{/other_user}","gists_url":"https://api.github.com/users/bullet-tooth/gists{/gist_id}","starred_url":"https://api.github.com/users/bullet-tooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bullet-tooth/subscriptions","organizations_url":"https://api.github.com/users/bullet-tooth/orgs","repos_url":"https://api.github.com/users/bullet-tooth/repos","events_url":"https://api.github.com/users/bullet-tooth/events{/privacy}","received_events_url":"https://api.github.com/users/bullet-tooth/received_events","type":"User","site_admin":false},"body":"## Overview\r\nImplemented standard serializers:\r\n- no-op\r\n- bool\r\n- fixed32 (integer)\r\n- fixed64 (long)\r\n- Private key\r\n- Public key\r\n- Float \r\n- Double\r\n\r\n---\r\nSee: https://jira.bf.local/browse/ECR-883\r\n\r\n### Definition of Done\r\n\r\n- [x] There are no TODOs left in the code\r\n- [x] Change is covered by automated [tests](https://github.com/exonum/exonum-java-binding/blob/master/CONTRIBUTING.md#tests)\r\n- [x] The [coding guidelines](https://github.com/exonum/exonum-java-binding/blob/master/CONTRIBUTING.md#the-code-style) are followed\r\n- [x] Public API has Javadoc\r\n- [x] Method preconditions are checked and documented in the Javadoc of the method\r\n- [x] Changelog is updated if needed (in case of notable or breaking changes)\r\n- [x] The continuous integration build passes\r\n","created_at":"2018-10-02T15:31:31Z","updated_at":"2018-10-03T09:44:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d038e0d40d0c4704510e5bebb66b8adc0865ad7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MakarovS","id":6428594,"node_id":"MDQ6VXNlcjY0Mjg1OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6428594?v=4","gravatar_id":"","url":"https://api.github.com/users/MakarovS","html_url":"https://github.com/MakarovS","followers_url":"https://api.github.com/users/MakarovS/followers","following_url":"https://api.github.com/users/MakarovS/following{/other_user}","gists_url":"https://api.github.com/users/MakarovS/gists{/gist_id}","starred_url":"https://api.github.com/users/MakarovS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MakarovS/subscriptions","organizations_url":"https://api.github.com/users/MakarovS/orgs","repos_url":"https://api.github.com/users/MakarovS/repos","events_url":"https://api.github.com/users/MakarovS/events{/privacy}","received_events_url":"https://api.github.com/users/MakarovS/received_events","type":"User","site_admin":false},{"login":"DENMROOT","id":7080455,"node_id":"MDQ6VXNlcjcwODA0NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7080455?v=4","gravatar_id":"","url":"https://api.github.com/users/DENMROOT","html_url":"https://github.com/DENMROOT","followers_url":"https://api.github.com/users/DENMROOT/followers","following_url":"https://api.github.com/users/DENMROOT/following{/other_user}","gists_url":"https://api.github.com/users/DENMROOT/gists{/gist_id}","starred_url":"https://api.github.com/users/DENMROOT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DENMROOT/subscriptions","organizations_url":"https://api.github.com/users/DENMROOT/orgs","repos_url":"https://api.github.com/users/DENMROOT/repos","events_url":"https://api.github.com/users/DENMROOT/events{/privacy}","received_events_url":"https://api.github.com/users/DENMROOT/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514/commits","review_comments_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514/comments","review_comment_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/514/comments","statuses_url":"https://api.github.com/repos/exonum/exonum-java-binding/statuses/45d34d5bc5e5fb49e418ba643281b14a86465af8","head":{"label":"exonum:ecr-883","ref":"ecr-883","sha":"45d34d5bc5e5fb49e418ba643281b14a86465af8","user":{"login":"exonum","id":23138442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTM4NDQy","avatar_url":"https://avatars1.githubusercontent.com/u/23138442?v=4","gravatar_id":"","url":"https://api.github.com/users/exonum","html_url":"https://github.com/exonum","followers_url":"https://api.github.com/users/exonum/followers","following_url":"https://api.github.com/users/exonum/following{/other_user}","gists_url":"https://api.github.com/users/exonum/gists{/gist_id}","starred_url":"https://api.github.com/users/exonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exonum/subscriptions","organizations_url":"https://api.github.com/users/exonum/orgs","repos_url":"https://api.github.com/users/exonum/repos","events_url":"https://api.github.com/users/exonum/events{/privacy}","received_events_url":"https://api.github.com/users/exonum/received_events","type":"Organization","site_admin":false},"repo":{"id":92375988,"node_id":"MDEwOlJlcG9zaXRvcnk5MjM3NTk4OA==","name":"exonum-java-binding","full_name":"exonum/exonum-java-binding","private":false,"owner":{"login":"exonum","id":23138442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTM4NDQy","avatar_url":"https://avatars1.githubusercontent.com/u/23138442?v=4","gravatar_id":"","url":"https://api.github.com/users/exonum","html_url":"https://github.com/exonum","followers_url":"https://api.github.com/users/exonum/followers","following_url":"https://api.github.com/users/exonum/following{/other_user}","gists_url":"https://api.github.com/users/exonum/gists{/gist_id}","starred_url":"https://api.github.com/users/exonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exonum/subscriptions","organizations_url":"https://api.github.com/users/exonum/orgs","repos_url":"https://api.github.com/users/exonum/repos","events_url":"https://api.github.com/users/exonum/events{/privacy}","received_events_url":"https://api.github.com/users/exonum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/exonum/exonum-java-binding","description":"Java Binding for the Exonum blockchain framework","fork":false,"url":"https://api.github.com/repos/exonum/exonum-java-binding","forks_url":"https://api.github.com/repos/exonum/exonum-java-binding/forks","keys_url":"https://api.github.com/repos/exonum/exonum-java-binding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exonum/exonum-java-binding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exonum/exonum-java-binding/teams","hooks_url":"https://api.github.com/repos/exonum/exonum-java-binding/hooks","issue_events_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/events{/number}","events_url":"https://api.github.com/repos/exonum/exonum-java-binding/events","assignees_url":"https://api.github.com/repos/exonum/exonum-java-binding/assignees{/user}","branches_url":"https://api.github.com/repos/exonum/exonum-java-binding/branches{/branch}","tags_url":"https://api.github.com/repos/exonum/exonum-java-binding/tags","blobs_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/refs{/sha}","trees_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exonum/exonum-java-binding/statuses/{sha}","languages_url":"https://api.github.com/repos/exonum/exonum-java-binding/languages","stargazers_url":"https://api.github.com/repos/exonum/exonum-java-binding/stargazers","contributors_url":"https://api.github.com/repos/exonum/exonum-java-binding/contributors","subscribers_url":"https://api.github.com/repos/exonum/exonum-java-binding/subscribers","subscription_url":"https://api.github.com/repos/exonum/exonum-java-binding/subscription","commits_url":"https://api.github.com/repos/exonum/exonum-java-binding/commits{/sha}","git_commits_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/commits{/sha}","comments_url":"https://api.github.com/repos/exonum/exonum-java-binding/comments{/number}","issue_comment_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/comments{/number}","contents_url":"https://api.github.com/repos/exonum/exonum-java-binding/contents/{+path}","compare_url":"https://api.github.com/repos/exonum/exonum-java-binding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exonum/exonum-java-binding/merges","archive_url":"https://api.github.com/repos/exonum/exonum-java-binding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exonum/exonum-java-binding/downloads","issues_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues{/number}","pulls_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls{/number}","milestones_url":"https://api.github.com/repos/exonum/exonum-java-binding/milestones{/number}","notifications_url":"https://api.github.com/repos/exonum/exonum-java-binding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exonum/exonum-java-binding/labels{/name}","releases_url":"https://api.github.com/repos/exonum/exonum-java-binding/releases{/id}","deployments_url":"https://api.github.com/repos/exonum/exonum-java-binding/deployments","created_at":"2017-05-25T07:12:56Z","updated_at":"2018-10-01T09:07:03Z","pushed_at":"2018-10-03T08:18:08Z","git_url":"git://github.com/exonum/exonum-java-binding.git","ssh_url":"git@github.com:exonum/exonum-java-binding.git","clone_url":"https://github.com/exonum/exonum-java-binding.git","svn_url":"https://github.com/exonum/exonum-java-binding","homepage":"http://exonum.com","size":2516,"stargazers_count":44,"watchers_count":44,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":22,"watchers":44,"default_branch":"master"}},"base":{"label":"exonum:master","ref":"master","sha":"e78cd9f95a8eb16ee97caa59f719902c3847fd90","user":{"login":"exonum","id":23138442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTM4NDQy","avatar_url":"https://avatars1.githubusercontent.com/u/23138442?v=4","gravatar_id":"","url":"https://api.github.com/users/exonum","html_url":"https://github.com/exonum","followers_url":"https://api.github.com/users/exonum/followers","following_url":"https://api.github.com/users/exonum/following{/other_user}","gists_url":"https://api.github.com/users/exonum/gists{/gist_id}","starred_url":"https://api.github.com/users/exonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exonum/subscriptions","organizations_url":"https://api.github.com/users/exonum/orgs","repos_url":"https://api.github.com/users/exonum/repos","events_url":"https://api.github.com/users/exonum/events{/privacy}","received_events_url":"https://api.github.com/users/exonum/received_events","type":"Organization","site_admin":false},"repo":{"id":92375988,"node_id":"MDEwOlJlcG9zaXRvcnk5MjM3NTk4OA==","name":"exonum-java-binding","full_name":"exonum/exonum-java-binding","private":false,"owner":{"login":"exonum","id":23138442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTM4NDQy","avatar_url":"https://avatars1.githubusercontent.com/u/23138442?v=4","gravatar_id":"","url":"https://api.github.com/users/exonum","html_url":"https://github.com/exonum","followers_url":"https://api.github.com/users/exonum/followers","following_url":"https://api.github.com/users/exonum/following{/other_user}","gists_url":"https://api.github.com/users/exonum/gists{/gist_id}","starred_url":"https://api.github.com/users/exonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exonum/subscriptions","organizations_url":"https://api.github.com/users/exonum/orgs","repos_url":"https://api.github.com/users/exonum/repos","events_url":"https://api.github.com/users/exonum/events{/privacy}","received_events_url":"https://api.github.com/users/exonum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/exonum/exonum-java-binding","description":"Java Binding for the Exonum blockchain framework","fork":false,"url":"https://api.github.com/repos/exonum/exonum-java-binding","forks_url":"https://api.github.com/repos/exonum/exonum-java-binding/forks","keys_url":"https://api.github.com/repos/exonum/exonum-java-binding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exonum/exonum-java-binding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exonum/exonum-java-binding/teams","hooks_url":"https://api.github.com/repos/exonum/exonum-java-binding/hooks","issue_events_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/events{/number}","events_url":"https://api.github.com/repos/exonum/exonum-java-binding/events","assignees_url":"https://api.github.com/repos/exonum/exonum-java-binding/assignees{/user}","branches_url":"https://api.github.com/repos/exonum/exonum-java-binding/branches{/branch}","tags_url":"https://api.github.com/repos/exonum/exonum-java-binding/tags","blobs_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/refs{/sha}","trees_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exonum/exonum-java-binding/statuses/{sha}","languages_url":"https://api.github.com/repos/exonum/exonum-java-binding/languages","stargazers_url":"https://api.github.com/repos/exonum/exonum-java-binding/stargazers","contributors_url":"https://api.github.com/repos/exonum/exonum-java-binding/contributors","subscribers_url":"https://api.github.com/repos/exonum/exonum-java-binding/subscribers","subscription_url":"https://api.github.com/repos/exonum/exonum-java-binding/subscription","commits_url":"https://api.github.com/repos/exonum/exonum-java-binding/commits{/sha}","git_commits_url":"https://api.github.com/repos/exonum/exonum-java-binding/git/commits{/sha}","comments_url":"https://api.github.com/repos/exonum/exonum-java-binding/comments{/number}","issue_comment_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues/comments{/number}","contents_url":"https://api.github.com/repos/exonum/exonum-java-binding/contents/{+path}","compare_url":"https://api.github.com/repos/exonum/exonum-java-binding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exonum/exonum-java-binding/merges","archive_url":"https://api.github.com/repos/exonum/exonum-java-binding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exonum/exonum-java-binding/downloads","issues_url":"https://api.github.com/repos/exonum/exonum-java-binding/issues{/number}","pulls_url":"https://api.github.com/repos/exonum/exonum-java-binding/pulls{/number}","milestones_url":"https://api.github.com/repos/exonum/exonum-java-binding/milestones{/number}","notifications_url":"https://api.github.com/repos/exonum/exonum-java-binding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exonum/exonum-java-binding/labels{/name}","releases_url":"https://api.github.com/repos/exonum/exonum-java-binding/releases{/id}","deployments_url":"https://api.github.com/repos/exonum/exonum-java-binding/deployments","created_at":"2017-05-25T07:12:56Z","updated_at":"2018-10-01T09:07:03Z","pushed_at":"2018-10-03T08:18:08Z","git_url":"git://github.com/exonum/exonum-java-binding.git","ssh_url":"git@github.com:exonum/exonum-java-binding.git","clone_url":"https://github.com/exonum/exonum-java-binding.git","svn_url":"https://github.com/exonum/exonum-java-binding","homepage":"http://exonum.com","size":2516,"stargazers_count":44,"watchers_count":44,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":22,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514"},"html":{"href":"https://github.com/exonum/exonum-java-binding/pull/514"},"issue":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/issues/514"},"comments":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/exonum/exonum-java-binding/statuses/45d34d5bc5e5fb49e418ba643281b14a86465af8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dmitry-timofeev"}}