Skip to content

Fix type confusion in Serializer.getSerializerRegistration#2604

Merged
riccardobl merged 4 commits intomasterfrom
copilot/fix-serializer-serialization-issue
Mar 22, 2026
Merged

Fix type confusion in Serializer.getSerializerRegistration#2604
riccardobl merged 4 commits intomasterfrom
copilot/fix-serializer-serialization-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Review of Serializable usage fix

Analysis:

  • Confirmed line 356 was correctly fixed to use java.io.Serializable.class
  • Investigate line 350: entry.getKey().isAssignableFrom(Serializable.class) - this may also need review
  • Understand the intent of line 350's logic
  • Determine if line 350 is correct or needs fixing
  • Run tests to validate any additional changes
  • Final code review and security check
Original prompt

This section details on the original issue you should resolve

<issue_title>Possible mixed use of java.io.Serializable and com.jme3.network.serializing.Serializable in SpiderMonkey serializer</issue_title>
<issue_description>

i think this should be java.io.Serializable.class not Serializable (aka com.jme3.network.serializing.Serializable).</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…line 356

Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
@riccardobl riccardobl marked this pull request as ready for review February 11, 2026 19:37
Copilot AI changed the title [WIP] Fix mixed use of Serializable in SpiderMonkey serializer Fix type confusion in Serializer.getSerializerRegistration Feb 11, 2026
Copilot AI requested a review from riccardobl February 11, 2026 19:37
@github-actions
Copy link

🖼️ 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:

  • Go to the (failed run) > Summary > Artifacts > screenshot-test-report
  • Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

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

@riccardobl
Copy link
Member

@gemini-code-assist review this

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a type confusion bug in Serializer.getSerializerRegistration by replacing the Serializable annotation with the java.io.Serializable interface in a type check. The change is correct. I have added one comment pointing out a similar issue on a nearby line that was likely overlooked and could be addressed as part of this pull request for completeness.

@riccardobl riccardobl merged commit 1d6b534 into master Mar 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible mixed use of java.io.Serializable and com.jme3.network.serializing.Serializable in SpiderMonkey serializer

2 participants