Skip to content

Commit 9783b54

Browse files
committed
Source is Supplier issue.
1 parent 2e99083 commit 9783b54

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

docs-internal/config-api.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Summary table:
1515
| Java Beans | None | Low | None | High |
1616
| No reflection as()| None | High | None | High |
1717
| Remove ConfigMapper| Medium | None | Medium | High |
18+
| Source is Supplier| Compatible | None | Low or None | Medium |
1819

1920
### Too Many Methods
2021
Too many methods are part of public API - this makes it very complicated to test, maintain and (sometimes) use
@@ -166,4 +167,16 @@ config.as(SomeClass::new);
166167
```
167168

168169
### Remove ConfigMapper
169-
Remove ConfigMapper interface, as it is in fact a Function<Config, T>.
170+
Remove ConfigMapper interface, as it is in fact a Function<Config, T>.
171+
172+
### Source is Supplier
173+
Currently the ConfigSource interface extends Supplier and default implementation
174+
of the `get()` method returns `this`.
175+
Reason behind this (probably) is to have a single set of methods on `Builder`, that
176+
only accept `Supplier<ConfigSource>` and you can send in either a `Builder<? extends ConfigSource`
177+
or an actual instance of a `ConfigSource`.
178+
179+
This is confusing and it is hard to clearly understand the behavior of such methods.
180+
181+
We should introduce builder methods for `ConfigSource` instances and remove the `Supplier` from
182+
`ConfigSource` interface.

0 commit comments

Comments
 (0)