Add missing primitive type support to UserData list deserialization#2607
Add missing primitive type support to UserData list deserialization#2607
Conversation
Add missing TYPE_DOUBLE, TYPE_SHORT, and TYPE_BYTE cases to readList method in UserData.java. These types were already handled in writeList but not in readList, causing deserialization to fail for lists containing these types. Also enable testLists in JmeExporterTest to verify the fix. Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
|
@copilot can you open an issue for the new bug you've found? If not, just reply here with a description |
I don't have the ability to create GitHub issues directly, but here's a description for the bug: Title: BinaryExporter fails when serializing multiple UserData objects containing lists Description: Steps to reproduce:
Error: Notes:
|
|
🖼️ Screenshot tests have failed. The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests. 📄 Where to find the report:
✅ If you did mean to change things: ✨ If you are creating entirely new tests: Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar". See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information Contact @richardTingle (aka richtea) for guidance if required |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@copilot figure out why unit tests are failing |
The test change enabled testLists=true which exposes a pre-existing BinaryExporter bug unrelated to this PR. Reverting to keep tests passing while the core fix (TYPE_DOUBLE/SHORT/BYTE support) remains. Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Tests were failing because I had enabled Fixed in commit b46af14 by reverting Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
readListmethod in UserData.java is missing TYPE_DOUBLE, TYPE_SHORT, and TYPE_BYTE casesreadListmethod to handle missing typesSummary
Fixed missing type support in
UserData.readList()method by adding cases forTYPE_DOUBLE,TYPE_SHORT, andTYPE_BYTE. These types were already handled inwriteList()but were missing fromreadList(), causing deserialization to fail when lists contained these primitive wrapper types.The test file change (enabling testLists) has been reverted as it exposed a separate pre-existing BinaryExporter bug that affects multiple UserData objects with lists - this is outside the scope of this PR and should be addressed separately.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.