Title: scenegraph.io Problem with OrderedGroup · Issue #3 · hharrison/java3d-utils · GitHub
Open Graph Title: scenegraph.io Problem with OrderedGroup · Issue #3 · hharrison/java3d-utils
X Title: scenegraph.io Problem with OrderedGroup · Issue #3 · hharrison/java3d-utils
Description: When writing an OrderedGroup that has its index array set to null, j3d throws: java.lang.NullPointerException at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState.writeObject(OrderedGroupState.java:63) Not sure if t...
Open Graph Description: When writing an OrderedGroup that has its index array set to null, j3d throws: java.lang.NullPointerException at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState.writeObject(...
X Description: When writing an OrderedGroup that has its index array set to null, j3d throws: java.lang.NullPointerException at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState.writeObject(...
Opengraph URL: https://github.com/hharrison/java3d-utils/issues/3
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scenegraph.io Problem with OrderedGroup","articleBody":"When writing an OrderedGroup that has its index array set to null, j3d throws:\njava.lang.NullPointerException\nat\ncom.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState.writeObject(OrderedGroupState.java:63)\n\nNot sure if this is a bug, as one can always set the array, but considering Null is a legit value regarding the official OrderedGroupState docs, it would be nice if OrderedGroupState could handle an empty index array.\n\npsymagic commented 21 hours ago\nAfter investigating a little further, it really seems like someone forgot to implement io for the case of OrderedGroup.getChildIndexOrder() == null.\n\nJust did a working fix with these lines in com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState:\n\n@Override\npublic void writeObject(DataOutput out) throws IOException {\n super.writeObject(out);\n\n```\nint[] childIndexOrder = ((OrderedGroup) node).getChildIndexOrder();\n\nif (childIndexOrder == null) {\n out.writeInt(0);\n} else {\n out.writeInt(childIndexOrder.length);\n for (int i = 0; i \u003c childIndexOrder.length; i++) {\n out.writeInt(childIndexOrder[i]);\n }\n}\n```\n\n}\n\n@Override\npublic void readObject(DataInput in) throws IOException {\n super.readObject(in);\n\n```\nint length = in.readInt();\nint[] childIndexOrder;\n\nif (length == 0) {\n childIndexOrder = null;\n} else {\n childIndexOrder = new int[length];\n for (int i = 0; i \u003c childIndexOrder.length; i++) {\n childIndexOrder[i] = in.readInt();\n }\n}\n((OrderedGroup) node).setChildIndexOrder(childIndexOrder);\n```\n\n}\nIt might not be perfect thou.\n","author":{"url":"https://github.com/psymagic","@type":"Person","name":"psymagic"},"datePublished":"2016-01-11T17:39:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3/java3d-utils/issues/3"}
| 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:0db2562e-3041-85c3-3c03-b9e77ac8068f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA7C:335FF6:742B86D:9727C98:697E5D8D |
| html-safe-nonce | 0badac2e1a1ddfe504e44bd9dd5a87334b2cfe3568d8386af0538c279b8e9152 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTdDOjMzNUZGNjo3NDJCODZEOjk3MjdDOTg6Njk3RTVEOEQiLCJ2aXNpdG9yX2lkIjoiMTY5MjQ5Mjg1MzI5NDI5MjM2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9ac560bff2036544f09ded27b37a935b817768df2a55a664450881fdca17b063 |
| hovercard-subject-tag | issue:125997579 |
| 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/hharrison/java3d-utils/3/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2a72577c22ba2d66009fa82fccfb12dbcf8f57795ffdd4867221f9851e96429/hharrison/java3d-utils/issues/3 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2a72577c22ba2d66009fa82fccfb12dbcf8f57795ffdd4867221f9851e96429/hharrison/java3d-utils/issues/3 |
| og:image:alt | When writing an OrderedGroup that has its index array set to null, j3d throws: java.lang.NullPointerException at com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.OrderedGroupState.writeObject(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | psymagic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/hharrison/java3d-utils git https://github.com/hharrison/java3d-utils.git |
| octolytics-dimension-user_id | 27855 |
| octolytics-dimension-user_login | hharrison |
| octolytics-dimension-repository_id | 2060126 |
| octolytics-dimension-repository_nwo | hharrison/java3d-utils |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2060126 |
| octolytics-dimension-repository_network_root_nwo | hharrison/java3d-utils |
| 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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width