From ec0c7aaa39d758c31db1ff2f756710f4f1e42f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Fri, 11 Sep 2020 12:42:28 +0200 Subject: [PATCH] Register String constructors for reflection Fixes #10873 --- .../main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java b/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java index 8cd22da76d0f1..dde9bad3c475c 100755 --- a/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java +++ b/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java @@ -90,6 +90,10 @@ void build(BuildProducer reflectiveClass, for (AnnotationInstance deserializeInstance : index.getAnnotations(JSONB_TYPE_DESERIALIZER)) { registerInstance(reflectiveClass, deserializeInstance); } + + // register String constructors for reflection as they may not have been properly registered by default + // see https://github.com/quarkusio/quarkus/issues/10873 + reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, false, "java.lang.String")); } private void registerInstance(BuildProducer reflectiveClass, AnnotationInstance instance) {