From 36197b5bcca26d9c65ed2e8d6d6c10428220ee40 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 10 Jan 2024 10:35:43 +0200 Subject: [PATCH] Keep static instance field and delete unused field in substitution * Don't replace `com.jayway.jsonpath.internal.DefaultsImpl#INSTANCE`, there is no need. * Delete `com.jayway.jsonpath.internal.DefaultsImpl#mappingProvider` in `io.smallrye.reactive.kafka.graal.Target_com_jayway_jsonpath_internal_DefaultsImpl` since it's no longer used. Closes https://github.com/quarkusio/quarkus/issues/37862 --- .../reactive/kafka/graal/StrimziSubstitutions.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/kafka-client/runtime/src/main/java/io/smallrye/reactive/kafka/graal/StrimziSubstitutions.java b/extensions/kafka-client/runtime/src/main/java/io/smallrye/reactive/kafka/graal/StrimziSubstitutions.java index e556ed94f2aa2..2219060f6b7a8 100644 --- a/extensions/kafka-client/runtime/src/main/java/io/smallrye/reactive/kafka/graal/StrimziSubstitutions.java +++ b/extensions/kafka-client/runtime/src/main/java/io/smallrye/reactive/kafka/graal/StrimziSubstitutions.java @@ -9,7 +9,7 @@ import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider; import com.jayway.jsonpath.spi.mapper.MappingProvider; import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.RecomputeFieldValue; +import com.oracle.svm.core.annotate.Delete; import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; @@ -72,10 +72,8 @@ private static boolean isJson(Object o) { @TargetClass(className = "com.jayway.jsonpath.internal.DefaultsImpl", onlyWith = HasStrimzi.class) final class Target_com_jayway_jsonpath_internal_DefaultsImpl { - - @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias) - @Alias - public static Target_com_jayway_jsonpath_internal_DefaultsImpl INSTANCE = new Target_com_jayway_jsonpath_internal_DefaultsImpl(); + @Delete // Delete the no longer used mappingProvider + private MappingProvider mappingProvider; @Substitute public JsonProvider jsonProvider() {