Skip to content

Commit

Permalink
Make sure to delegate to instance variable for releasing config of a …
Browse files Browse the repository at this point in the history
…classloader
  • Loading branch information
holly-cummins committed Jan 16, 2025
1 parent 033874f commit c1c3bdf
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* classloader.
*/
public class TestConfigProviderResolver extends SmallRyeConfigProviderResolver {

// Note that this class both *extends* and *consumes* SmallRyeConfigProviderResolver. Every method in SmallRyeConfigProviderResolver should be replicated here with a delegation to the instance variable, or there will be subtle and horrible bugs.
private final SmallRyeConfigProviderResolver resolver;
private final ClassLoader classLoader;
private final Map<LaunchMode, SmallRyeConfig> configs;
Expand Down Expand Up @@ -96,4 +98,9 @@ public void registerConfig(final Config config, final ClassLoader classLoader) {
public void releaseConfig(final Config config) {
resolver.releaseConfig(config);
}

@Override
public void releaseConfig(final ClassLoader classLoader) {
resolver.releaseConfig(classLoader);
}
}

0 comments on commit c1c3bdf

Please sign in to comment.