eeverman / eeverman/andhow

Duplicate aliases on a Property should be an IllegalArgument

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

Description

**Describe the bug**
Currently it is possible to add duplicate aliases during the creation of a Property and they are silently ignored. This is almost certainly masking a user configuration typo and should just be an error. For instance, this is allowed and the duplicate ignored:
`StrProp.builder().aliasIn("Str1In1").aliasIn("Str1In1").build();`

This also makes alias order ambiguous, which is a related ticket #581

**To Reproduce**
See the `PropertyBaseTest`

**Expected behavior / Actual behavior**
Exception thrown during construction to fail fast.

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.