[java] Suppress System.runFinalization() removal warnings

These need to be addressed, but meanwhile it makes running the testsuite
with OpenJDK 21 or newer unhelpfully noisy so suppressing it seems more
helpful than not.

Closes: #2819
This commit is contained in:
Olly Betts 2024-03-01 10:42:22 +13:00
parent 8a19cb77ad
commit ec56bff28d
6 changed files with 16 additions and 0 deletions

View File

@ -10,6 +10,8 @@ public class cpp11_std_unique_ptr_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC()
{
System.gc();

View File

@ -12,6 +12,8 @@ public class director_pass_by_value_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC() {
System.gc();
System.runFinalization();

View File

@ -13,6 +13,8 @@ public class java_director_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC()
{
System.gc();

View File

@ -13,6 +13,8 @@ public class li_boost_intrusive_ptr_runme {
// Debugging flag
public final static boolean debug = false;
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC()
{
System.gc();
@ -23,6 +25,8 @@ public class li_boost_intrusive_ptr_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
public static void main(String argv[])
{
if (debug)

View File

@ -13,6 +13,8 @@ public class li_boost_shared_ptr_runme {
// Debugging flag
public final static boolean debug = false;
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC()
{
System.gc();
@ -23,6 +25,8 @@ public class li_boost_shared_ptr_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
public static void main(String argv[])
{
if (debug)

View File

@ -10,6 +10,8 @@ public class li_std_auto_ptr_runme {
}
}
// Suppress warning about System.runFinalization() call.
@SuppressWarnings({"deprecation", "removal"})
private static void WaitForGC()
{
System.gc();