Skip to content

4.x: Deprecated Config.global(Config) method does not have a full replacement #10447

@tomas-langer

Description

@tomas-langer

Environment Details

  • Helidon Version: 4.2.x
  • Helidon SE

io.helidon.config.Config.config(Config) method has the following deprecation comment:

use {@link io.helidon.service.registry.Services#set(Class, Object[])} to register a static instance for the
     *      global service registry; when using a custom service registry instance, set is on the registry configuration builder
  1. This does not work in 4.2.4 - io.helidon.config.Config is not a valid contract (this should be fixed in 4.2.5)
  2. The recommended approach would only register a config instance for io.helidon.config.Config, but not for io.helidon.common.config.Config; the latter is used by internal components of Helidon to retrieve configuration from service registry, and as such it should use the same instance

We must fix this and validate that when Services.set(io.helidon.config.Config.class, configInstance) is called, it would be available both as common Config instance and as config Config instance...

Related to #10416

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Sprint Scope

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions