提交 ffa9abf6 编写于 作者: M mawinter69 提交者: Oleg Nenashev

[JENKINS-57515] update JNA library from 4.5.2 to 5.3.1 (#4060)

* [JENKINS-57515] update jna library to 5.3.1

This solves problems with loading native libraries of jna on AIX
platform when using openJDK or other JDKs that assume .so is the
extension for shared libraries

* Pointer.SIZE -> Native.POINTER_SIZE

* remove unnecessary import

* adjust to changed api
上级 b18b2e68
......@@ -534,7 +534,7 @@ THE SOFTWARE.
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.2</version>
<version>5.3.1</version>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
......
......@@ -26,7 +26,6 @@ package hudson.util;
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.LastErrorException;
import com.sun.jna.ptr.IntByReference;
import hudson.EnvVars;
......@@ -1442,7 +1441,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
* Read the remainder of psinfo_t differently depending on whether the
* Java process is 32-bit or 64-bit.
*/
if (Pointer.SIZE == 8) {
if (Native.POINTER_SIZE == 8) {
psinfo.seek(236); // offset of pr_argc
argc = adjust(psinfo.readInt());
argp = adjustL(psinfo.readLong());
......
......@@ -115,7 +115,7 @@ public class Kernel32Utils {
public static File getTempDir() {
Memory buf = new Memory(1024);
if (Kernel32.INSTANCE.GetTempPathW(512,buf)!=0) {// the first arg is number of wchar
return new File(buf.getString(0, true));
return new File(buf.getWideString(0));
} else {
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册