mirror of https://github.com/apache/poi.git
Suppress forbidden-apis failing with MemoryLeakVerifier in JDK 18
Keep using Runtime.runFinalization() as long as it is available. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899497 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0c77cd4d55
commit
8412eb4503
|
@ -85,6 +85,7 @@ public class MemoryLeakVerifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressForbidden("Use finalization as long as it is available here and remove it when the JDK stops providing it")
|
||||||
private static void assertGarbageCollected(WeakReference<Object> ref, int maxIterations) throws InterruptedException {
|
private static void assertGarbageCollected(WeakReference<Object> ref, int maxIterations) throws InterruptedException {
|
||||||
Runtime runtime = Runtime.getRuntime();
|
Runtime runtime = Runtime.getRuntime();
|
||||||
for (int i = 0; i < maxIterations; i++) {
|
for (int i = 0; i < maxIterations; i++) {
|
||||||
|
|
Loading…
Reference in New Issue