You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/07/27 09:05:28 UTC
[camel-quarkus] 01/01: Ref #5026: Delay the init of ICMPHelper on non Linux OS
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch 5026/init-ICMPHelper-at-runtime-on-non-linux
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit b36af2f7a9636d4e33cbaadf027736300c4b3904
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Jul 27 11:05:01 2023 +0200
Ref #5026: Delay the init of ICMPHelper on non Linux OS
---
.../component/hazelcast/deployment/HazelcastProcessor.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
index 1bc696f27d..1b5458ac5d 100644
--- a/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
+++ b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
@@ -33,6 +33,7 @@ import com.hazelcast.collection.ISet;
import com.hazelcast.config.Config;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.cp.IAtomicLong;
+import com.hazelcast.internal.util.ICMPHelper;
import com.hazelcast.map.IMap;
import com.hazelcast.multimap.MultiMap;
import com.hazelcast.replicatedmap.ReplicatedMap;
@@ -45,6 +46,8 @@ import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import io.quarkus.utilities.OS;
import org.apache.camel.tooling.model.MainModel;
import org.jboss.jandex.DotName;
import org.jboss.jandex.Type;
@@ -96,6 +99,13 @@ class HazelcastProcessor {
MainModel.class);
}
+ @BuildStep
+ void registerICMPHelper(BuildProducer<RuntimeInitializedClassBuildItem> initializedClasses) {
+ if (OS.determineOS() != OS.LINUX) {
+ initializedClasses.produce(new RuntimeInitializedClassBuildItem(ICMPHelper.class.getName()));
+ }
+ }
+
private static void registerTypeHierarchy(
BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyClass,
BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarnings,