-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves MessageBuffer support for Java 11 (#514)
* Improves MessageBuffer support of Java 11 Switches the MessageBuffer implementation to MessageBufferU for Java versions at least 9. Since this implementation overrides almost all MessageBuffer's method it is safe to allow direct buffers as argument to MessageBuffer.wrap(ByteBuffer) * Corrects code style * Do not switch to MessageBufferU on Java 9+ Disables the automatic switch to MessageBufferU on Java 9+, falling back to a manual switch through Java properties. * Run Java 11 tests on universal buffer only Java 11 tests without the "msgpack.universal-buffer" property set where using the universal buffer anyway: Java 11's "java.specification.version" does not contain a dot, so MessageBuffer misidentified it as Java less than 7 and switched to MessageBufferU. * Fixes DirectBufferAccess#clean on Java 11 For Java 9+ we switch from a DirectByteBuffer.cleaner().clean() call to Unsafe.invokeCleaner(buffer). * Corrects style * Corrects whitespace * Restores Java8 tests. * Fixes IllegalAccessExceptions Adds missing setAccessible calls.
- Loading branch information
Showing
3 changed files
with
191 additions
and
28 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
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
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