[x] Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait
for the "CI / Unit Tests") to complete first. Failed Unit tests can be
debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
Replacing finalize methods, which have been deprecated for many versions of java, with java's cleaner Api. Cleaners will call the same function as finalize to clean up objects in memory manager.
Alternate Designs
Phantom references are another solution to replacing finalize. Cleaner was chosen as it requires far less refacotring to work.
Why Should This Be In Core?
N/A
Benefits
Deprecated code is removed.
Possible Drawbacks
If done incorrectly, it may cause memory related issues.
Verification Process
Run the newly added tests that verify memory manger has removed unused objects.
Prerequisites
[x] Reviewed the checklist
[x] Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait for the "CI / Unit Tests") to complete first. Failed Unit tests can be debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
Replacing
finalize
methods, which have been deprecated for many versions of java, with java's cleaner Api. Cleaners will call the same function as finalize to clean up objects in memory manager.Alternate Designs
Phantom references are another solution to replacing finalize. Cleaner was chosen as it requires far less refacotring to work.
Why Should This Be In Core?
N/A
Benefits
Deprecated code is removed.
Possible Drawbacks
If done incorrectly, it may cause memory related issues.
Verification Process
Run the newly added tests that verify memory manger has removed unused objects.
Applicable Issues
https://github.com/constellation-app/constellation/issues/1521