This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 70c3a08a81 Ref #5026: Delay the init of ICMPHelper on non Linux OS
70c3a08a81 is described below
commit 70c3a08a8180f5fc62d605fbbb62bbd8b9f637e5
Author: Nicolas Filotto <[email protected]>
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,