代码拉取完成,页面将自动刷新
From 6cc11ea389160c067b103bd4d0c356bb13442c77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:19:45 +0200
Subject: [PATCH 5/7] Do not use the Graal annotations
---
.../java/io/netty/util/NetUtilSubstitutions.java | 13 -------------
.../util/internal/svm/CleanerJava6Substitution.java | 10 ----------
.../svm/PlatformDependent0Substitution.java | 10 ----------
.../internal/svm/PlatformDependentSubstitution.java | 9 ---------
.../svm/UnsafeRefArrayAccessSubstitution.java | 9 ---------
5 files changed, 51 deletions(-)
diff --git a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
index 65c7bb94a5..18bfc1664f 100644
--- a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
+++ b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
@@ -15,35 +15,22 @@
*/
package io.netty.util;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.InjectAccessors;
-import com.oracle.svm.core.annotate.TargetClass;
-
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Collection;
-@TargetClass(NetUtil.class)
final class NetUtilSubstitutions {
private NetUtilSubstitutions() {
}
- @Alias
- @InjectAccessors(NetUtilLocalhost4Accessor.class)
public static Inet4Address LOCALHOST4;
- @Alias
- @InjectAccessors(NetUtilLocalhost6Accessor.class)
public static Inet6Address LOCALHOST6;
- @Alias
- @InjectAccessors(NetUtilLocalhostAccessor.class)
public static InetAddress LOCALHOST;
- @Alias
- @InjectAccessors(NetUtilNetworkInterfacesAccessor.class)
public static Collection<NetworkInterface> NETWORK_INTERFACES;
private static final class NetUtilLocalhost4Accessor {
diff --git a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
index aed4777a0d..0fa5a858ab 100644
--- a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.CleanerJava6")
final class CleanerJava6Substitution {
private CleanerJava6Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.DirectByteBuffer",
- name = "cleaner")
private static long CLEANER_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
index 1a06a5518d..3bd61f467a 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent0")
final class PlatformDependent0Substitution {
private PlatformDependent0Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.Buffer",
- name = "address")
private static long ADDRESS_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
index 08932da772..8df7f18218 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
@@ -15,11 +15,6 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent")
final class PlatformDependentSubstitution {
private PlatformDependentSubstitution() {
}
@@ -31,9 +26,5 @@ final class PlatformDependentSubstitution {
* in PlatformDependent happens during image building, the non-recomputed value
* is cached.
*/
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayBaseOffset,
- declClass = byte[].class)
private static long BYTE_ARRAY_BASE_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
index 08f492f132..f0b10d7cde 100644
--- a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
@@ -15,18 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess")
final class UnsafeRefArrayAccessSubstitution {
private UnsafeRefArrayAccessSubstitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayIndexShift,
- declClass = Object[].class)
public static int REF_ELEMENT_SHIFT;
}
--
2.46.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。