DSpace / DSpace

(Official) The DSpace digital asset management system that powers your Institutional Repository
https://wiki.lyrasis.org/display/DSDOC7x/
BSD 3-Clause "New" or "Revised" License
855 stars 1.29k forks source link

AbstractDSpaceIntegrationTest: consider removing or replacing method System.setSecurityManager #9592

Open saschaszott opened 1 month ago

saschaszott commented 1 month ago

Bug Description

When running JUnit integration tests on the main branch the following (red) message appears in IntelliJ:

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.dspace.AbstractDSpaceIntegrationTest (file:/local-path-to-dspace-clone/dspace-api/target/test-classes/)
WARNING: Please consider reporting this to the maintainers of org.dspace.AbstractDSpaceIntegrationTest
WARNING: System::setSecurityManager will be removed in a future release

It is caused by System.setSecurityManager() in AbstractDSpaceIntegrationTest:

https://github.com/DSpace/DSpace/blob/50aaec1ee223991e2a777e3da1186aaf301db11d/dspace-api/src/test/java/org/dspace/AbstractDSpaceIntegrationTest.java#L64

https://github.com/DSpace/DSpace/blob/50aaec1ee223991e2a777e3da1186aaf301db11d/dspace-api/src/test/java/org/dspace/AbstractDSpaceIntegrationTest.java#L100

tdonohue commented 1 month ago

I've seen this as well. It's just a warning at this point, and I'm not sure myself how to solve the issue (removing these calls causes tests to fail). But, it needs a volunteer to investigate & find a solution.