{"action":"created","comment":{"url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/comments/184859168","pull_request_review_id":116142519,"id":184859168,"diff_hunk":"@@ -52,21 +54,29 @@ public AnnotationMessageConverter(ByteOrder byteOrder) {\n     serializeMessage(requestBytes, message, FieldExtension.newBuilder()\n         .setFromByte(0)\n         .setToByte(messageBytesSize)\n-        .build());\n+        .setByteOrder(defaultByteOrder)\n+        .build(), false);\n     return requestBytes;\n   }\n \n-  private void serializeMessage(byte[] requestBytes, Message message, FieldExtension requestFieldExtension) {\n-    validateMessageSchema(message, requestFieldExtension);\n+  private void serializeMessage(byte[] requestBytes,\n+                                Message message,\n+                                FieldExtension messageFieldExtension,\n+                                boolean useFieldByteOrder) {\n+    validateMessageSchema(message, messageFieldExtension);\n     for (Map.Entry<FieldDescriptor, Object> entry : message.getAllFields().entrySet()) {\n       FieldDescriptor fieldDescriptor = entry.getKey();\n       Object fieldValue = entry.getValue();\n       String fieldName = fieldDescriptor.getName();\n-      FieldExtension relativeBytesRangeFieldExtension = getRelativeBytesRangeFieldExtension(requestFieldExtension, fieldDescriptor);\n+      FieldExtension relativeBytesRangeFieldExtension =\n+          getRelativeBytesRangeFieldExtension(messageFieldExtension,\n+              fieldDescriptor,\n+              message,\n+              useFieldByteOrder);\n       JavaType fieldType = fieldDescriptor.getType().getJavaType();\n       switch (fieldType) {\n         case MESSAGE:\n-          serializeMessage(requestBytes, (Message) fieldValue, relativeBytesRangeFieldExtension);\n+          serializeMessage(requestBytes, (Message) fieldValue, relativeBytesRangeFieldExtension, hasByteOrder(fieldDescriptor));","path":"blerpc/src/main/java/com/blerpc/AnnotationMessageConverter.java","position":77,"original_position":77,"commit_id":"d2e3303da15b7a53b8be360544a91b3e4b05be94","original_commit_id":"d2e3303da15b7a53b8be360544a91b3e4b05be94","user":{"login":"AseevEIDev","id":16954642,"avatar_url":"https://avatars3.githubusercontent.com/u/16954642?v=4","gravatar_id":"","url":"https://api.github.com/users/AseevEIDev","html_url":"https://github.com/AseevEIDev","followers_url":"https://api.github.com/users/AseevEIDev/followers","following_url":"https://api.github.com/users/AseevEIDev/following{/other_user}","gists_url":"https://api.github.com/users/AseevEIDev/gists{/gist_id}","starred_url":"https://api.github.com/users/AseevEIDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AseevEIDev/subscriptions","organizations_url":"https://api.github.com/users/AseevEIDev/orgs","repos_url":"https://api.github.com/users/AseevEIDev/repos","events_url":"https://api.github.com/users/AseevEIDev/events{/privacy}","received_events_url":"https://api.github.com/users/AseevEIDev/received_events","type":"User","site_admin":false},"body":"> в relativeBytesRangeFieldExtension уже есть эта информация\r\n\r\nКак раз и нет, в если в message byte order нет, то будет default или порядок более высокий по уровню. В любом случае DEFAULT не будет точно.","created_at":"2018-04-28T16:38:39Z","updated_at":"2018-04-28T16:38:39Z","html_url":"https://github.com/Monnoroch/blerpc-android/pull/40#discussion_r184859168","pull_request_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/comments/184859168"},"html":{"href":"https://github.com/Monnoroch/blerpc-android/pull/40#discussion_r184859168"},"pull_request":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40"}},"in_reply_to_id":184858780},"pull_request":{"url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40","id":184688176,"html_url":"https://github.com/Monnoroch/blerpc-android/pull/40","diff_url":"https://github.com/Monnoroch/blerpc-android/pull/40.diff","patch_url":"https://github.com/Monnoroch/blerpc-android/pull/40.patch","issue_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/40","number":40,"state":"open","locked":false,"title":"Add byte order annotation support for converter.","user":{"login":"AseevEIDev","id":16954642,"avatar_url":"https://avatars3.githubusercontent.com/u/16954642?v=4","gravatar_id":"","url":"https://api.github.com/users/AseevEIDev","html_url":"https://github.com/AseevEIDev","followers_url":"https://api.github.com/users/AseevEIDev/followers","following_url":"https://api.github.com/users/AseevEIDev/following{/other_user}","gists_url":"https://api.github.com/users/AseevEIDev/gists{/gist_id}","starred_url":"https://api.github.com/users/AseevEIDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AseevEIDev/subscriptions","organizations_url":"https://api.github.com/users/AseevEIDev/orgs","repos_url":"https://api.github.com/users/AseevEIDev/repos","events_url":"https://api.github.com/users/AseevEIDev/events{/privacy}","received_events_url":"https://api.github.com/users/AseevEIDev/received_events","type":"User","site_admin":false},"body":"Related to #27.","created_at":"2018-04-27T17:58:02Z","updated_at":"2018-04-28T16:38:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6eb41f7560cf33bd508d6faf1aeaca4c8925970","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40/commits","review_comments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40/comments","review_comment_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/40/comments","statuses_url":"https://api.github.com/repos/Monnoroch/blerpc-android/statuses/d2e3303da15b7a53b8be360544a91b3e4b05be94","head":{"label":"Monnoroch:converter_byte_order_support","ref":"converter_byte_order_support","sha":"d2e3303da15b7a53b8be360544a91b3e4b05be94","user":{"login":"Monnoroch","id":1500400,"avatar_url":"https://avatars0.githubusercontent.com/u/1500400?v=4","gravatar_id":"","url":"https://api.github.com/users/Monnoroch","html_url":"https://github.com/Monnoroch","followers_url":"https://api.github.com/users/Monnoroch/followers","following_url":"https://api.github.com/users/Monnoroch/following{/other_user}","gists_url":"https://api.github.com/users/Monnoroch/gists{/gist_id}","starred_url":"https://api.github.com/users/Monnoroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Monnoroch/subscriptions","organizations_url":"https://api.github.com/users/Monnoroch/orgs","repos_url":"https://api.github.com/users/Monnoroch/repos","events_url":"https://api.github.com/users/Monnoroch/events{/privacy}","received_events_url":"https://api.github.com/users/Monnoroch/received_events","type":"User","site_admin":false},"repo":{"id":115001774,"name":"blerpc-android","full_name":"Monnoroch/blerpc-android","owner":{"login":"Monnoroch","id":1500400,"avatar_url":"https://avatars0.githubusercontent.com/u/1500400?v=4","gravatar_id":"","url":"https://api.github.com/users/Monnoroch","html_url":"https://github.com/Monnoroch","followers_url":"https://api.github.com/users/Monnoroch/followers","following_url":"https://api.github.com/users/Monnoroch/following{/other_user}","gists_url":"https://api.github.com/users/Monnoroch/gists{/gist_id}","starred_url":"https://api.github.com/users/Monnoroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Monnoroch/subscriptions","organizations_url":"https://api.github.com/users/Monnoroch/orgs","repos_url":"https://api.github.com/users/Monnoroch/repos","events_url":"https://api.github.com/users/Monnoroch/events{/privacy}","received_events_url":"https://api.github.com/users/Monnoroch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Monnoroch/blerpc-android","description":null,"fork":false,"url":"https://api.github.com/repos/Monnoroch/blerpc-android","forks_url":"https://api.github.com/repos/Monnoroch/blerpc-android/forks","keys_url":"https://api.github.com/repos/Monnoroch/blerpc-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Monnoroch/blerpc-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Monnoroch/blerpc-android/teams","hooks_url":"https://api.github.com/repos/Monnoroch/blerpc-android/hooks","issue_events_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/events{/number}","events_url":"https://api.github.com/repos/Monnoroch/blerpc-android/events","assignees_url":"https://api.github.com/repos/Monnoroch/blerpc-android/assignees{/user}","branches_url":"https://api.github.com/repos/Monnoroch/blerpc-android/branches{/branch}","tags_url":"https://api.github.com/repos/Monnoroch/blerpc-android/tags","blobs_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Monnoroch/blerpc-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Monnoroch/blerpc-android/languages","stargazers_url":"https://api.github.com/repos/Monnoroch/blerpc-android/stargazers","contributors_url":"https://api.github.com/repos/Monnoroch/blerpc-android/contributors","subscribers_url":"https://api.github.com/repos/Monnoroch/blerpc-android/subscribers","subscription_url":"https://api.github.com/repos/Monnoroch/blerpc-android/subscription","commits_url":"https://api.github.com/repos/Monnoroch/blerpc-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Monnoroch/blerpc-android/contents/{+path}","compare_url":"https://api.github.com/repos/Monnoroch/blerpc-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Monnoroch/blerpc-android/merges","archive_url":"https://api.github.com/repos/Monnoroch/blerpc-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Monnoroch/blerpc-android/downloads","issues_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues{/number}","pulls_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Monnoroch/blerpc-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Monnoroch/blerpc-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Monnoroch/blerpc-android/labels{/name}","releases_url":"https://api.github.com/repos/Monnoroch/blerpc-android/releases{/id}","deployments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/deployments","created_at":"2017-12-21T12:07:48Z","updated_at":"2018-04-27T18:47:40Z","pushed_at":"2018-04-28T16:21:16Z","git_url":"git://github.com/Monnoroch/blerpc-android.git","ssh_url":"git@github.com:Monnoroch/blerpc-android.git","clone_url":"https://github.com/Monnoroch/blerpc-android.git","svn_url":"https://github.com/Monnoroch/blerpc-android","homepage":null,"size":1321,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"Monnoroch:master","ref":"master","sha":"f9c678a90e682cb3fc69a01337b99efdf1b62c73","user":{"login":"Monnoroch","id":1500400,"avatar_url":"https://avatars0.githubusercontent.com/u/1500400?v=4","gravatar_id":"","url":"https://api.github.com/users/Monnoroch","html_url":"https://github.com/Monnoroch","followers_url":"https://api.github.com/users/Monnoroch/followers","following_url":"https://api.github.com/users/Monnoroch/following{/other_user}","gists_url":"https://api.github.com/users/Monnoroch/gists{/gist_id}","starred_url":"https://api.github.com/users/Monnoroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Monnoroch/subscriptions","organizations_url":"https://api.github.com/users/Monnoroch/orgs","repos_url":"https://api.github.com/users/Monnoroch/repos","events_url":"https://api.github.com/users/Monnoroch/events{/privacy}","received_events_url":"https://api.github.com/users/Monnoroch/received_events","type":"User","site_admin":false},"repo":{"id":115001774,"name":"blerpc-android","full_name":"Monnoroch/blerpc-android","owner":{"login":"Monnoroch","id":1500400,"avatar_url":"https://avatars0.githubusercontent.com/u/1500400?v=4","gravatar_id":"","url":"https://api.github.com/users/Monnoroch","html_url":"https://github.com/Monnoroch","followers_url":"https://api.github.com/users/Monnoroch/followers","following_url":"https://api.github.com/users/Monnoroch/following{/other_user}","gists_url":"https://api.github.com/users/Monnoroch/gists{/gist_id}","starred_url":"https://api.github.com/users/Monnoroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Monnoroch/subscriptions","organizations_url":"https://api.github.com/users/Monnoroch/orgs","repos_url":"https://api.github.com/users/Monnoroch/repos","events_url":"https://api.github.com/users/Monnoroch/events{/privacy}","received_events_url":"https://api.github.com/users/Monnoroch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Monnoroch/blerpc-android","description":null,"fork":false,"url":"https://api.github.com/repos/Monnoroch/blerpc-android","forks_url":"https://api.github.com/repos/Monnoroch/blerpc-android/forks","keys_url":"https://api.github.com/repos/Monnoroch/blerpc-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Monnoroch/blerpc-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Monnoroch/blerpc-android/teams","hooks_url":"https://api.github.com/repos/Monnoroch/blerpc-android/hooks","issue_events_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/events{/number}","events_url":"https://api.github.com/repos/Monnoroch/blerpc-android/events","assignees_url":"https://api.github.com/repos/Monnoroch/blerpc-android/assignees{/user}","branches_url":"https://api.github.com/repos/Monnoroch/blerpc-android/branches{/branch}","tags_url":"https://api.github.com/repos/Monnoroch/blerpc-android/tags","blobs_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Monnoroch/blerpc-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Monnoroch/blerpc-android/languages","stargazers_url":"https://api.github.com/repos/Monnoroch/blerpc-android/stargazers","contributors_url":"https://api.github.com/repos/Monnoroch/blerpc-android/contributors","subscribers_url":"https://api.github.com/repos/Monnoroch/blerpc-android/subscribers","subscription_url":"https://api.github.com/repos/Monnoroch/blerpc-android/subscription","commits_url":"https://api.github.com/repos/Monnoroch/blerpc-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Monnoroch/blerpc-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Monnoroch/blerpc-android/contents/{+path}","compare_url":"https://api.github.com/repos/Monnoroch/blerpc-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Monnoroch/blerpc-android/merges","archive_url":"https://api.github.com/repos/Monnoroch/blerpc-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Monnoroch/blerpc-android/downloads","issues_url":"https://api.github.com/repos/Monnoroch/blerpc-android/issues{/number}","pulls_url":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Monnoroch/blerpc-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Monnoroch/blerpc-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Monnoroch/blerpc-android/labels{/name}","releases_url":"https://api.github.com/repos/Monnoroch/blerpc-android/releases{/id}","deployments_url":"https://api.github.com/repos/Monnoroch/blerpc-android/deployments","created_at":"2017-12-21T12:07:48Z","updated_at":"2018-04-27T18:47:40Z","pushed_at":"2018-04-28T16:21:16Z","git_url":"git://github.com/Monnoroch/blerpc-android.git","ssh_url":"git@github.com:Monnoroch/blerpc-android.git","clone_url":"https://github.com/Monnoroch/blerpc-android.git","svn_url":"https://github.com/Monnoroch/blerpc-android","homepage":null,"size":1321,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40"},"html":{"href":"https://github.com/Monnoroch/blerpc-android/pull/40"},"issue":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/40"},"comments":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/Monnoroch/blerpc-android/statuses/d2e3303da15b7a53b8be360544a91b3e4b05be94"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"AseevEIDev"}}