Restore class that is still in use
This commit is contained in:
parent
7df3821000
commit
46166b9b40
|
@ -0,0 +1,25 @@
|
|||
package org.elasticsearch.gradle.test;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.WString;
|
||||
import org.apache.tools.ant.taskdefs.condition.Os;
|
||||
|
||||
public class JNAKernel32Library {
|
||||
|
||||
private static final class Holder {
|
||||
private static final JNAKernel32Library instance = new JNAKernel32Library();
|
||||
}
|
||||
|
||||
static JNAKernel32Library getInstance() {
|
||||
return Holder.instance;
|
||||
}
|
||||
|
||||
private JNAKernel32Library() {
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
Native.register("kernel32");
|
||||
}
|
||||
}
|
||||
|
||||
native int GetShortPathNameW(WString lpszLongPath, char[] lpszShortPath, int cchBuffer);
|
||||
|
||||
}
|
Loading…
Reference in New Issue