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 e7d6c94ac4 Fix FHIR native build warning ClassNotFoundException:
com.google.protobuf.JavaFeaturesProto
e7d6c94ac4 is described below
commit e7d6c94ac403a907e56fd0b84da71c84fbd66f57
Author: James Netherton <[email protected]>
AuthorDate: Wed Jul 22 13:49:15 2026 +0100
Fix FHIR native build warning ClassNotFoundException:
com.google.protobuf.JavaFeaturesProto
---
.../component/fhir/deployment/FhirProcessor.java | 6 ------
.../quarkus/component/fhir/it/util/FhirTestHelper.java | 17 +++--------------
2 files changed, 3 insertions(+), 20 deletions(-)
diff --git
a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
index 439ffd8847..917dcaa883 100644
---
a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
+++
b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
@@ -34,7 +34,6 @@ import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.GeneratedClassBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
import io.quarkus.gizmo.ClassCreator;
import io.quarkus.gizmo.Gizmo;
@@ -137,11 +136,6 @@ final class FhirProcessor {
}
}
- @BuildStep
- RuntimeInitializedClassBuildItem runtimeInitializedClasses() {
- return new
RuntimeInitializedClassBuildItem("com.google.protobuf.JavaFeaturesProto");
- }
-
static final class IsFhirServerAbsent implements BooleanSupplier {
@Override
public boolean getAsBoolean() {
diff --git
a/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/util/FhirTestHelper.java
b/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/util/FhirTestHelper.java
index aad2b640cf..7943b8ba74 100644
---
a/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/util/FhirTestHelper.java
+++
b/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/util/FhirTestHelper.java
@@ -16,10 +16,7 @@
*/
package org.apache.camel.quarkus.component.fhir.it.util;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.camel.quarkus.component.fhir.it.AbstractFhirRouteBuilder;
+import org.eclipse.microprofile.config.ConfigProvider;
public final class FhirTestHelper {
@@ -28,15 +25,7 @@ public final class FhirTestHelper {
}
public static boolean isFhirVersionEnabled(String version) {
- try {
- Properties properties = new Properties();
-
properties.load(AbstractFhirRouteBuilder.class.getResourceAsStream("/application.properties"));
- String key = "quarkus.camel.fhir.enable-" + version.toLowerCase();
- String envKey = key.toUpperCase().replace('.', '_');
- String value = (String) properties.getOrDefault(key,
System.getProperty(key, System.getenv(envKey)));
- return Boolean.valueOf(value);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
+ String key = "quarkus.camel.fhir.enable-" + version.toLowerCase();
+ return ConfigProvider.getConfig().getOptionalValue(key,
Boolean.class).orElse(false);
}
}