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 3202466ee1 Fix #9010: AWS2 native substitution conflict with Quarkus 
Amazon Services
3202466ee1 is described below

commit 3202466ee16583bb5ffa1ea262d8c2630015661e
Author: Ramu <[email protected]>
AuthorDate: Mon Aug 17 11:45:17 2026 +0530

    Fix #9010: AWS2 native substitution conflict with Quarkus Amazon Services
---
 .../aws/commons/ChecksumProviderSubstitutions.java | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git 
a/extensions-support/aws2/runtime/src/main/java/org/apache/camel/quarkus/component/aws/commons/ChecksumProviderSubstitutions.java
 
b/extensions-support/aws2/runtime/src/main/java/org/apache/camel/quarkus/component/aws/commons/ChecksumProviderSubstitutions.java
index 9b051c8a2f..47bca55bd5 100644
--- 
a/extensions-support/aws2/runtime/src/main/java/org/apache/camel/quarkus/component/aws/commons/ChecksumProviderSubstitutions.java
+++ 
b/extensions-support/aws2/runtime/src/main/java/org/apache/camel/quarkus/component/aws/commons/ChecksumProviderSubstitutions.java
@@ -37,7 +37,10 @@ final class AwsChecksumSubstitutions {
 /**
  * Avoids references to types that are only available if aws-crt is on the 
classpath.
  */
-@TargetClass(value = ChecksumProvider.class, onlyWith = 
ChecksumProviderSubstitutions.AwsCrtIsAbsent.class)
+@TargetClass(value = ChecksumProvider.class, onlyWith = {
+        ChecksumProviderSubstitutions.AwsCrtIsAbsent.class,
+        ChecksumProviderSubstitutions.QuarkusAmazonCrtSubstitutionsAbsent.class
+})
 final class ChecksumProviderSubstitutions {
     @Substitute
     static SdkChecksum crc64NvmeCrtImplementation() {
@@ -69,4 +72,21 @@ final class ChecksumProviderSubstitutions {
             }
         }
     }
+
+    /**
+     * Skip these substitutions when Quarkus Amazon Services already registers 
an equivalent
+     * (and broader) ChecksumProvider substitution.
+     */
+    public static final class QuarkusAmazonCrtSubstitutionsAbsent implements 
BooleanSupplier {
+        @Override
+        public boolean getAsBoolean() {
+            try {
+                Thread.currentThread().getContextClassLoader()
+                        
.loadClass("io.quarkiverse.amazon.common.runtime.CrtSubstitutions");
+                return false;
+            } catch (ClassNotFoundException e) {
+                return true;
+            }
+        }
+    }
 }

Reply via email to