diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 635927d365168..ee35f9bc64e99 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -161,7 +161,7 @@ 3.2.0 4.2.2 3.0.6.Final - 10.17.1 + 10.17.2 3.0.4 4.29.1 diff --git a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/ClassicConfigurationSubstitutions.java b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/ClassicConfigurationSubstitutions.java deleted file mode 100644 index 6ee61f922bb4b..0000000000000 --- a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/ClassicConfigurationSubstitutions.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.quarkus.flyway.runtime.graal; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.flywaydb.core.extensibility.ConfigurationExtension; -import org.flywaydb.core.internal.plugin.PluginRegister; -import org.flywaydb.core.internal.util.MergeUtils; - -import com.google.gson.Gson; -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.RecomputeFieldValue; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; - -@TargetClass(className = "org.flywaydb.core.api.configuration.ClassicConfiguration") -public final class ClassicConfigurationSubstitutions { - - @Alias - @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias) - private static Pattern ANY_WORD_BETWEEN_TWO_QUOTES_PATTERN = Pattern.compile("\"([^\"]*)\""); - - @Alias - PluginRegister pluginRegister; - - @Substitute - private void determineKeysToRemoveAndRemoveFromProps(HashMap> configExtensionsPropertyMap, - List keysToRemove, Map props) { - for (Map.Entry> property : configExtensionsPropertyMap.entrySet()) { - ConfigurationExtension cfg = null; - for (ConfigurationExtension c : pluginRegister.getPlugins(ConfigurationExtension.class)) { - if (c.getClass().toString().equals(property.getKey())) { - cfg = c; - break; - } - } - if (cfg != null) { - Map mp = property.getValue(); - try { - Gson gson = new Gson(); - ConfigurationExtension newConfigurationExtension = gson.fromJson(gson.toJson(mp), cfg.getClass()); - MergeUtils.mergeModel(newConfigurationExtension, cfg); - } catch (Exception e) { - Matcher matcher = ANY_WORD_BETWEEN_TWO_QUOTES_PATTERN.matcher(e.getMessage()); - if (matcher.find()) { - String errorProperty = matcher.group(1); - List propsToRemove = new ArrayList<>(); - for (String k : keysToRemove) { - if (k.endsWith(errorProperty)) { - propsToRemove.add(k); - } - } - keysToRemove.removeAll(propsToRemove); - } - } - } - } - - props.keySet().removeAll(keysToRemove); - } - -}