@Test public void testMpToHelidonConfigMappingServicesNotDisabled() { var mutable = new MutableConfigSource(); Config config = ConfigProviderResolver.instance().getBuilder() .withSources(mutable) .build(); TestMapperProvider.reset(); MpConfig.toHelidonConfig(config); assertThat(TestMapperProvider.getCreationCount(), is(1)); }
public static io.helidon.config.Config toHelidonConfig(Config mpConfig) { if (mpConfig instanceof io.helidon.config.Config) { return (io.helidon.config.Config) mpConfig; } Iterator<ConfigSource> configSources = mpConfig.getConfigSources().iterator(); ConfigSource first = configSources.hasNext() ? configSources.next() : null; if (!configSources.hasNext() && first instanceof MpHelidonConfigSource) { return ((MpHelidonConfigSource) first).unwrap(); } io.helidon.config.Config mapper = io.helidon.config.Config.builder() .sources(ConfigSources.empty()) .overrides(OverrideSources.empty()) .disableEnvironmentVariablesSource() .disableSystemPropertiesSource() .disableParserServices() .disableFilterServices() .disableCaching() .disableValueResolving() .changesExecutor(command -> { }) .build(); return new SeConfig(mapper, mpConfig); }
MpConfig { public static io.helidon.config.Config toHelidonConfig(Config mpConfig) { if (mpConfig instanceof io.helidon.config.Config) { return (io.helidon.config.Config) mpConfig; } Iterator<ConfigSource> configSources = mpConfig.getConfigSources().iterator(); ConfigSource first = configSources.hasNext() ? configSources.next() : null; if (!configSources.hasNext() && first instanceof MpHelidonConfigSource) { return ((MpHelidonConfigSource) first).unwrap(); } io.helidon.config.Config mapper = io.helidon.config.Config.builder() .sources(ConfigSources.empty()) .overrides(OverrideSources.empty()) .disableEnvironmentVariablesSource() .disableSystemPropertiesSource() .disableParserServices() .disableFilterServices() .disableCaching() .disableValueResolving() .changesExecutor(command -> { }) .build(); return new SeConfig(mapper, mpConfig); } }
MpConfig { public static io.helidon.config.Config toHelidonConfig(Config mpConfig) { if (mpConfig instanceof io.helidon.config.Config) { return (io.helidon.config.Config) mpConfig; } Iterator<ConfigSource> configSources = mpConfig.getConfigSources().iterator(); ConfigSource first = configSources.hasNext() ? configSources.next() : null; if (!configSources.hasNext() && first instanceof MpHelidonConfigSource) { return ((MpHelidonConfigSource) first).unwrap(); } io.helidon.config.Config mapper = io.helidon.config.Config.builder() .sources(ConfigSources.empty()) .overrides(OverrideSources.empty()) .disableEnvironmentVariablesSource() .disableSystemPropertiesSource() .disableParserServices() .disableFilterServices() .disableCaching() .disableValueResolving() .changesExecutor(command -> { }) .build(); return new SeConfig(mapper, mpConfig); } private  MpConfig(); }
MpConfig { public static io.helidon.config.Config toHelidonConfig(Config mpConfig) { if (mpConfig instanceof io.helidon.config.Config) { return (io.helidon.config.Config) mpConfig; } Iterator<ConfigSource> configSources = mpConfig.getConfigSources().iterator(); ConfigSource first = configSources.hasNext() ? configSources.next() : null; if (!configSources.hasNext() && first instanceof MpHelidonConfigSource) { return ((MpHelidonConfigSource) first).unwrap(); } io.helidon.config.Config mapper = io.helidon.config.Config.builder() .sources(ConfigSources.empty()) .overrides(OverrideSources.empty()) .disableEnvironmentVariablesSource() .disableSystemPropertiesSource() .disableParserServices() .disableFilterServices() .disableCaching() .disableValueResolving() .changesExecutor(command -> { }) .build(); return new SeConfig(mapper, mpConfig); } private  MpConfig(); static io.helidon.config.Config toHelidonConfig(Config mpConfig); }
MpConfig { public static io.helidon.config.Config toHelidonConfig(Config mpConfig) { if (mpConfig instanceof io.helidon.config.Config) { return (io.helidon.config.Config) mpConfig; } Iterator<ConfigSource> configSources = mpConfig.getConfigSources().iterator(); ConfigSource first = configSources.hasNext() ? configSources.next() : null; if (!configSources.hasNext() && first instanceof MpHelidonConfigSource) { return ((MpHelidonConfigSource) first).unwrap(); } io.helidon.config.Config mapper = io.helidon.config.Config.builder() .sources(ConfigSources.empty()) .overrides(OverrideSources.empty()) .disableEnvironmentVariablesSource() .disableSystemPropertiesSource() .disableParserServices() .disableFilterServices() .disableCaching() .disableValueResolving() .changesExecutor(command -> { }) .build(); return new SeConfig(mapper, mpConfig); } private  MpConfig(); static io.helidon.config.Config toHelidonConfig(Config mpConfig);  }