Skip to content

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
@yaRnMcDonuts yaRnMcDonuts merged commit a905e41 into jMonkeyEngine:master May 16, 2025
15 checks passed
@capdevon capdevon deleted the capdevon-ParticleInfluencer branch June 15, 2025 22:54
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