constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
386 stars 58 forks source link

Replacing deprecated finalize code #2184

Closed Quasar985 closed 1 month ago

Quasar985 commented 2 months ago

Prerequisites

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

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
84.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud