Skip to content

DefaultParticleInfluencer: incorrect cloning of variables #2407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Apr 22, 2025

This PR removes the overridden clone() method from the NewtonianParticleInfluencer class. This method duplicates functionality present in the superclass. Furthermore, the manual cloning of primitive fields is redundant as Java handles this automatically.

In addition, this PR solves the problems of cloning class variables that extend the superclass DefaultParticleInfluencer. The fix is backward compatible and should not cause problems with older applications.

@capdevon capdevon changed the title NewtonianParticleInfluencer: remove unnecessary clone() method DefaultParticleInfluencer: incorrect cloning of variables Apr 22, 2025
JmeCloneable already extends the Cloneable interface so you can remove it
@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Apr 27, 2025
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.

2 participants