Update to upstream version 1.10.3
This commit is contained in:
parent
5f42db7496
commit
b106f943dc
@ -1,14 +1,14 @@
|
|||||||
From 9f9ca4a15ef217284557d1fa88dfed8551a365ae Mon Sep 17 00:00:00 2001
|
From a588d17702b23f3656ec5e05575e308597f6472a Mon Sep 17 00:00:00 2001
|
||||||
From: Marian Koncek <mkoncek@redhat.com>
|
From: Marian Koncek <mkoncek@redhat.com>
|
||||||
Date: Thu, 12 Sep 2019 11:18:51 +0200
|
Date: Thu, 21 Nov 2019 16:23:31 +0100
|
||||||
Subject: [PATCH] Remove dependency on jna
|
Subject: [PATCH] Remove dependency on jna
|
||||||
|
|
||||||
---
|
---
|
||||||
.../net/bytebuddy/agent/VirtualMachine.java | 2234 +++--------------
|
.../net/bytebuddy/agent/VirtualMachine.java | 2242 +++--------------
|
||||||
1 file changed, 357 insertions(+), 1877 deletions(-)
|
1 file changed, 357 insertions(+), 1885 deletions(-)
|
||||||
|
|
||||||
diff --git a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
diff --git a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
||||||
index 6e16424..e2138c1 100644
|
index 7e37395..535af5e 100644
|
||||||
--- a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
--- a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
||||||
+++ b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
+++ b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
|
||||||
@@ -15,11 +15,6 @@
|
@@ -15,11 +15,6 @@
|
||||||
@ -23,19 +23,7 @@ index 6e16424..e2138c1 100644
|
|||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@@ -149,11 +144,6 @@ public interface VirtualMachine {
|
@@ -227,23 +222,6 @@ public interface VirtualMachine {
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
public Class<? extends VirtualMachine> run() {
|
|
||||||
- try {
|
|
||||||
- Class.forName("com.sun.jna.Platform");
|
|
||||||
- } catch (ClassNotFoundException exception) {
|
|
||||||
- throw new IllegalStateException("Optional JNA dependency is not available", exception);
|
|
||||||
- }
|
|
||||||
return System.getProperty("java.vm.vendor").toUpperCase(Locale.US).contains("J9")
|
|
||||||
? ForOpenJ9.class
|
|
||||||
: ForHotSpot.class;
|
|
||||||
@@ -227,23 +217,6 @@ public interface VirtualMachine {
|
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +47,7 @@ index 6e16424..e2138c1 100644
|
|||||||
/**
|
/**
|
||||||
* Attaches to the supplied process id using the supplied connection factory.
|
* Attaches to the supplied process id using the supplied connection factory.
|
||||||
*
|
*
|
||||||
@@ -679,1905 +652,412 @@ public interface VirtualMachine {
|
@@ -679,1918 +657,412 @@ public interface VirtualMachine {
|
||||||
*/
|
*/
|
||||||
protected abstract int read(T connection, byte[] buffer) throws IOException;
|
protected abstract int read(T connection, byte[] buffer) throws IOException;
|
||||||
}
|
}
|
||||||
@ -702,6 +690,12 @@ index 6e16424..e2138c1 100644
|
|||||||
- public static class Factory implements Connection.Factory {
|
- public static class Factory implements Connection.Factory {
|
||||||
-
|
-
|
||||||
- /**
|
- /**
|
||||||
|
- * The name of the native code library that is included in this artifact to support Windows attachment.
|
||||||
|
- * This property can be set by other libraries that shade Byte Buddy agent and relocates the library.
|
||||||
|
- */
|
||||||
|
- public static final String LIBRARY_NAME = "net.bytebuddy.library.name";
|
||||||
|
-
|
||||||
|
- /**
|
||||||
- * The library to use for communicating with Windows native functions.
|
- * The library to use for communicating with Windows native functions.
|
||||||
- */
|
- */
|
||||||
- private final WindowsLibrary library;
|
- private final WindowsLibrary library;
|
||||||
@ -717,7 +711,7 @@ index 6e16424..e2138c1 100644
|
|||||||
- @SuppressWarnings("deprecation")
|
- @SuppressWarnings("deprecation")
|
||||||
- public Factory() {
|
- public Factory() {
|
||||||
- library = Native.loadLibrary("kernel32", WindowsLibrary.class, W32APIOptions.DEFAULT_OPTIONS);
|
- library = Native.loadLibrary("kernel32", WindowsLibrary.class, W32APIOptions.DEFAULT_OPTIONS);
|
||||||
- attachLibrary = Native.loadLibrary("attach_hotspot_windows", WindowsAttachLibrary.class);
|
- attachLibrary = Native.loadLibrary(System.getProperty(LIBRARY_NAME, "attach_hotspot_windows"), WindowsAttachLibrary.class);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- /**
|
- /**
|
||||||
@ -1505,7 +1499,8 @@ index 6e16424..e2138c1 100644
|
|||||||
- try {
|
- try {
|
||||||
- // The binding for 'stat' is very platform dependant. To avoid the complexity of binding the correct method,
|
- // The binding for 'stat' is very platform dependant. To avoid the complexity of binding the correct method,
|
||||||
- // stat is called as a separate command. This is less efficient but more portable.
|
- // stat is called as a separate command. This is less efficient but more portable.
|
||||||
- Process process = Runtime.getRuntime().exec("stat -c=%u " + file.getAbsolutePath());
|
- String statUserSwitch = Platform.isMac() ? "-f" : "-c";
|
||||||
|
- Process process = Runtime.getRuntime().exec("stat " + statUserSwitch + " %u " + file.getAbsolutePath());
|
||||||
- int attempts = this.attempts;
|
- int attempts = this.attempts;
|
||||||
- boolean exited = false;
|
- boolean exited = false;
|
||||||
- String line = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")).readLine();
|
- String line = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")).readLine();
|
||||||
@ -1543,7 +1538,7 @@ index 6e16424..e2138c1 100644
|
|||||||
- process.destroy();
|
- process.destroy();
|
||||||
- throw new IllegalStateException("Command for stat did not exit in time");
|
- throw new IllegalStateException("Command for stat did not exit in time");
|
||||||
- }
|
- }
|
||||||
- return Integer.parseInt(line.substring(1));
|
- return Integer.parseInt(line);
|
||||||
- } catch (IOException exception) {
|
- } catch (IOException exception) {
|
||||||
- throw new IllegalStateException("Unable to execute stat command", exception);
|
- throw new IllegalStateException("Unable to execute stat command", exception);
|
||||||
- }
|
- }
|
||||||
@ -1591,7 +1586,8 @@ index 6e16424..e2138c1 100644
|
|||||||
- try {
|
- try {
|
||||||
- library.semop(semaphore, target, 1);
|
- library.semop(semaphore, target, 1);
|
||||||
- } catch (LastErrorException exception) {
|
- } catch (LastErrorException exception) {
|
||||||
- if (acceptUnavailable && Native.getLastError() == PosixLibrary.EAGAIN) {
|
- if (acceptUnavailable && (Native.getLastError() == PosixLibrary.EAGAIN
|
||||||
|
- || Native.getLastError() == PosixLibrary.EDEADLK)) {
|
||||||
- break;
|
- break;
|
||||||
- } else {
|
- } else {
|
||||||
- throw exception;
|
- throw exception;
|
||||||
@ -1636,6 +1632,11 @@ index 6e16424..e2138c1 100644
|
|||||||
- int EAGAIN = 11;
|
- int EAGAIN = 11;
|
||||||
-
|
-
|
||||||
- /**
|
- /**
|
||||||
|
- * Indicates a dead lock on a resource.
|
||||||
|
- */
|
||||||
|
- int EDEADLK = 35;
|
||||||
|
-
|
||||||
|
- /**
|
||||||
- * Indicates that a semaphore's operations should be undone at process shutdown.
|
- * Indicates that a semaphore's operations should be undone at process shutdown.
|
||||||
- */
|
- */
|
||||||
- short SEM_UNDO = 0x1000;
|
- short SEM_UNDO = 0x1000;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: byte-buddy
|
Name: byte-buddy
|
||||||
Version: 1.10.1
|
Version: 1.10.3
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Runtime code generation for the Java virtual machine
|
Summary: Runtime code generation for the Java virtual machine
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://bytebuddy.net/
|
URL: http://bytebuddy.net/
|
||||||
@ -140,6 +140,9 @@ sed -i -e '/SuppressFBWarnings/d' $(grep -lr SuppressFBWarnings)
|
|||||||
%license LICENSE NOTICE
|
%license LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 21 2019 Marian Koncek <mkoncek@redhat.com> - 1.10.3-1
|
||||||
|
- Update to upstream version 1.10.3
|
||||||
|
|
||||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.1-2
|
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.1-2
|
||||||
- Mass rebuild for javapackages-tools 201902
|
- Mass rebuild for javapackages-tools 201902
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (byte-buddy-1.10.1.tar.gz) = bc53e2d16bc4b412538936219d65235380c156cf65cc9f391e3621004867b33079efc99a2915c22b3c9f7a3320d894eb28b6d63a37c526ee642a0dba947954e1
|
SHA512 (byte-buddy-1.10.3.tar.gz) = bc12c59ba8183ac40af98d2f2a98e5803b6aa2355f725e8d6aeb3467f62f62e399b7653ef8cf9eb22de53024bb3b402f7a852ed5645c733fd341f5b561af613e
|
||||||
|
Loading…
Reference in New Issue
Block a user