question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Must a Config actually use Converters?

See original GitHub issue

The Config interface of course does not refer to them at all.

The ConfigBuilder interface accepts them but there does not seem to be a requirement anywhere I can find that these Converters actually be used by a Config implementation.

By contrast, ConfigSources, which are also accepted by a ConfigBuilder, clearly show up in the Config interface (although they give rise to another issue whose comment section apparently augments the specification).

The specification around Converters also mentions, at the bottom:

If a Converter implements the java.lang.AutoCloseable interface then the close() method will be called when the underlying Config is being released.

What does “underlying” mean?

Also this implies that an autocloseable Converter must be used in some unspecified way by exactly one Config instance, or it will be at risk of being closed improperly from the viewpoint of some other Config instance. This doesn’t seem to be spelled out anywhere.

For clarity: clearly I understand the intent is that conversion must happen using Converter instances during the Config#getValue(String, Class) method in some hazy way. But it seems to me there is no such requirement anywhere.

If such conversion must be used, is it reasonable to provide a getConverters() method on Config, much as there is a getConfigSources() method on Config?

Is it therefore also reasonable to suggest that there be a full specification of how conversion must behave when the getValue(String, Class) and getOptionalValue(String, Class) methods are invoked?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
dmlloydcommented, Sep 26, 2019

I agree that the specification quality is very sub-par. This has caused us many headaches as well maintaining SmallRye Config and Quarkus. I’m hoping that if we can get past #443 and #445, we can follow up with some proposals which would greatly improve the specification language.

0reactions
kenfinnigancommented, Jan 24, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka Connect Deep Dive – Converters and Serialization ...
Configuring converters. Kafka Connect takes a default converter configuration at the worker level, and it can also be overridden per connector.
Read more >
Extending Configuration Support - Quarkus
The custom converter class must be public , must have a public constructor with no arguments, and must not be abstract . The...
Read more >
Config .cfg and Action .act Files - reaConverter
reaConverter's configuration (.cfg) and action (.act) files are particularly useful for users who plan to automate the image conversion and editing process, ...
Read more >
DevCentral Connects: AS3 Config Converter - YouTube
Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, try restarting your device. Your browser can't play this video.
Read more >
@ParamConverter (SensioFrameworkExtraBundle ... - Symfony
The converter will attempt to do a findOneBy() fetch by using all of the wildcards in your route that are actually properties on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found