Fix olingo4 tests for native mode
@@ -20,19 +20,16 @@ import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildItem;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import org.apache.camel.component.olingo4.Olingo4AppEndpointConfiguration;
import org.apache.camel.quarkus.core.deployment.UnbannedReflectiveBuildItem;
import org.apache.olingo.server.core.ODataImpl;
-import org.jboss.jandex.DotName;
-import org.jboss.jandex.IndexView;
class Olingo4Processor {
private static final String FEATURE = "camel-olingo4";
- private static final DotName JSON_DESERIALIZE_DOT_NAME = DotName
- .createSimple("com.fasterxml.jackson.databind.annotation.JsonDeserialize");
@BuildStep
FeatureBuildItem feature() {
@@ -54,19 +51,10 @@ class Olingo4Processor {
void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, CombinedIndexBuildItem combinedIndex) {
reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, ODataImpl.class));
reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, Olingo4AppEndpointConfiguration.class));
+ }
- /*
- * Register Olingo Deserializer classes for reflection. We do this because the Quarkus Jackson extension only
- * configures reflection where the 'using' annotation value is applied to fields & methods.
- *
- * TODO: Remove this when the Quarkus Jackson extension has this enhancement - https://github.com/quarkusio/quarkus/issues/7139
- */
- IndexView index = combinedIndex.getIndex();
- index.getAnnotations(JSON_DESERIALIZE_DOT_NAME)
- .stream()
- .map(annotation -> annotation.value("using").asClass().name().toString())
- .filter(className -> className.startsWith("org.apache.olingo"))
- .map(className -> new ReflectiveClassBuildItem(true, false, false, className))
- .forEach(reflectiveClass::produce);
+ @BuildStep
+ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+ return new ExtensionSslNativeSupportBuildItem(FEATURE);
}
}
