When java.nio.BufferCleaner invokes a cleaning action, is does so within a try/catch that prints an error message (including stack trace) and then exits the VM (via System.exit) with a failure code.
This behavior was based on that of jdk.internal.ref.Cleaner, which the BufferCleaner mechanism is replacing in the java.nio context. That behavior by jdk.internal.ref.Cleaner is very old, from before the mercurial age.
But that doesn't seem ideal for BufferCleaner. It should probably log the exception in some way and then continue processing cleanups.
This behavior was based on that of jdk.internal.ref.Cleaner, which the BufferCleaner mechanism is replacing in the java.nio context. That behavior by jdk.internal.ref.Cleaner is very old, from before the mercurial age.
But that doesn't seem ideal for BufferCleaner. It should probably log the exception in some way and then continue processing cleanups.
- relates to
-
JDK-8344332 (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner
-
- Resolved
-