Skip to content

Commit

Permalink
Merge pull request #35592 from geoand/#35582
Browse files Browse the repository at this point in the history
Fix Jakarta Cookie serialization in native
  • Loading branch information
geoand authored Aug 28, 2023
2 parents bccd6f7 + a9aa2f7 commit 41fcd44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import jakarta.ws.rs.Priorities;
import jakarta.ws.rs.RuntimeType;
import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.MediaType;

import org.jboss.jandex.AnnotationInstance;
Expand Down Expand Up @@ -205,6 +206,11 @@ private String getJacksonMessageBodyReader(boolean needsFullFeatureSet) {
: ServerJacksonMessageBodyReader.class.getName();
}

@BuildStep
void reflection(BuildProducer<ReflectiveClassBuildItem> producer) {
producer.produce(ReflectiveClassBuildItem.builder(Cookie.class).methods().build());
}

@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void handleJsonAnnotations(Optional<ResourceScanningResultBuildItem> resourceScanningResultBuildItem,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package io.quarkus.resteasy.reactive.jsonb.deployment;

import jakarta.ws.rs.RuntimeType;
import jakarta.ws.rs.core.Cookie;

import io.quarkus.deployment.Feature;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.resteasy.reactive.common.deployment.ServerDefaultProducesHandlerBuildItem;
import io.quarkus.resteasy.reactive.jsonb.common.deployment.ResteasyReactiveJsonbCommonProcessor;
import io.quarkus.resteasy.reactive.spi.MessageBodyReaderBuildItem;
Expand All @@ -29,4 +31,9 @@ void additionalProviders(BuildProducer<MessageBodyReaderBuildItem> additionalRea
ResteasyReactiveJsonbCommonProcessor.additionalProviders(additionalReaders, additionalWriters,
RuntimeType.SERVER);
}

@BuildStep
void reflection(BuildProducer<ReflectiveClassBuildItem> producer) {
producer.produce(ReflectiveClassBuildItem.builder(Cookie.class).methods().build());
}
}

0 comments on commit 41fcd44

Please sign in to comment.