Skip to content

Commit

Permalink
Merge pull request #44572 from radcortez/fix-44246
Browse files Browse the repository at this point in the history
Remove customizer mappings from runtime recording Config
  • Loading branch information
gsmet authored Nov 19, 2024
2 parents 3dff5a4 + ada7e07 commit 021a05e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
import io.smallrye.config.SecretKeys;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.SmallRyeConfigBuilder;
import io.smallrye.config.SmallRyeConfigBuilderCustomizer;
import io.smallrye.config.SysPropConfigSource;
import io.smallrye.config.common.AbstractConfigSource;

Expand Down Expand Up @@ -1112,6 +1113,17 @@ private SmallRyeConfig getConfigForRuntimeRecording() {
builder.getProfiles().add("");
builder.getSources().clear();
builder.getSourceProviders().clear();
builder.withCustomizers(new SmallRyeConfigBuilderCustomizer() {
@Override
public void configBuilder(final SmallRyeConfigBuilder builder) {
builder.getMappingsBuilder().getMappings().clear();
}

@Override
public int priority() {
return Integer.MAX_VALUE;
}
});
builder.setAddDefaultSources(false)
// Customizers may duplicate sources, but not much we can do about it, we need to run them
.addDiscoveredCustomizers()
Expand Down

0 comments on commit 021a05e

Please sign in to comment.