Title: extend _read_field_value function · Issue #46 · tcalmant/python-javaobj · GitHub
Open Graph Title: extend _read_field_value function · Issue #46 · tcalmant/python-javaobj
X Title: extend _read_field_value function · Issue #46 · tcalmant/python-javaobj
Description: Hello, thanks for your nice project which helped my a lot reading raw data. I have one improvement request regarding the _read_field_value function. For me it was necessary to add at line 628 the check if sub_type_code == TermincalCode.T...
Open Graph Description: Hello, thanks for your nice project which helped my a lot reading raw data. I have one improvement request regarding the _read_field_value function. For me it was necessary to add at line 628 the c...
X Description: Hello, thanks for your nice project which helped my a lot reading raw data. I have one improvement request regarding the _read_field_value function. For me it was necessary to add at line 628 the c...
Opengraph URL: https://github.com/tcalmant/python-javaobj/issues/46
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"extend _read_field_value function","articleBody":"Hello, \r\n\r\nthanks for your nice project which helped my a lot reading raw data. \r\nI have one improvement request regarding the _read_field_value function. \r\n\r\nFor me it was necessary to add at line 628 the check \r\n```\r\nif sub_type_code == TermincalCode.TC_NULL:\r\n return None\r\n```\r\n\r\n\r\nbecause there where some null entries in the file. \r\n\r\n```\r\ndef _read_field_value(self, field_type):\r\n # type: (FieldType) -\u003e Any\r\n \"\"\"\r\n Reads the value of an instance field\r\n \"\"\"\r\n if field_type == FieldType.BYTE:\r\n return self.__reader.read_byte()\r\n if field_type == FieldType.CHAR:\r\n return self.__reader.read_char()\r\n if field_type == FieldType.DOUBLE:\r\n return self.__reader.read_double()\r\n if field_type == FieldType.FLOAT:\r\n return self.__reader.read_float()\r\n if field_type == FieldType.INTEGER:\r\n return self.__reader.read_int()\r\n if field_type == FieldType.LONG:\r\n return self.__reader.read_long()\r\n if field_type == FieldType.SHORT:\r\n return self.__reader.read_short()\r\n if field_type == FieldType.BOOLEAN:\r\n return self.__reader.read_bool()\r\n if field_type in (FieldType.OBJECT, FieldType.ARRAY):\r\n sub_type_code = self.__reader.read_byte()\r\n if field_type == FieldType.ARRAY:\r\n **if sub_type_code == TerminalCode.TC_NULL:\r\n return None**\r\n if sub_type_code == TerminalCode.TC_REFERENCE:\r\n return self._do_classdesc(sub_type_code)\r\n if sub_type_code != TerminalCode.TC_ARRAY:\r\n raise ValueError(\r\n \"Array type listed, but type code != TC_ARRAY\"\r\n )\r\n\r\n content = self._read_content(sub_type_code, False)\r\n if content is not None and content.is_exception:\r\n raise ExceptionRead(content)\r\n\r\n return content\r\n```","author":{"url":"https://github.com/photoniker","@type":"Person","name":"photoniker"},"datePublished":"2021-04-30T05:50:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/46/python-javaobj/issues/46"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4b3a0edb-280b-f6c2-d298-bce21002127e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CA6:164E7F:1F032CA:28E6D81:696B03D3 |
| html-safe-nonce | e90a6ec686f399e413ba80006915456c7380efbf49390c3fe9ca3c13fbbdc518 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0E2OjE2NEU3RjoxRjAzMkNBOjI4RTZEODE6Njk2QjAzRDMiLCJ2aXNpdG9yX2lkIjoiMTc5ODk2OTkxNTgwOTEzNzYxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 586c986248885aca5f6c2a4bae7682d3e0023030df18f22dc60ede55ee1aab89 |
| hovercard-subject-tag | issue:872050243 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tcalmant/python-javaobj/46/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e22e35d7b503f057fdcc1c79e2ece1f26e2b73c7df6ca8adc604a23de76d8b10/tcalmant/python-javaobj/issues/46 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e22e35d7b503f057fdcc1c79e2ece1f26e2b73c7df6ca8adc604a23de76d8b10/tcalmant/python-javaobj/issues/46 |
| og:image:alt | Hello, thanks for your nice project which helped my a lot reading raw data. I have one improvement request regarding the _read_field_value function. For me it was necessary to add at line 628 the c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | photoniker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/tcalmant/python-javaobj git https://github.com/tcalmant/python-javaobj.git |
| octolytics-dimension-user_id | 1540582 |
| octolytics-dimension-user_login | tcalmant |
| octolytics-dimension-repository_id | 15333794 |
| octolytics-dimension-repository_nwo | tcalmant/python-javaobj |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 15333794 |
| octolytics-dimension-repository_network_root_nwo | tcalmant/python-javaobj |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width