eeverman / eeverman/andhow

Loaders should be able to indicate they do not allow duplicates

Open
#320 0 comments 0 reactions 0 assignees View on GitHub
API Addition enhancement
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Currently, AndHowCore blocks duplicate instances of Loaders. However, some loaders should never have a duplicate class.
* Std loaders are auto created, thus they never should be added directly and should not have multiple instances of the same loader (is this true? Could allow one to be auto created and one to be custom created and addAfter?)
* EnvProp loader, SysProp loader all make sense to only ever have one instance.

There is no need for the loaders themselves to enforce single instancing, since multiple instances could be used for testing. This should be added to the startup validation in AndhowCore.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.