forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use reflection to call cleaner on direct byte buffers in JDK9.
Motivation: Project Jigsaw in JDK9 has moved the direct byte buffer cleaner from sun.misc.Cleaner to java.lang.ref.Cleaner$Cleanable. This cause the current platform tests to throw a ClassNotFoundException, disabling the use of direct byte buffer cleaners. Modifications: I use reflection to find the clean method in either sun.misc.Cleaner or java.lang.ref.Cleaner$Cleanable. Result: Netty uses direct byte buffers on JDK9 as it already do on earlier JDKs.
- Loading branch information
1 parent
8780062
commit 34d8b51
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters