Skip to content

Commit

Permalink
Fix accidental config breakage of quarkus.package.decompiler.* prop…
Browse files Browse the repository at this point in the history
…erties

This was missed in quarkusio#39295. Fixes quarkusio#40272.
  • Loading branch information
dmlloyd committed Apr 25, 2024
1 parent 0efd81a commit 4b02893
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public final class ConfigCompatibility {
ConfigCompatibility::quarkusPackageIncludedOptionalDependencies),
entry(List.of("quarkus", "package", "include-dependency-list"),
ConfigCompatibility::quarkusPackageIncludeDependencyList),
entry(List.of("quarkus", "package", "vineflower", "version"),
ConfigCompatibility::quarkusPackageVineflowerVersion),
entry(List.of("quarkus", "package", "vineflower", "enabled"),
ConfigCompatibility::quarkusPackageVineflowerEnabled),
entry(List.of("quarkus", "package", "vineflower", "jar-directory"),
ConfigCompatibility::quarkusPackageVineflowerJarDirectory),
entry(List.of("quarkus", "package", "decompiler", "version"),
ConfigCompatibility::quarkusPackageDecompilerVersion),
entry(List.of("quarkus", "package", "decompiler", "enabled"),
ConfigCompatibility::quarkusPackageDecompilerEnabled),
entry(List.of("quarkus", "package", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageDecompilerJarDirectory),
entry(List.of("quarkus", "package", "manifest", "attributes", "*"),
ConfigCompatibility::quarkusPackageManifestAttributes),
entry(List.of("quarkus", "package", "manifest", "sections", "*", "*"),
Expand Down Expand Up @@ -102,9 +102,10 @@ public final class ConfigCompatibility {
ConfigCompatibility::quarkusPackageJarManifestSections),
entry(List.of("quarkus", "package", "jar", "manifest", "add-implementation-entries"),
ConfigCompatibility::quarkusPackageJarManifestAddImplementationEntries),
entry(List.of("quarkus", "package", "decompiler", "enabled"), ConfigCompatibility::quarkusPackageDecompilerEnabled),
entry(List.of("quarkus", "package", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageDecompilerJarDirectory));
entry(List.of("quarkus", "package", "jar", "decompiler", "enabled"),
ConfigCompatibility::quarkusPackageJarDecompilerEnabled),
entry(List.of("quarkus", "package", "jar", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageJarDecompilerJarDirectory));

/**
* The interceptor at the front of the chain which handles hiding deprecated properties from the iterator.
Expand Down Expand Up @@ -271,17 +272,17 @@ private static List<String> quarkusPackageIncludedOptionalDependencies(ConfigSou
return List.of("quarkus.package.jar.included-optional-dependencies");
}

private static List<String> quarkusPackageVineflowerVersion(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerVersion(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// always hide this ignored property
return List.of();
}

private static List<String> quarkusPackageVineflowerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// simple mapping to a new name
return List.of("quarkus.package.decompiler.enabled");
}

private static List<String> quarkusPackageVineflowerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// simple mapping to a new name
return List.of("quarkus.package.decompiler.jar-directory");
}
Expand Down Expand Up @@ -500,8 +501,8 @@ private static ConfigValue quarkusPackageJarManifestAddImplementationEntries(Con
}
}

private static ConfigValue quarkusPackageDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.vineflower.enabled");
private static ConfigValue quarkusPackageJarDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.decompiler.enabled");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
Expand All @@ -511,8 +512,8 @@ private static ConfigValue quarkusPackageDecompilerEnabled(ConfigSourceIntercept
}
}

private static ConfigValue quarkusPackageDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.vineflower.jar-directory");
private static ConfigValue quarkusPackageJarDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.decompiler.jar-directory");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
Expand Down

0 comments on commit 4b02893

Please sign in to comment.