forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make JNA optional for tests and move classes to bootstrap package
Today, JNA is a optional dependency in the build but when running tests or running with mlockall set to true, JNA must be on the classpath for Windows systems since we always try to load JNA classes when using mlockall. The old Natives class was renamed to JNANatives, and a new Natives class is introduced without any direct imports on JNA classes. The Natives class checks to see if JNA classes are available at startup. If the classes are available the Natives class will delegate to the JNANatives class. If the classes are not available the Natives class will not use the JNANatives class, which results in no additional attempts to load JNA classes. Additionally, all of the JNA classes were moved to the bootstrap package and made package private as this is the only place they should be called from. Closes elastic#11360
- Loading branch information
Showing
14 changed files
with
174 additions
and
95 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
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
Oops, something went wrong.